Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ cli/threadexecutor.o: cli/threadexecutor.cpp cli/cppcheckexecutor.h cli/executor
test/fixture.o: test/fixture.cpp lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/suppressions.h test/fixture.h test/options.h test/redirect.h
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/fixture.cpp

test/helpers.o: test/helpers.cpp externals/simplecpp/simplecpp.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/helpers.h
test/helpers.o: test/helpers.cpp externals/simplecpp/simplecpp.h lib/config.h lib/errortypes.h lib/mathlib.h lib/path.h lib/preprocessor.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/helpers.h
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/helpers.cpp

test/main.o: test/main.cpp externals/simplecpp/simplecpp.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/preprocessor.h lib/suppressions.h test/fixture.h test/options.h
Expand Down
1 change: 1 addition & 0 deletions cli/cmdlineparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "check.h"
#include "config.h"
#include "cppcheckexecutor.h"
#include "errorlogger.h"
#include "errortypes.h"
#include "filelister.h"
#include "importproject.h"
Expand Down
1 change: 0 additions & 1 deletion cli/executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "suppressions.h"

#include <algorithm>
#include <iostream>
#include <sstream> // IWYU pragma: keep
#include <utility>

Expand Down
3 changes: 2 additions & 1 deletion cli/processexecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

#if !defined(WIN32) && !defined(__MINGW32__)

#include "color.h"
#include "config.h"
#include "cppcheck.h"
#include "cppcheckexecutor.h"
Expand Down Expand Up @@ -56,6 +55,8 @@
#include <sys/prctl.h>
#endif

enum class Color;

// NOLINTNEXTLINE(misc-unused-using-decls) - required for FD_ZERO
using std::memset;

Expand Down
1 change: 0 additions & 1 deletion gui/newsuppressiondialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

#include "ui_newsuppressiondialog.h"

#include <functional>
#include <string>

#include <QComboBox>
Expand Down
1 change: 1 addition & 0 deletions lib/checkio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "symboldatabase.h"
#include "token.h"
#include "tokenize.h"
#include "utils.h"
#include "vfvalue.h"

#include <algorithm>
Expand Down
1 change: 1 addition & 0 deletions lib/checkunusedfunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "token.h"
#include "tokenize.h"
#include "tokenlist.h"
#include "utils.h"

#include <algorithm>
#include <cctype>
Expand Down
3 changes: 2 additions & 1 deletion lib/errorlogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "path.h"
#include "token.h"
#include "tokenlist.h"
#include "utils.h"

#include <algorithm>
#include <array>
Expand All @@ -32,9 +33,9 @@
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <limits>
#include <sstream> // IWYU pragma: keep
#include <string>
#include <unordered_map>
#include <utility>

#include <tinyxml2.h>
Expand Down
4 changes: 4 additions & 0 deletions test/helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@
#include "preprocessor.h"

#include <cstdio>
#include <fstream>
#include <stdexcept>
#include <utility>
#include <vector>

#ifdef _WIN32
#include <windows.h>
Expand All @@ -34,6 +36,8 @@

#include <simplecpp.h>

class Suppressions;

ScopedFile::ScopedFile(std::string name, const std::string &content, std::string path)
: mName(std::move(name))
, mPath(Path::toNativeSeparators(std::move(path)))
Expand Down
10 changes: 3 additions & 7 deletions test/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,16 @@
#ifndef helpersH
#define helpersH

#include "color.h"
#include "errorlogger.h"
#include "settings.h"
#include "suppressions.h"
#include "tokenize.h"
#include "tokenlist.h"

#include <fstream> // IWYU pragma: keep
#include <list>
#include <sstream> // IWYU pragma: keep
#include <string>

class Token;
class Processor;
class Preprocessor;
class Settings;
class Suppressions;

class givenACodeSampleToTokenize {
private:
Expand Down
2 changes: 1 addition & 1 deletion test/testcmdlineparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

#include "cmdlineparser.h"
#include "color.h"
#include "config.h"
#include "cppcheckexecutor.h"
#include "errortypes.h"
#include "platform.h"
Expand Down
1 change: 0 additions & 1 deletion test/testcppcheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "fixture.h"

#include <algorithm>
#include <functional>
#include <list>
#include <string>

Expand Down
1 change: 0 additions & 1 deletion test/testerrorlogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include "color.h"
#include "config.h"
#include "cppcheck.h"
#include "errorlogger.h"
Expand Down
3 changes: 3 additions & 0 deletions test/testsimplifyusing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@

#include <simplecpp.h>

#include <map>
#include <sstream> // IWYU pragma: keep
#include <string>
#include <utility>
#include <vector>


class TestSimplifyUsing : public TestFixture {
Expand Down
1 change: 0 additions & 1 deletion test/testsuppressions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#include <string>
#include <utility>
#include <vector>
#include <numeric>

class TestSuppressions : public TestFixture {
public:
Expand Down
5 changes: 5 additions & 0 deletions test/testutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
#include "settings.h"
#include "utils.h"

#include <cstddef>
#include <cstdint>
#include <limits>
#include <string>

const Settings givenACodeSampleToTokenize::settings;

class TestUtils : public TestFixture {
Expand Down