Debian Codegraph @

pyproject.toml

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
1 [build-system]
2 build-backend = "setuptools.build_meta"
3 requires = [ "setuptools>=61.2" ]
4
5 [project]
6 name = "cpplint"
7 description = "Check C++ files configurably against Google's style guide"
8 readme = "README.rst"
9 keywords = [ "c++", "cpp", "google style", "lint" ]
10 license = { text = "BSD-3-Clause" }
11 maintainers = [
12 { name = "Aaron Liu", email = "[email protected]" },
13 { name = "Christian Clauss", email = "[email protected]" },
14 { name = "John Vandenberg", email = "[email protected]" },
15 ]
16 authors = [
17 { name = "Google Inc." },
18 { name = "Thibault Kruse" },
19 { name = "Andrew Davis", email = "[email protected]" },
20 { name = "cpplint developers" },
21 ]
22 requires-python = ">=3.9"
23 classifiers = [
24 "Development Status :: 5 - Production/Stable",
25 "Environment :: Console",
26 "Intended Audience :: End Users/Desktop",
27 "License :: Freely Distributable",
28 "License :: OSI Approved :: BSD License",
29 "Natural Language :: English",
30 "Programming Language :: C++",
31 "Programming Language :: Python :: 3 :: Only",
32 "Programming Language :: Python :: 3.9",
33 "Programming Language :: Python :: 3.10",
34 "Programming Language :: Python :: 3.11",
35 "Programming Language :: Python :: 3.12",
36 "Programming Language :: Python :: 3.13",
37 "Topic :: Software Development :: Quality Assurance",
38 ]
39 dynamic = [ "version" ]
40 dependencies = [ ]
41
42 optional-dependencies.dev = [
43 "mypy",
44 "pylint>=3.3.4",
45 "pytest",
46 "pytest-cov",
47 "pytest-timeout",
48 "testfixtures",
49 "tox<5",
50 ]
51 urls.Homepage = "https://github.com/cpplint/cpplint"
52 scripts.cpplint = "cpplint:main"
53
54 [tool.setuptools]
55 py-modules = [ "cpplint" ]
56 include-package-data = false
57 dynamic.version = { attr = "cpplint.__VERSION__" }
58
59 [tool.ruff]
60 line-length = 100
61 lint.select = [
62 "A", # flake8-builtins
63 "AIR", # Airflow
64 "ASYNC", # flake8-async
65 "B", # flake8-bugbear
66 "BLE", # flake8-blind-except
67 "C4", # flake8-comprehensions
68 "C90", # McCabe cyclomatic complexity
69 "DJ", # flake8-django
70 "DTZ", # flake8-datetimez
71 "E", # pycodestyle
72 "EM", # flake8-errmsg
73 "EXE", # flake8-executable
74 "F", # Pyflakes
75 "FA", # flake8-future-annotations
76 "FAST", # FastAPI
77 "FBT", # flake8-boolean-trap
78 "FIX", # flake8-fixme
79 "FLY", # flynt
80 "FURB", # refurb
81 "G", # flake8-logging-format
82 "I", # isort
83 "ICN", # flake8-import-conventions
84 "INP", # flake8-no-pep420
85 "INT", # flake8-gettext
86 "ISC", # flake8-implicit-str-concat
87 "LOG", # flake8-logging
88 "N", # pep8-naming
89 "NPY", # NumPy-specific rules
90 "PD", # pandas-vet
91 "PERF", # Perflint
92 "PGH", # pygrep-hooks
93 "PIE", # flake8-pie
94 "PL", # Pylint
95 "PT", # flake8-pytest-style
96 "PYI", # flake8-pyi
97 "Q", # flake8-quotes
98 "RET", # flake8-return
99 "RSE", # flake8-raise
100 "SIM", # flake8-simplify
101 "SLOT", # flake8-slots
102 "T10", # flake8-debugger
103 "TC", # flake8-type-checking
104 "TD", # flake8-todos
105 "TID", # flake8-tidy-imports
106 "TRY", # tryceratops
107 "UP", # pyupgrade
108 "W", # pycodestyle
109 "YTT", # flake8-2020
110 # "ANN", # flake8-annotations
111 # "ARG", # flake8-unused-arguments
112 # "COM", # flake8-commas
113 # "CPY", # flake8-copyright
114 # "D", # pydocstyle
115 # "DOC", # pydoclint
116 # "ERA", # eradicate
117 # "PTH", # flake8-use-pathlib
118 # "RUF", # Ruff-specific rules
119 # "S", # flake8-bandit
120 # "SLF", # flake8-self
121 # "T20", # flake8-print
122 ]
123 lint.ignore = [
124 "FBT003", # flake8-boolean-trap
125 "FIX002", # flake8-fixme
126 "ISC003", # flake8-implicit-str-concat
127 "PIE790", # Unnecessary `pass` statement
128 "TD003", # flake8-todos
129 ]
130 lint.per-file-ignores."cpplint.py" = [
131 "ICN001",
132 "N802",
133 "PERF401",
134 "PLR5501",
135 "PLW0603",
136 "PLW2901",
137 "SIM102",
138 "SIM108",
139 ]
140 lint.per-file-ignores."cpplint_unittest.py" = [ "FLY002", "N802", "PLW0604", "SIM115", "UP031" ]
141 lint.mccabe.max-complexity = 29
142 lint.pylint.allow-magic-value-types = [ "bytes", "int", "str" ]
143 lint.pylint.max-args = 10 # Default is 5
144 lint.pylint.max-bool-expr = 8 # Default is 5
145 lint.pylint.max-branches = 30 # Default is 12
146 lint.pylint.max-locals = 16 # Default is 15
147 lint.pylint.max-public-methods = 130 # Default is 20
148 lint.pylint.max-returns = 9 # Default is 9
149 lint.pylint.max-statements = 79 # Default is 50
150
151 [tool.pylint.basic]
152 argument-rgx = "[a-z_][a-z0-9_]{0,49}$"
153 class-rgx = "[A-Z_][a-zA-Z0-9]+$"
154 const-rgx = "[a-zA-Z_][A-Za-z0-9_]{2,49}$"
155 function-rgx = "[A-Z_][A-Za-z0-9]{2,49}$|main"
156 include-naming-hint = true
157 method-rgx = "[A-Z_][A-Za-z0-9]{2,49}$|__init__|__str__|__contains__"
158 variable-rgx = "[a-z_][a-z0-9_]{0,49}$"
159
160 [tool.pylint.messages-control]
161 disable = [
162 "anomalous-unicode-escape-in-string",
163 "bad-continuation",
164 "bad-option-value",
165 "consider-merging-isinstance",
166 "consider-using-dict-comprehension",
167 "consider-using-in",
168 "consider-using-min-builtin",
169 "fixme",
170 "global-statement",
171 "missing-docstring",
172 "multiple-statements",
173 "no-else-return",
174 "no-self-use",
175 "too-many-positional-arguments",
176 "unnecessary-pass",
177 "unused-argument",
178 "useless-object-inheritance",
179 ]
180
181 [tool.pylint.reports]
182 output-format = "colorized"
183 reports = false
184 score = false
185
186 [tool.pylint.format]
187 indent-after-paren = 4
188 indent-string = ' '
189 max-module-lines = 10000
190
191 [tool.pylint.design]
192 max-args = 20
193 max-attributes = 10
194 max-bool-expr = 10
195 max-branches = 30
196 max-line-length = 100
197 max-locals = 25
198 max-returns = 10
199 max-statements = 79
200 min-public-methods = 0
201
202 [tool.pytest.ini_options]
203 # fail if coverage is under 90%
•204 addopts = "--color=yes --cov=cpplint"
205 python_files = [ "*test.py" ]
206 required_plugins = [ "pytest-cov", "pytest-timeout" ]
207 testpaths = [ "." ]
208 timeout = 481