fprime/CPPLINT.cfg
Thibault d5a65b48df
Add Cpplint Static Code Analysis to CI Workflow (#1794)
* Add Cpplint Static Code Analysis to CI Workflow

* Fix spell check & typo

* Update cpplint triggering policy

* Add `linelength` fword from CppLint to SpellCheck

* Export `Cpplint` policy into `CPPLINT.cfg`

* Fix Spellcheck `Unrecognized words (2)`

* Remove some rule filters to reduce scan errors.

Asked by @thomas-bc: https://github.com/nasa/fprime/pull/1794#pullrequestreview-1226906932

* Use `set` to check membership of a collection of literals

* Refactor `cpplint_to_cppcheckxml.py`

* Remove remaining `filter=+build/header_guard`

* Remove `checkout_path` froù upload-sarif action

* Rename job from `cppcheck` to `cpplint` in CppLint workflow

* Fix tool name in SARIF

Co-authored-by: Thomas Boyer Chammard <49786685+thomas-bc@users.noreply.github.com>
2023-01-26 10:37:21 -08:00

71 lines
1.9 KiB
INI
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#
# Cpplint is a command-line tool to check C/C++ files for style issues following Google's C++ style guide.
# https://github.com/cpplint/cpplint
#
# Type the command below for details about supported options in CPPLINT.cfg.
# > cpplint --help
#
# Do not look for additional CPPLINT.cfg in the parent directories.
set noparent
root=.
extensions=cpp,hpp,c,h
# Limit line length.
linelength=120
# Adjust the following error categories as specified by the filter:
# (filter parameters are concatenated together)
# `build` rules
# Enable a warning about C++ features that were not in the original
# C++11 specification (and so might not be well-supported). In the
# case of F´, the minimum supported platforms are potentially not
# new enough to afford to do without this warning.
filter=+build/c++11
# F´ uses `#ifndef FOO_H` guard not the `#pragma once`.
filter=-build/pragma_once
# Do not enforce including header files in both .h and .cpp.
filter=-build/header_guard
filter=-build/include
filter=-build/include_alpha
filter=-build/include_order
filter=-build/include_subdir
filter=-build/include_what_you_use
filter=-build/namespaces
filter=-legal/copyright
filter=-readability/braces
filter=-readability/casting
filter=-readability/namespace
filter=-readability/todo
filter=-runtime/indentation_namespace
filter=-runtime/int
filter=-runtime/references
filter=-whitespace/blank_line
filter=-whitespace/braces
filter=-whitespace/comma
filter=-whitespace/comments
filter=-whitespace/end_of_line
filter=-whitespace/indent
filter=-whitespace/line_length
filter=-whitespace/newline
filter=-whitespace/operators
filter=-whitespace/parens
filter=-whitespace/tab
# There is no need for lint-gardening in the documentation.
exclude_files=Autocoders
exclude_files=ci
exclude_files=cmake
exclude_files=docs
exclude_files=Fpp
exclude_files=FppTest
exclude_files=gtest
exclude_files=build-fprime-automatic-*