Skip to content

Conversation

@krisukox
Copy link
Contributor

@krisukox krisukox commented Jul 29, 2022

This PR:

  • removes few checks introduced between clang tidy 6 and 14 in order to enable bumping clang-format/clang-tidy to 14.
  • adds the WITHOUT_SWIFT_TYPES option to the swift_create_clang_tidy_targets function

Tested here:

@krisukox krisukox force-pushed the krisukox/clang-tidy-14 branch from 57366bb to 279d2e6 Compare August 2, 2022 08:57
@krisukox krisukox force-pushed the krisukox/clang-tidy-14 branch from 279d2e6 to 2a73bbb Compare August 2, 2022 08:59
@krisukox krisukox marked this pull request as draft August 4, 2022 12:19
Enable clang-tidy for targets created without swift_* functions
@krisukox krisukox marked this pull request as ready for review August 4, 2022 14:40
Copy link
Contributor

@jungleraptor jungleraptor left a comment

Choose a reason for hiding this comment

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

I'd also like to see these changes tested in Starling just as a precaution.

Edit: just saw the starling PR link!

message(WARNING "No sources to lint for clang-tidy-all, that doesn't sound right")
else()
list(REMOVE_DUPLICATES all_abs_srcs)
list(FILTER all_abs_srcs EXCLUDE REGEX "pb.cc")
Copy link
Contributor

Choose a reason for hiding this comment

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

What were these files?

Copy link
Contributor

Choose a reason for hiding this comment

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

Generated nanopb files? Used by real-time replay and fast start

@silverjam silverjam removed their request for review August 4, 2022 21:42
starling-util
SOURCE_DIR starling
SYSTEM_HEADER_FILE "pvt_driver/runner/pvt_runner.h"
SYSTEM_INCLUDES
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting. Starling is already using these linting settings so I'm surprised its headers are causing linting issues.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had a problem with starling-replay headers in the orion-engine PR.
We don't want to update the linter in the orion-engine right now, so I reverted this change.

Copy link
Contributor

@jungleraptor jungleraptor left a comment

Choose a reason for hiding this comment

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

find_program(CLANG_TIDY NAMES clang-tidy-6.0 clang-tidy)

We're going to want to change this from clang-tidy-6.0 to clang-tidy-14

We should probably do the same thing for ClangFormat.cmake

@woodfell @RReichert will we break anything if we make it:

find_program(CLANG_FORMAT NAMES clang-format-14 clang-format)

instead of that long list of names ??

@jungleraptor
Copy link
Contributor

Did some light testing on mac and seems to work well.

I was also curious if clang-tidy-6.0 would be able to handle the new .clang-tidy file and that seems to work fine as well.

@krisukox krisukox requested a review from jungleraptor August 22, 2022 18:00
Copy link
Contributor

@jungleraptor jungleraptor left a comment

Choose a reason for hiding this comment

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

LGTM

@jungleraptor
Copy link
Contributor

@RReichert @woodfell anything you'd like to add before we merge?

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@krisukox krisukox merged commit 24e2281 into master Aug 24, 2022
@krisukox krisukox deleted the krisukox/clang-tidy-14 branch August 24, 2022 16:44
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