From 57da9a8bab9b4a85e989340c8e3c79da3f817de1 Mon Sep 17 00:00:00 2001 From: taikitanaka3 <65527974+taikitanaka3@users.noreply.github.com> Date: Tue, 30 Nov 2021 19:26:56 +0900 Subject: [PATCH] ci(config): add missing CPPLINT.cfg (#47) * Add settings for new formatters (#2330) * Update .pre-commit-config.yaml Signed-off-by: Kenji Miyake * Ignore .cu for cpplint Signed-off-by: Kenji Miyake * Update .clang-format Signed-off-by: Kenji Miyake * Add setup.cfg Signed-off-by: Kenji Miyake * Add CPPLINT.cfg Signed-off-by: Kenji Miyake * Add autoware-lint-common Signed-off-by: Kenji Miyake * Remove unnecessary part Signed-off-by: Kenji Miyake * Add includeorder=standardcfirst Signed-off-by: Kenji Miyake * Use clang-format-12 Signed-off-by: Kenji Miyake * Add IncludeCategories to clang-format Signed-off-by: Kenji Miyake * Remove unnecessary file Signed-off-by: Kenji Miyake * Temporarily comment out pre-commit hooks Signed-off-by: Kenji Miyake * Fix indent miss Signed-off-by: Kenji Miyake * Change include order rule and ignore build/include_order in cpplint Signed-off-by: Kenji Miyake * ci(pre-commit): autofix Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .gitignore | 1 - CPPLINT.cfg | 13 +++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 CPPLINT.cfg diff --git a/.gitignore b/.gitignore index 70254bd0936f2..5ce2c268169c8 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,3 @@ log/ # Python *.pyc - diff --git a/CPPLINT.cfg b/CPPLINT.cfg new file mode 100644 index 0000000000000..4dbbe0596b5db --- /dev/null +++ b/CPPLINT.cfg @@ -0,0 +1,13 @@ +# Modified from https://github.com/ament/ament_lint/blob/ebd524bb9973d5ec1dc48a670ce54f958a5a0243/ament_cpplint/ament_cpplint/main.py#L64-L120 +set noparent +linelength=100 +includeorder=standardcfirst +filter=-build/c++11 # we do allow C++11 +filter=-build/namespaces_literals # we allow using namespace for literals +filter=-runtime/references # we consider passing non-const references to be ok +filter=-whitespace/braces # we wrap open curly braces for namespaces, classes and functions +filter=-whitespace/indent # we don't indent keywords like public, protected and private with one space +filter=-whitespace/parens # we allow closing parenthesis to be on the next line +filter=-whitespace/semicolon # we allow the developer to decide about whitespace after a semicolon +filter=-build/header_guard # TODO(Kenji Miyake): Support ROS-style rule in cpplint or add auto-fix script in pre-commit +filter=-build/include_order # we use the custom include order