Repository navigation
[Infrastructure] Add O2 linter - #7066
Conversation
|
This PR has not been updated in the last 30 days. Is it still needed? Unless further action is taken, it will be closed in 5 days. |
|
This PR has not been updated in the last 30 days. Is it still needed? Unless further action is taken, it will be closed in 5 days. |
|
I like this, why is it still draft? |
Pending discussion with @ddobrigk about what to enforce and what not. |
|
I have been running a previous version (two days old) on a few of my source files and found two things so far which I guess haven't been modified
Thanks @vkucera for the tremendous work!!! |
Hi @victor-gonzalez , thanks a lot for the testing and your report. Can you please send me links to the code in question so that I can have a look and see what the linter should do in those cases? |
|
@ddobrigk Ready to go! |
|
Merging following also discussion on Monday the 25th November. Thanks @vkucera ! |
Co-authored-by: ALICE Builder <alibuild@users.noreply.github.com>
Co-authored-by: ALICE Builder <alibuild@users.noreply.github.com>
Co-authored-by: ALICE Builder <alibuild@users.noreply.github.com>
Co-authored-by: ALICE Builder <alibuild@users.noreply.github.com>
Co-authored-by: ALICE Builder <alibuild@users.noreply.github.com>
Adds a GitHub action that runs a script that checks for O2-specific issues in the code.
The script can run standalone, taking paths of files as arguments.
When running in the GitHub action on the pull_request event, the script tests files modified by the PR and generates error messages as GitHub annotations which appear as comments on the relevant lines or at the top of the file in case of per-file tests.
When running in the GitHub action on the push event, the script tests files modified in the branch w.r.t. the main branch and does not produce annotations.
False positives should be rare but, if any, they can be silenced per line for most of the tests by adding a comment in a given format.
Implements the following tests.
Bad practice:
iostreamstdnamespacestd::prefix for common names from thestdnamespaceTDatabasePDGMass()for a known PDG codeforloopsprocessfunction subscriptionsdefineDataProcessingDocumentation:
Naming conventions:
constexprconstantsPWG-HF specific conventions: