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.cfg root=setting is now relative to CFG file.
Also further improve the documentation and testing around --root. Previously the root=setting in the CFG file was treated identically to passing --root=setting on the command line, which seems undesirable since it depends on were cpplint.cfg was invoked from (for relative paths). Judging on settings such as 'exclude_files' it seems within the spirit to make the settings 'current working directory' contextual to the same directory that CPPLINT.cfg is in. This also makes execution consistent (picking up the "correct" settings) regardless of the CWD when executing cpplint.py. Example: echo 'root=..' >> /a/b/c/CPPLINT.cfg cd / cpplint.py /a/b/c/source_file.h # expects header guard of C_SOURCE_FILE_H_ However the old behavior would use '/../' = '/' and incorrectly think the root was 'A_B_C_SOURCE_FILE_H_'.
- Loading branch information
Showing
3 changed files
with
63 additions
and
6 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// A test header for cpplint_unittest.py. |