This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] Ignore DISABLED_ in test suite name in google-avoid-underscore-in-googletest-name
ClosedPublic

Authored by carlosgalvezp on Mar 22 2023, 11:50 AM.

Details

Summary

Test suite name can also be disabled with DISABLED_, not just
the test case name.

Fix also broken link in the test that refers to the explanation
as to why underscores may not be used.

Diff Detail

Event Timeline

carlosgalvezp created this revision.Mar 22 2023, 11:50 AM
Herald added a project: Restricted Project. · View Herald Transcript
carlosgalvezp requested review of this revision.Mar 22 2023, 11:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 22 2023, 11:50 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

Add to release notes.

carlosgalvezp retitled this revision from [clang-tidy] Ignore more DISABLED_ in google-avoid-underscore-in-googletest-name to [clang-tidy] Ignore DISABLED_ in test suite name in google-avoid-underscore-in-googletest-name.

Update commit message

Remove excessive newline

clang-tools-extra/docs/ReleaseNotes.rst
237

Please keep alphabetical order (by check name) in this section.

PiotrZSL accepted this revision.Mar 22 2023, 1:34 PM
This revision is now accepted and ready to land.Mar 22 2023, 1:34 PM
PiotrZSL added inline comments.Mar 22 2023, 2:34 PM
clang-tools-extra/test/clang-tidy/checkers/google/avoid-underscore-in-googletest-name.cpp
90

Would be good if this link would exist also in documentation for this check.

clang-tools-extra/test/clang-tidy/checkers/google/avoid-underscore-in-googletest-name.cpp
90

My experience has been that these external links move around with gtest and are a source of churn.

carlosgalvezp added inline comments.Mar 23 2023, 12:18 AM
clang-tools-extra/docs/ReleaseNotes.rst
237

I was planning to do that but noticed that the alphabetical order is already broken. It seems to be a source of friction and there's no official documentation that states it should be done like that, so I can understand if it gets broken often. Do you know if this is documented somewhere? If not, do we see value in keeping this convention? I suppose now we would need an NFC patch to fix the order again, causing churn.

clang-tools-extra/test/clang-tidy/checkers/google/avoid-underscore-in-googletest-name.cpp
90

Good point, I can add on a separate NFC patch :) I believe if we use the github.io (instead of github.com) the links can be a bit more stable.

PiotrZSL added inline comments.Mar 23 2023, 12:38 AM
clang-tools-extra/docs/ReleaseNotes.rst
237

I run into same issue also. I would say, let leave it as it is, and fix it with one commit at the end of release.

carlosgalvezp added inline comments.Mar 23 2023, 1:05 AM
clang-tools-extra/docs/ReleaseNotes.rst
237

Good idea, let's do that!

Eugene.Zelenko added inline comments.Mar 23 2023, 7:10 AM
clang-tools-extra/docs/ReleaseNotes.rst
237

Often it's also broken after rebases which may be automatic.

Eugene.Zelenko added inline comments.Mar 23 2023, 7:22 AM
clang-tools-extra/docs/ReleaseNotes.rst
237

Anyway, some kind of order is much better than disorder.

carlosgalvezp added inline comments.Mar 23 2023, 9:37 AM
clang-tools-extra/docs/ReleaseNotes.rst
237

Definitely. Could we stick to some simple convention? For example always append or prepend to the list of modifications to checks. Then before release we put up a patch for reordering.

clang-tools-extra/docs/ReleaseNotes.rst
237

I think it will be harder to reader. Sorting by check name is much better in this respect. And this was used in many releases.

carlosgalvezp added inline comments.Mar 24 2023, 12:24 AM
clang-tools-extra/docs/ReleaseNotes.rst
237

To clarify, what I mean is:

  • Apply a simple convention (e.g. append or prepend to the list) while developing.
  • Right before creating a release, put up a patch to sort alphabetically. Then it will be easy to read for users when it's released.

Or do you mean that the list shall be alphabetically sorted at all times?

Eugene.Zelenko added inline comments.Mar 24 2023, 7:14 AM
clang-tools-extra/docs/ReleaseNotes.rst
237

It'll be much easier to sort partially sorted list at release time than completely unsorted.