Repository navigation
Fix compile args, add fix and system_last options - #3
Merged
Merged
Conversation
- pass iwyu the real compile flags, the compiler prefix (e.g. ccache) and binary were left in the arguments - iwyu profile runs the module in the compile phase, it was configured under init and had no sources, so nothing ran - format profile uses .clang-format, google style reordered includes and broke the init.hpp first requirement - headers args only for header files, ignore takes a list, types space or : separated - fix: pass iwyu output to fix_include, limited to checked files - system_last: with fix, move system includes after project includes - drop MKN_HOME based maiken dependency, mkn.mod is enough
… the default branch in CI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes:
ccache g++ ...it gotg++as an input file (error: no such file or directory: 'g++'). The flags are now taken withCompilers::identify, like clang.tidy.iwyuprofile configured the module underinit(it only implementscompile) and had nosrc, so CI never ran iwyu.formatprofile usedstyle: google, which ignores.clang-format(SortIncludes: false) and movedmkn/mod/init.hpplast, breaking the build. Nowstyle: file.headersargs are only passed for header files, previously.cppfiles were also checked as headers.typesaccepts space or:separated values as the README says,ignoreaccepts a list.mkn.yamldrops the${MKN_HOME}maiken dependency, only mkn.mod headers are used.apt-get updatebefore installing iwyu.New options:
fix: <args>: iwyu output is written to<build dir>/iwyu.outand passed tofix_includewith these args. Only the checked files are edited (iwyu also reports on headers of other projects),--basediris set so the paths match.fix: ""for fix_include defaults.system_last: true: withfix, system includes are moved after project includes in the files fix_include edited.Tested on Linux: module self-check, scratch projects, and mkn.avx (19 files edited, tests still build except
test_all, wheregrid.hppusesis_alignedfromvector.hppinside a template without including it). Windowscmd /cpath forfixis untested.