[build-system] build-backend = "setuptools.build_meta" requires = [ "setuptools>=61.2" ] [project] name = "cpplint" description = "Check C++ files configurably against Google's style guide" readme = "README.rst" keywords = [ "c++", "cpp", "google style", "lint" ] license = { text = "BSD-3-Clause" } maintainers = [ { name = "Aaron Liu", email = "aaronliu0130@gmail.com" }, { name = "Christian Clauss", email = "cclauss@me.com" }, { name = "John Vandenberg", email = "jayvdb@gmail.com" }, ] authors = [ { name = "Google Inc." }, { name = "Thibault Kruse" }, { name = "Andrew Davis", email = "theandrewdavis@gmail.com" }, { name = "cpplint developers" }, ] requires-python = ">=3.9" classifiers = [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: End Users/Desktop", "License :: Freely Distributable", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: C++", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Topic :: Software Development :: Quality Assurance", ] dynamic = [ "version" ] dependencies = [ ] optional-dependencies.dev = [ "mypy", "pylint>=3.3.4", "pytest", "pytest-cov", "pytest-timeout", "testfixtures", "tox<5", ] urls.Homepage = "https://github.com/cpplint/cpplint" scripts.cpplint = "cpplint:main" [tool.setuptools] py-modules = [ "cpplint" ] include-package-data = false dynamic.version = { attr = "cpplint.__VERSION__" } [tool.ruff] line-length = 100 lint.select = [ "A", # flake8-builtins "AIR", # Airflow "ASYNC", # flake8-async "B", # flake8-bugbear "BLE", # flake8-blind-except "C4", # flake8-comprehensions "C90", # McCabe cyclomatic complexity "DJ", # flake8-django "DTZ", # flake8-datetimez "E", # pycodestyle "EM", # flake8-errmsg "EXE", # flake8-executable "F", # Pyflakes "FA", # flake8-future-annotations "FAST", # FastAPI "FBT", # flake8-boolean-trap "FIX", # flake8-fixme "FLY", # flynt "FURB", # refurb "G", # flake8-logging-format "I", # isort "ICN", # flake8-import-conventions "INP", # flake8-no-pep420 "INT", # flake8-gettext "ISC", # flake8-implicit-str-concat "LOG", # flake8-logging "N", # pep8-naming "NPY", # NumPy-specific rules "PD", # pandas-vet "PERF", # Perflint "PGH", # pygrep-hooks "PIE", # flake8-pie "PL", # Pylint "PT", # flake8-pytest-style "PYI", # flake8-pyi "Q", # flake8-quotes "RET", # flake8-return "RSE", # flake8-raise "SIM", # flake8-simplify "SLOT", # flake8-slots "T10", # flake8-debugger "TC", # flake8-type-checking "TD", # flake8-todos "TID", # flake8-tidy-imports "TRY", # tryceratops "UP", # pyupgrade "W", # pycodestyle "YTT", # flake8-2020 # "ANN", # flake8-annotations # "ARG", # flake8-unused-arguments # "COM", # flake8-commas # "CPY", # flake8-copyright # "D", # pydocstyle # "DOC", # pydoclint # "ERA", # eradicate # "PTH", # flake8-use-pathlib # "RUF", # Ruff-specific rules # "S", # flake8-bandit # "SLF", # flake8-self # "T20", # flake8-print ] lint.ignore = [ "FBT003", # flake8-boolean-trap "FIX002", # flake8-fixme "ISC003", # flake8-implicit-str-concat "PIE790", # Unnecessary `pass` statement "TD003", # flake8-todos ] lint.per-file-ignores."cpplint.py" = [ "ICN001", "N802", "PERF401", "PLR5501", "PLW0603", "PLW2901", "SIM102", "SIM108", ] lint.per-file-ignores."cpplint_unittest.py" = [ "FLY002", "N802", "PLW0604", "SIM115", "UP031" ] lint.mccabe.max-complexity = 29 lint.pylint.allow-magic-value-types = [ "bytes", "int", "str" ] lint.pylint.max-args = 10 # Default is 5 lint.pylint.max-bool-expr = 8 # Default is 5 lint.pylint.max-branches = 30 # Default is 12 lint.pylint.max-locals = 16 # Default is 15 lint.pylint.max-public-methods = 130 # Default is 20 lint.pylint.max-returns = 9 # Default is 9 lint.pylint.max-statements = 79 # Default is 50 [tool.pylint.basic] argument-rgx = "[a-z_][a-z0-9_]{0,49}$" class-rgx = "[A-Z_][a-zA-Z0-9]+$" const-rgx = "[a-zA-Z_][A-Za-z0-9_]{2,49}$" function-rgx = "[A-Z_][A-Za-z0-9]{2,49}$|main" include-naming-hint = true method-rgx = "[A-Z_][A-Za-z0-9]{2,49}$|__init__|__str__|__contains__" variable-rgx = "[a-z_][a-z0-9_]{0,49}$" [tool.pylint.messages-control] disable = [ "anomalous-unicode-escape-in-string", "bad-continuation", "bad-option-value", "consider-merging-isinstance", "consider-using-dict-comprehension", "consider-using-in", "consider-using-min-builtin", "fixme", "global-statement", "missing-docstring", "multiple-statements", "no-else-return", "no-self-use", "too-many-positional-arguments", "unnecessary-pass", "unused-argument", "useless-object-inheritance", ] [tool.pylint.reports] output-format = "colorized" reports = false score = false [tool.pylint.format] indent-after-paren = 4 indent-string = ' ' max-module-lines = 10000 [tool.pylint.design] max-args = 20 max-attributes = 10 max-bool-expr = 10 max-branches = 30 max-line-length = 100 max-locals = 25 max-returns = 10 max-statements = 79 min-public-methods = 0 [tool.pytest.ini_options] # fail if coverage is under 90% addopts = "--color=yes --cov=cpplint" python_files = [ "*test.py" ] required_plugins = [ "pytest-cov", "pytest-timeout" ] testpaths = [ "." ] timeout = 481