Add github action and make targets for clang-tidy and iwyu. by dbaarda · Pull Request #229 · librsync/librsync

added 16 commits

August 18, 2021 23:00
This is a "linter" that checks code for errors, taken from PR librsync#222 by
riszotto.
It seems the ubuntu iwyu package has a bug where it's missing a dependency
containing the headers it needs.
This is to try and figure out why iwyu is still not finding standard headers.
This is the missing dependency needed by iwyu.
Fixed stats.c and sumset_test.c for minor clang warnings about unused values.
Always use FILENAME_H as the include guard name for filename.h. Also make
commens on include guards consistent.
This was mostly done by piping iwyu_tool output to `fix_include
--noblank_lines` with the exception of hashtable.h and its unittest which
required manual tweaking, plus a few manual tweaks in some places.

For fileutil.c it was excluded and only manually tweaked a tiny bit. It has
conditional includes based on config.h settings which seems to confuse
iwyu_tool and fix_includes to the point where it recommended removing several
of them which wouldn't compile any more.
This uses iwyu_tool output fed to `fix_include --noblank_lines` and excludes
fileutil.c which gets messed up by this.
Restructure the document into headings that better represent the development
processes. Update and expand the entries in each section to include new make
targets and github actions.

@dbaarda dbaarda changed the title Add clang-tidy and iwyu make targets and a lint.yml github action to run them. Add lint.yml github action and clang-tidy and iwyu make targets.

Aug 20, 2021

@dbaarda dbaarda changed the title Add lint.yml github action and clang-tidy and iwyu make targets. Add lint.yml github action and make targets for clang-tidy and iwyu.

Aug 20, 2021

@dbaarda dbaarda changed the title Add lint.yml github action and make targets for clang-tidy and iwyu. Add github action and make targets for clang-tidy and iwyu.

Aug 20, 2021

@dbaarda