| 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", |
| 63 |
"AIR", |
| 64 |
"ASYNC", |
| 65 |
"B", |
| 66 |
"BLE", |
| 67 |
"C4", |
| 68 |
"C90", |
| 69 |
"DJ", |
| 70 |
"DTZ", |
| 71 |
"E", |
| 72 |
"EM", |
| 73 |
"EXE", |
| 74 |
"F", |
| 75 |
"FA", |
| 76 |
"FAST", |
| 77 |
"FBT", |
| 78 |
"FIX", |
| 79 |
"FLY", |
| 80 |
"FURB", |
| 81 |
"G", |
| 82 |
"I", |
| 83 |
"ICN", |
| 84 |
"INP", |
| 85 |
"INT", |
| 86 |
"ISC", |
| 87 |
"LOG", |
| 88 |
"N", |
| 89 |
"NPY", |
| 90 |
"PD", |
| 91 |
"PERF", |
| 92 |
"PGH", |
| 93 |
"PIE", |
| 94 |
"PL", |
| 95 |
"PT", |
| 96 |
"PYI", |
| 97 |
"Q", |
| 98 |
"RET", |
| 99 |
"RSE", |
| 100 |
"SIM", |
| 101 |
"SLOT", |
| 102 |
"T10", |
| 103 |
"TC", |
| 104 |
"TD", |
| 105 |
"TID", |
| 106 |
"TRY", |
| 107 |
"UP", |
| 108 |
"W", |
| 109 |
"YTT", |
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
] |
| 123 |
lint.ignore = [ |
| 124 |
"FBT003", |
| 125 |
"FIX002", |
| 126 |
"ISC003", |
| 127 |
"PIE790", |
| 128 |
"TD003", |
| 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 |
| 144 |
lint.pylint.max-bool-expr = 8 |
| 145 |
lint.pylint.max-branches = 30 |
| 146 |
lint.pylint.max-locals = 16 |
| 147 |
lint.pylint.max-public-methods = 130 |
| 148 |
lint.pylint.max-returns = 9 |
| 149 |
lint.pylint.max-statements = 79 |
| 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 |
|
| •204 |
addopts = "--color=yes --cov=cpplint" |
| 205 |
python_files = [ "*test.py" ] |
| 206 |
required_plugins = [ "pytest-cov", "pytest-timeout" ] |
| 207 |
testpaths = [ "." ] |
| 208 |
timeout = 481 |