Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve O2 linter #10097

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Improve O2 linter #10097

wants to merge 15 commits into from

Conversation

vkucera
Copy link
Collaborator

@vkucera vkucera commented Feb 19, 2025

external-pi

  • Fix false positives where M_PI is preceded by a character.

pi-multiple-fraction

  • Fix false positives for multiples of correct constants for pi fractions (e.g. 2 * PIThird).

pdg/explicit-code

  • Improve matching pattern to spot more cases, especially comparison expressions.

name/function-variable

  • Fix false positives for concepts and explicit constructors.

name/constexpr-constant

  • Test only part before the first # to avoid false positives inside macros.

name/o2-column

  • Test only parts before the first # to avoid false positives inside macros.

name/o2-table

  • Test only part before the first # to avoid false positives inside macros.

name/type

  • Detect also concepts to be treated as types.

name/workflow-file

  • Detect from the path, whether to expect a mandatory PWG prefix (currently only for HF) in the struct name or an optional one (other PWGs).
  • Look for any struct name that is an identifier.

Extend the message about disabling to clarify that the option exists for exceptional cases and require a comment with a reason for disabling. This will help to see whether a test was disabled because of a false positive, special case, misunderstanding or is just hiding bad code.

Report numbers of disabled issues.

@vkucera vkucera marked this pull request as ready for review February 19, 2025 22:00
@vkucera vkucera marked this pull request as draft February 19, 2025 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants