forked from google/styleguide
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cpplint --root: support non-subdirectories
Using cpplint.py --root with directories at a more outer level will now prepend the header guard with all the directories from the root to the file. For example given ls /a/b/c # /a/b/c/.git /a/b/c/filename.h cpplint.py --root=/a/b /a/b/c/filename.h # C_FILENAME_H_ # no root behavior: cpplint.py /a/b/c/filename.h # FILENAME_H_ Also supports relative paths: cd /a/b/c cpplint.py --root=.. filename.h # C_FILENAME_H_ Note that the old usage is still supported: cd /a/b/c mkdir -p d/e/f touch /a/b/c/d/e/f/filename.h cpplint.py --root=d/e/f d/e/f/filename.h # FILENAME_H_ which would "strip" the prefix rather than prepend an extra prefix. (Invalid root prefixes are as before also ignored)
- Loading branch information
Showing
2 changed files
with
108 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters