This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] Sort options in --dump-config
ClosedPublic

Authored by PiotrZSL on Jul 27 2023, 9:31 AM.

Details

Diff Detail

Event Timeline

PiotrZSL created this revision.Jul 27 2023, 9:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 27 2023, 9:31 AM
PiotrZSL requested review of this revision.Jul 27 2023, 9:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 27 2023, 9:31 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

Looks great, small comments!

clang-tools-extra/clang-tidy/ClangTidyOptions.cpp
89

Maybe add a one-line comment like Ensure check options are sorted to more quickly grasp what the block of code below does?

90

I believe you can pass this directly to the constructor in the previous line, to skip the reserve() part.

clang-tools-extra/test/clang-tidy/infrastructure/config-files.cpp
58

Use the long name of the option, i.e. --check, so it's easier to see what it's doing without having to check the manual.

PiotrZSL marked 3 inline comments as done.Jul 27 2023, 10:38 AM
PiotrZSL added inline comments.
clang-tools-extra/clang-tidy/ClangTidyOptions.cpp
90

No, constructor takes resize argument, not reserve.

PiotrZSL updated this revision to Diff 544852.Jul 27 2023, 10:38 AM
PiotrZSL marked an inline comment as done.

Review comments

carlosgalvezp accepted this revision.Jul 27 2023, 10:46 AM

LGTM, thanks for fixing!

clang-tools-extra/clang-tidy/ClangTidyOptions.cpp
90

You are right!

This revision is now accepted and ready to land.Jul 27 2023, 10:46 AM
This revision was landed with ongoing or failed builds.Jul 27 2023, 10:56 AM
This revision was automatically updated to reflect the committed changes.
thakis added a subscriber: thakis.Jul 27 2023, 12:10 PM

This might have broken tests: http://45.33.8.238/linux/113736/step_8.txt

Please take a look and revert for now if it takes a while to fix.

@thakis actually this test was already broken, simply folder '2' does not exist.. Let me fix that.
Thank you for information.

PiotrZSL reopened this revision.Jul 27 2023, 12:28 PM
This revision is now accepted and ready to land.Jul 27 2023, 12:28 PM

Thanks for the quick revert!

This revision was automatically updated to reflect the committed changes.