iwyu.yml: made `include-what-you-use` output more verbose / cleaned up includes (#5540)

This commit is contained in:
Oliver Stöneberg 2023-10-16 12:57:49 +02:00 committed by GitHub
parent 93297727ef
commit 5e89eb05a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 28 additions and 24 deletions

View File

@ -82,7 +82,7 @@ jobs:
- name: iwyu_tool - name: iwyu_tool
run: | run: |
PWD=$(pwd) PWD=$(pwd)
iwyu_tool -p cmake.output -j $(nproc) -- -w -Xiwyu --mapping_file=$PWD/qt5.imp > iwyu.log iwyu_tool -p cmake.output -j $(nproc) -- -w -Xiwyu --max_line_length=1024 -Xiwyu --comment_style=long -Xiwyu --quoted_includes_first -Xiwyu --update_comments -Xiwyu --mapping_file=$PWD/qt5.imp > iwyu.log
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
if: success() || failure() if: success() || failure()

View File

@ -833,7 +833,7 @@ test/testsizeof.o: test/testsizeof.cpp lib/addoninfo.h lib/check.h lib/checksize
test/teststl.o: test/teststl.cpp lib/addoninfo.h lib/check.h lib/checkstl.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.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/fixture.h test/teststl.o: test/teststl.cpp lib/addoninfo.h lib/check.h lib/checkstl.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.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/fixture.h
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/teststl.cpp $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/teststl.cpp
test/teststring.o: test/teststring.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkstring.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.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/fixture.h test/helpers.h test/teststring.o: test/teststring.cpp lib/addoninfo.h lib/check.h lib/checkstring.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.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/fixture.h test/helpers.h
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/teststring.cpp $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/teststring.cpp
test/testsummaries.o: test/testsummaries.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/summaries.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/testsummaries.o: test/testsummaries.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/summaries.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h

View File

@ -30,6 +30,7 @@
#include <cstdio> #include <cstdio>
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
//#include <features.h> // __USE_DYNAMIC_STACK_SIZE
#include <map> #include <map>
#include <string> #include <string>
#include <unistd.h> #include <unistd.h>
@ -48,7 +49,7 @@
# include <ucontext.h> # include <ucontext.h>
#endif #endif
// TODO: __USE_DYNAMIC_STACK_SIZE is depedent on the features.h include and not a built-in compiler define, so it might be problematic to depedent on it
#ifdef __USE_DYNAMIC_STACK_SIZE #ifdef __USE_DYNAMIC_STACK_SIZE
static const size_t MYSTACKSIZE = 16*1024+32768; // wild guess about a reasonable buffer static const size_t MYSTACKSIZE = 16*1024+32768; // wild guess about a reasonable buffer
#else #else

View File

@ -23,6 +23,7 @@
#include "common.h" #include "common.h"
#include "config.h" #include "config.h"
#include "erroritem.h" #include "erroritem.h"
#include "errortypes.h"
#include "path.h" #include "path.h"
#include "projectfile.h" #include "projectfile.h"
#include "report.h" #include "report.h"

View File

@ -20,7 +20,6 @@
#ifndef RESULTSTREE_H #ifndef RESULTSTREE_H
#define RESULTSTREE_H #define RESULTSTREE_H
#include "errortypes.h"
#include "showtypes.h" #include "showtypes.h"
#include <QObject> #include <QObject>
@ -40,6 +39,7 @@ class ThreadHandler;
class QContextMenuEvent; class QContextMenuEvent;
class QKeyEvent; class QKeyEvent;
class QSettings; class QSettings;
enum class Severity;
/// @addtogroup GUI /// @addtogroup GUI
/// @{ /// @{

View File

@ -19,6 +19,7 @@
#include "showtypes.h" #include "showtypes.h"
#include "common.h" #include "common.h"
#include "errortypes.h"
#include <QSettings> #include <QSettings>

View File

@ -19,10 +19,10 @@
#ifndef SHOWTYPES_H #ifndef SHOWTYPES_H
#define SHOWTYPES_H #define SHOWTYPES_H
#include "errortypes.h"
#include <QVariant> #include <QVariant>
enum class Severity;
/// @addtogroup GUI /// @addtogroup GUI
/// @{ /// @{

View File

@ -23,6 +23,7 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#include <functional> #include <functional>
#include <list>
#include <stack> #include <stack>
#include <string> #include <string>
#include <type_traits> #include <type_traits>

View File

@ -19,6 +19,7 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#include "checkio.h" #include "checkio.h"
#include "errortypes.h"
#include "library.h" #include "library.h"
#include "mathlib.h" #include "mathlib.h"
#include "platform.h" #include "platform.h"

View File

@ -23,7 +23,6 @@
#include "check.h" #include "check.h"
#include "config.h" #include "config.h"
#include "errortypes.h"
#include "tokenize.h" #include "tokenize.h"
#include <ostream> #include <ostream>
@ -34,6 +33,7 @@ class Settings;
class Token; class Token;
class Variable; class Variable;
class ErrorLogger; class ErrorLogger;
enum class Severity;
/// @addtogroup Checks /// @addtogroup Checks
/// @{ /// @{

View File

@ -21,6 +21,7 @@
#include "astutils.h" #include "astutils.h"
#include "errorlogger.h" #include "errorlogger.h"
#include "errortypes.h"
#include "library.h" #include "library.h"
#include "mathlib.h" #include "mathlib.h"
#include "platform.h" #include "platform.h"

View File

@ -34,7 +34,6 @@
#include "check.h" #include "check.h"
#include "config.h" #include "config.h"
#include "errortypes.h"
#include "tokenize.h" #include "tokenize.h"
#include <list> #include <list>
@ -46,6 +45,8 @@ class Settings;
class Token; class Token;
class Variable; class Variable;
class ErrorLogger; class ErrorLogger;
struct CWE;
enum class Severity;
/// @addtogroup Core /// @addtogroup Core
/// @{ /// @{

View File

@ -41,7 +41,6 @@
#include <set> #include <set>
#include <sstream> #include <sstream>
#include <tuple> #include <tuple>
#include <type_traits>
#include <unordered_map> #include <unordered_map>
#include <utility> #include <utility>
#include <vector> #include <vector>

View File

@ -159,6 +159,7 @@ static const std::string emptyString;
#define USE_WINDOWS_SEH #define USE_WINDOWS_SEH
#endif #endif
// TODO: __GLIBC__ is depedent on the features.h include and not a built-in compiler define, so it might be problematic to depedent on it
#if !defined(NO_UNIX_BACKTRACE_SUPPORT) && defined(__GNUC__) && defined(__GLIBC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__NetBSD__) && !defined(__SVR4) && !defined(__QNX__) #if !defined(NO_UNIX_BACKTRACE_SUPPORT) && defined(__GNUC__) && defined(__GLIBC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__NetBSD__) && !defined(__SVR4) && !defined(__QNX__)
#define USE_UNIX_BACKTRACE_SUPPORT #define USE_UNIX_BACKTRACE_SUPPORT
#endif #endif

View File

@ -20,8 +20,6 @@
#include "utils.h" #include "utils.h"
#include <cassert>
// see https://en.cppreference.com/w/c/keyword // see https://en.cppreference.com/w/c/keyword
#define C90_KEYWORDS \ #define C90_KEYWORDS \

View File

@ -19,6 +19,7 @@
#include "library.h" #include "library.h"
#include "astutils.h" #include "astutils.h"
#include "errortypes.h"
#include "mathlib.h" #include "mathlib.h"
#include "path.h" #include "path.h"
#include "symboldatabase.h" #include "symboldatabase.h"
@ -31,7 +32,6 @@
#include <algorithm> #include <algorithm>
#include <cctype> #include <cctype>
#include <climits> #include <climits>
#include <cstddef>
#include <cstring> #include <cstring>
#include <list> #include <list>
#include <memory> #include <memory>

View File

@ -23,7 +23,6 @@
#include "config.h" #include "config.h"
#include "mathlib.h" #include "mathlib.h"
#include "errortypes.h"
#include "standards.h" #include "standards.h"
#include <map> #include <map>
@ -37,6 +36,7 @@
class Token; class Token;
class Settings; class Settings;
enum class Severity;
namespace tinyxml2 { namespace tinyxml2 {
class XMLDocument; class XMLDocument;

View File

@ -26,7 +26,6 @@
#include <algorithm> #include <algorithm>
#include <string> #include <string>
#include <tuple> #include <tuple>
#include <type_traits>
const Scope* PathAnalysis::findOuterScope(const Scope * scope) const Scope* PathAnalysis::findOuterScope(const Scope * scope)
{ {

View File

@ -48,7 +48,6 @@
#include <stack> #include <stack>
#include <string> #include <string>
#include <tuple> #include <tuple>
#include <type_traits>
#include <unordered_map> #include <unordered_map>
#include <unordered_set> #include <unordered_set>
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------

View File

@ -36,7 +36,6 @@
#include <map> #include <map>
#include <set> #include <set>
#include <string> #include <string>
#include <type_traits>
#include <utility> #include <utility>
#include <vector> #include <vector>

View File

@ -21,6 +21,7 @@
#include "check.h" #include "check.h"
#include "errorlogger.h" #include "errorlogger.h"
#include "errortypes.h"
#include "library.h" #include "library.h"
#include "mathlib.h" #include "mathlib.h"
#include "platform.h" #include "platform.h"
@ -50,7 +51,6 @@
#include <sstream> // IWYU pragma: keep #include <sstream> // IWYU pragma: keep
#include <stack> #include <stack>
#include <stdexcept> #include <stdexcept>
#include <type_traits>
#include <unordered_map> #include <unordered_map>
#include <unordered_set> #include <unordered_set>
#include <utility> #include <utility>

View File

@ -22,7 +22,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#include "config.h" #include "config.h"
#include "errortypes.h"
#include "tokenlist.h" #include "tokenlist.h"
#include <cassert> #include <cassert>
@ -40,6 +39,7 @@ class TemplateSimplifier;
class ErrorLogger; class ErrorLogger;
class Preprocessor; class Preprocessor;
class VariableMap; class VariableMap;
enum class Severity;
namespace simplecpp { namespace simplecpp {
class TokenList; class TokenList;

View File

@ -31,6 +31,7 @@
#include <limits> #include <limits>
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
#include <type_traits>
#include <vector> #include <vector>
struct SelectMapKeys { struct SelectMapKeys {

View File

@ -24,7 +24,6 @@
#include "color.h" #include "color.h"
#include "config.h" #include "config.h"
#include "errorlogger.h" #include "errorlogger.h"
#include "errortypes.h"
#include "library.h" #include "library.h"
#include "platform.h" #include "platform.h"
#include "settings.h" #include "settings.h"
@ -39,6 +38,8 @@
class options; class options;
class Tokenizer; class Tokenizer;
enum class Certainty;
enum class Severity;
class TestFixture : public ErrorLogger { class TestFixture : public ErrorLogger {
private: private:

View File

@ -16,11 +16,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "cmdlinelogger.h"
#include "cmdlineparser.h" #include "cmdlineparser.h"
#include "config.h" #include "config.h"
#include "cppcheckexecutor.h" #include "cppcheckexecutor.h"
#include "errortypes.h" #include "errortypes.h"
#include "helpers.h" #include "helpers.h"
#include "importproject.h"
#include "platform.h" #include "platform.h"
#include "redirect.h" #include "redirect.h"
#include "settings.h" #include "settings.h"
@ -33,8 +35,11 @@
#include <cstdint> #include <cstdint>
#include <cstdio> #include <cstdio>
#include <list> #include <list>
#include <memory>
#include <set> #include <set>
#include <stdexcept>
#include <string> #include <string>
#include <unordered_set>
#include <vector> #include <vector>
class TestCmdlineParser : public TestFixture { class TestCmdlineParser : public TestFixture {

View File

@ -26,7 +26,6 @@
#include "library.h" #include "library.h"
#include <algorithm> #include <algorithm>
#include <cstddef>
#include <cstdlib> #include <cstdlib>
#include <list> #include <list>
#include <map> #include <map>

View File

@ -27,7 +27,6 @@
#include "timer.h" #include "timer.h"
#include <algorithm> #include <algorithm>
#include <cstddef>
#include <cstdlib> #include <cstdlib>
#include <list> #include <list>
#include <map> #include <map>

View File

@ -28,8 +28,6 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <simplecpp.h>
class TestString : public TestFixture { class TestString : public TestFixture {
public: public:
TestString() : TestFixture("TestString") {} TestString() : TestFixture("TestString") {}

View File

@ -26,7 +26,6 @@
#include "timer.h" #include "timer.h"
#include <algorithm> #include <algorithm>
#include <cstddef>
#include <cstdlib> #include <cstdlib>
#include <list> #include <list>
#include <map> #include <map>