Declare in corresponding header files and dissolve main.h (#3796)

* Declare in corresponding header files and dissolve main.h

Apply include-what-you-use

* Remove further unncessary includes

* Incorporate review comment

* Do not declare static functions and variables in header

* Adapt test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Tobias Predel 2025-03-01 20:47:42 +01:00 committed by GitHub
parent 55c02f5420
commit 81ca04fc8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
66 changed files with 402 additions and 176 deletions

View file

@ -28,8 +28,6 @@
// cmake.h include header must come first
#include <columns/ColID.h>
#include <main.h>
#include <stdlib.h>
#include <test.h>
////////////////////////////////////////////////////////////////////////////////

View file

@ -28,16 +28,12 @@
// cmake.h include header must come first
#include <CmdInfo.h>
#include <main.h>
#include <stdlib.h>
#include <taskchampion-cpp/lib.h>
#include <test.h>
#include <util.h>
#include <iostream>
#include <limits>
#include "format.h"
namespace {

View file

@ -27,10 +27,11 @@
#include <cmake.h>
// cmake.h include header must come first
#include <main.h>
#include <stdlib.h>
#include <test.h>
#include "Context.h"
////////////////////////////////////////////////////////////////////////////////
int TEST_NAME(int, char**) {
UnitTest test(48);

View file

@ -27,12 +27,10 @@
#include <cmake.h>
// cmake.h include header must come first
#include <main.h>
#include <stdlib.h>
#include <test.h>
#include <unistd.h>
#include <iostream>
#include "Context.h"
namespace {

View file

@ -26,11 +26,9 @@
#include <cmake.h>
#include <iostream>
// cmake.h include header must come first
#include <main.h>
#include <stdlib.h>
#include <Task.h>
#include <test.h>
////////////////////////////////////////////////////////////////////////////////

View file

@ -27,12 +27,11 @@
#include <cmake.h>
// cmake.h include header must come first
#include <main.h>
#include <stdlib.h>
#include <Context.h>
#include <recur.h>
#include <test.h>
#include <util.h>
#include <iostream>
#include <limits>
////////////////////////////////////////////////////////////////////////////////

View file

@ -31,9 +31,8 @@
#include <Context.h>
#include <Task.h>
#include <ViewTask.h>
#include <main.h>
#include <sort.h>
#include <stdio.h>
#include <stdlib.h>
#include <test.h>
#include <unistd.h>