This repository was archived by the owner on Mar 24, 2026. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathCPPLINT.cfg
More file actions
63 lines (59 loc) · 3.3 KB
/
Copy pathCPPLINT.cfg
File metadata and controls
63 lines (59 loc) · 3.3 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
set noparent
# Treat the repo root as CPPLINT's include root so
# relative includes under src/ and include/ are resolved
# consistently.
root=.
# Match the existing C++ code: allow lines
# longer than 80 characters while targeting 120
# as the preferred maximum for new code.
linelength=120
# Align CPPLINT with the project's conventions:
# - Header guards use ORO_* names instead of the default
# path-derived style expected by cpplint.
# - Many headers are included via relative paths such as
# "../env.hh", which is intentional; translation units
# frequently pull in Oro headers that themselves include
# standard headers (we do not require strict
# include-what-you-use for every symbol).
# - Namespaces are closed without mandatory trailing
# comments; we only add them when clarity requires it.
# - Namespace contents are indented by two spaces; we do
# not follow the flat (no-indent) namespace style.
# - Function signatures use a space before the parameter
# list (e.g. `void URL::set ()`), which conflicts with
# cpplint's whitespace/parens rule.
# - Modern C++ (C++20) features such as `auto`, `nullptr`,
# and lambdas are used throughout; we do not treat them
# as violations.
# - Non-const references are accepted as parameters (see
# `Router::Router (bridge::Bridge& bridge)` in CODE_STYLE.md).
# - TODO markers use a mix of styles (`TODO`, `TODO(name)`,
# `@TODO`) that differ from cpplint's expectations.
# - We do not enforce cpplint's C/C++/other include
# ordering rules; Oro headers are often grouped by
# subsystem instead.
# - We allow modern standard headers (e.g. <filesystem>)
# under our C++20 baseline.
# - We do not rely on cpplint to enforce storage-class
# placement, thread-safe function variants, or fixed-
# width integer types; those are handled via code review.
# - C-style casts are accepted where interoperating with
# C APIs and platform SDKs; cpplint's C++-only casting
# advice does not apply cleanly there.
# - Inline comment spacing follows existing files; we do
# not require two spaces before end-of-line comments.
# - Vendored headers such as the ASN.1 parser
# definitions use tabs for alignment; we do not rely
# on cpplint to enforce tab-free formatting there.
# - We treat the historical >120 character lines as
# legacy; new code should prefer 120 but we do not
# have cpplint enforce line length today.
# - License headers are enforced by project policy rather
# than the tool.
filter=-build/header_guard,-build/include_subdir,-build/include_order,-build/include_what_you_use,-build/include,-build/namespaces,-build/c++11,-build/c++17,-build/storage_class,-runtime/references,-runtime/threadsafe_fn,-runtime/explicit,-runtime/int,-runtime/operator,-runtime/printf,-readability/todo,-readability/namespace,-readability/casting,-readability/braces,-whitespace/parens,-whitespace/indent_namespace,-whitespace/indent,-whitespace/comments,-whitespace/newline,-whitespace/tab,-whitespace/todo,-whitespace/line_length,-whitespace/comma,-legal/copyright
# Skip non-runtime trees and build artifacts when running
# cpplint recursively from the repository root. Note that
# `exclude_files` here only matches the immediate path
# segment under this directory (e.g. "build", not nested
# subdirectories), so we keep this list to top-level dirs.
exclude_files=build|tmp|node_modules|rust