This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] Refresh the add_new_check.py now that we use a table + autofix
ClosedPublic

Authored by sylvestre.ledru on Jan 8 2020, 3:24 PM.

Diff Detail

Event Timeline

sylvestre.ledru created this revision.Jan 8 2020, 3:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 8 2020, 3:24 PM
Herald added a subscriber: mgorny. · View Herald Transcript

remove artifcats

Harbormaster completed remote builds in B43540: Diff 236922.
Harbormaster completed remote builds in B43541: Diff 236923.

Fix some rst warnings

Eugene.Zelenko retitled this revision from Refresh the add_new_check.py now that we use a table + autofix to [clang-tidy] Refresh the add_new_check.py now that we use a table + autofix.Jan 8 2020, 4:02 PM
Eugene.Zelenko added a project: Restricted Project.

Thanks for this, Also how would you feel about adding a parameter to the script that could create alias definitions in much the same way?

It finds some stuff that I missed in the list :)

Thanks for this, Also how would you feel about adding a parameter to the script that could create alias definitions in much the same way?

Do you have more details about your expectation? I could have a look but in a separate commit :)

Thanks for this, Also how would you feel about adding a parameter to the script that could create alias definitions in much the same way?

Do you have more details about your expectation? I could have a look but in a separate commit :)

An example says it best

py add_new_check.py awesome make-unique --alias modernize make-unqiue

Running that would create a new check in the Awesome module called make-unique that is just an alias for modernize-make-unique. doing the necessary things like updating the list.rst, creating a blank doc that just redirects to modernize-make-unique and adding the 'New Alias check' for the release notes

alexfh accepted this revision.Jan 9 2020, 7:38 AM

Awesome! Thanks for updating the script! A few nits, otherwise LG, if this works.

clang-tools-extra/clang-tidy/add_new_check.py
308

nit: Space after the comma.

316

nit: They are not completely stupid, they are just simple and naive ;)
Also, please add a trailing period.

328–329

Trailing period.

350

nit: The script uses a_different_naming_style.

353

Trailing period.

372

Is there a way to let sphinx find out column widths itself?

This revision is now accepted and ready to land.Jan 9 2020, 7:38 AM
sylvestre.ledru marked 5 inline comments as done.Jan 9 2020, 1:09 PM
sylvestre.ledru added inline comments.
clang-tools-extra/clang-tidy/add_new_check.py
372

TIL, sphinx doesn't need this indeed!

This revision was automatically updated to reflect the committed changes.