Skip to content

Conversation

@RReichert
Copy link
Contributor

@RReichert RReichert commented Feb 26, 2021

Made a change to the clang-tidy stage so that it prefers using the parallel script for launching clang-tidy static analysis over using the single threaded approach.

)
add_custom_target(clang-tidy-all-check
COMMAND test ! -f fixes.yaml
COMMAND test ! -s fixes.yaml
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with run-clang-tidy script, it always produces a fixes.yaml, irrespective of whether or not there is an error, so now it tests to make sure to fail if there a file AND its size is greater than zero.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How long until someone checks in an empty fixes.yaml...? 😄

@RReichert RReichert changed the title allow for clang-tidy to be parallized by using the run-clang-tidy scr… ESD-1959 allow for clang-tidy to be parallized by using the run-clang-tidy scr… Feb 26, 2021
@RReichert RReichert requested a review from woodfell February 26, 2021 09:05
Copy link
Contributor

@woodfell woodfell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

set(x_CLANG_TIDY_NAMES
run-clang-tidy run-clang-tidy.py
run-clang-tidy-6.0 run-clang-tidy-6.0.py
run-clang-tidy-4.0 run-clang-tidy-4.0.py
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably just ditch any version other than 6. This is only here fot legacy reasons and lower versions probably won't work properly.

@RReichert RReichert merged commit fc82f41 into master Feb 28, 2021
@RReichert RReichert deleted the rodrigor/ESD-1959-run-clang-tidy branch February 28, 2021 08:56
@RReichert
Copy link
Contributor Author

This PR needed to be removed from master for a couple of reasons:

  1. was failing with libpal because unlike clang-tidy, the files passed onto run-clang-tidy script are interpreted as regular expressions, so it fails with pal++ folder
  2. in starling the reason its taking longer than expected is because some files are being run twice, don't know

Anyways the attempt of trying to avoid creating a new function and just piggy back off of the old PR is not working, will need to rewrite the implementation as a new PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants