Branch: refs/heads/main
Revision: 00a0191
Author: aconsroe-hpe
Link: Add rewrite of lint tool using libclang by aconsroe-hpe · Pull Request #19232 · chapel-lang/chapel · GitHub
Log Message:
Merge pull request #19232 from aconsroe-hpe/next-linter-rewrite
Add rewrite of lint tool using libclang
reviewed by @mppf
This reimplements the functionality in dyno/util/lint using a more
proper approach building off clang directly.
The exact functionality of dyno/util/lint -- which was checking for unused this fields in certain methods -- is implemented in linters/fieldsUsed.cpp with the idea that other linters might be added in the future.
Performance is better than before, but we do still end up checking
each method in each TU it appears in. This is a feature when checking
a single file, b/c it forces checking everything you've included, but
a downside when checking our whole project b/c we end up duplicating work.
This also adds a Github CI action to run the toplevel make target run-dyno-linters, which I've tested in the course of this PR; first to get it running, properly observing that lint errors are reported and mark the check as failed; and then with further commits that fix these errors, make the check pass.
A typical run length on GH for the new CI action is ~2m
Modified Files:
A compiler/dyno/util/CMakeLists.txt
A compiler/dyno/util/linters/CMakeLists.txt
A compiler/dyno/util/linters/fieldsUsed.cpp
A compiler/next/util/CMakeLists.txt
M .github/workflows/CI.yml
M Makefile.devel
M compiler/dyno/CMakeLists.txt
M compiler/dyno/Makefile.help
M compiler/dyno/include/chpl/queries/UniqueString.h
M compiler/dyno/include/chpl/resolution/resolution-types.h
M compiler/dyno/lib/queries/ErrorMessage.cpp
M compiler/dyno/lib/queries/UniqueString.cpp
M compiler/dyno/lib/uast/BuilderResult.cpp
M compiler/dyno/util/lint
Compare: https://github.com/chapel-lang/chapel/compare/216f3d279825...00a019179178