mirror of
https://github.com/google/styleguide.git
synced 2024-03-22 13:11:43 +08:00
8a87a46cc7
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_'. |
||
---|---|---|
.. | ||
cpplint_test_header.h |