This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] Python script for easy check rename
ClosedPublic

Authored by PiotrZSL on Oct 5 2015, 10:41 AM.

Details

Summary

Script can rename check that is in same module - I found it useful.

Diff generated in root directory of clang-tools-extra project.

Diff Detail

Repository
rL LLVM

Event Timeline

PiotrZSL updated this revision to Diff 36528.Oct 5 2015, 10:41 AM
PiotrZSL retitled this revision from to [clang-tidy] Python script for easy check rename.
PiotrZSL updated this object.
PiotrZSL set the repository for this revision to rL LLVM.
PiotrZSL added a subscriber: cfe-commits.
mgehre added a subscriber: mgehre.Oct 7 2015, 12:28 PM
mgehre added inline comments.
clang-tidy/rename_check.py
40

Should be

Usage: rename_check.py <module> <oldcheckcheck> <newcheckname>

?

alexfh added inline comments.Oct 7 2015, 12:34 PM
clang-tidy/rename_check.py
4

Please update the script name and description in the comment.

19

Please use 2 spaces for indentation.

40

New check name is missing.

53

This should be updated similarly to the add_new_check.py change in http://reviews.llvm.org/D13313.

65

Would be nice, if this script took care of updating the file comments in .h and .cpp files including it's padding with dashes, e.g.:

//===--- ProTypeReinterpretCastCheck.cpp - clang-tidy--------------------------===//
PiotrZSL updated this revision to Diff 36801.Oct 7 2015, 2:48 PM

Corrected review issues.

PiotrZSL marked 5 inline comments as done.Oct 7 2015, 2:49 PM
PiotrZSL added inline comments.
clang-tidy/rename_check.py
53

Not sure what you mean...

alexfh added inline comments.Oct 7 2015, 6:07 PM
clang-tidy/rename_check.py
53

I meant that after that patch the module file name can be more complex. However, this doesn't seem relevant as you don't generate the module file name.

PiotrZSL marked 3 inline comments as done.Oct 9 2015, 4:49 AM
alexfh accepted this revision.Oct 9 2015, 8:21 AM
alexfh edited edge metadata.

Looks good. Do you have commit rights? If no, please have someone commit this for you. I won't be able to help with this soon, unfortunately.

This revision is now accepted and ready to land.Oct 9 2015, 8:21 AM

No, I don't have commits rights

PiotrZSL closed this revision.Oct 11 2015, 1:00 AM