-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCPPLINT.cfg
More file actions
72 lines (56 loc) · 2.59 KB
/
Copy pathCPPLINT.cfg
File metadata and controls
72 lines (56 loc) · 2.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# This is a sample CPPLINT.cfg file.
# Lines starting with '#' are comments and are ignored.
# You can put this file in your project's root directory or in any subdirectory.
# cpplint will automatically find the closest CPPLINT.cfg file in the directory hierarchy.
# --- Global Settings ---
# The 'set noparent' option prevents cpplint from looking for configuration
# files in parent directories. This is useful for ensuring that only the
# current directory's configuration is used.
set noparent
# --- Check Control ---
# 'filter=-' is a powerful way to disable a specific check or a group of checks.
# You can add or subtract checks from the default set.
# The format is 'filter=-<category>'.
# Disables a specific check for a specific issue.
# This check prevents a common error with using `new` and `delete` in header files.
# filter=-build/class
# Disables a group of checks.
# For example, checks related to include order and style are often
# customized or disabled.
# filter=-readability/todo,-readability/casting,-readability/braces,-readability/namespace
# filter=-runtime/casting
# filter=-build/include_order
filter=-legal/copyright
filter=-readability/alt_tokens
filter=-build/c++11
# You can also enable checks that are disabled by default.
# The format is 'filter=+<category>'.
# This check is for specific formatting issues with forward declarations.
# filter=+readability/braces
filter=-readability/inheritance
filter=-build/header_guard
filter=-readability/nolint
# --- Line Length ---
# 'linelength' sets the maximum number of characters per line. The default is 80.
# You can increase this value if your project has a different style guide.
# A common alternative is 100 or 120.
linelength=100
# --- File Extensions ---
# 'extensions' specifies which file extensions cpplint should analyze.
# The default includes .h, .cc, .cpp, .cxx, etc.
# You can add or remove extensions as needed.
# For example, adding .cu for CUDA files or .tpp for template implementation files.
extensions=cpp,cc,cxx,hpp,tpp,cu
# --- Project-Specific Paths ---
# 'root' is used to define the root directory of your project.
# It helps in enforcing include path checks, such as forbidding `..` in includes.
root=src/
# filter=-src/bcrypt/
# exclude_files=tests/*
# You can define a list of ignored files or directories.
# The 'exclude_files' and 'exclude_dirs' options allow for this.
# This is useful for third-party libraries or generated code.
# exclude_dirs=third_party,generated_files
# exclude_files=test_*.cc,my_script.cpp
# Example of using a wildcard for excluding multiple files.
# exclude_files=third_party/*.cc,generated_code/*