Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/codeql/jpl-standard-pack-1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: "CodeQL JPL Coding Standard - Errors and Warnings"

disable-default-queries: true

packs:
# Source of the query pack is https://github.com/github/codeql/tree/main/cpp/ql/src/JPL_C
- codeql/cpp-queries:JPL_C

query-filters:
- exclude:
problem.severity:
- recommendation
20 changes: 20 additions & 0 deletions .github/codeql/jpl-standard-pack-2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "CodeQL JPL Coding Standard - Recommendations 1 of 2"

disable-default-queries: true

packs:
# Source of the query pack is https://github.com/github/codeql/tree/main/cpp/ql/src/JPL_C
- codeql/cpp-queries:JPL_C

query-filters:
- exclude:
problem.severity:
- error
- warning
# We are excluding the following query because it overflows the limit of
# 5000 results that the SARIF upload can handle
# This sole query is ran in jpl-standard-pack-3.yml
# https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github#uploading-a-code-scanning-analysis-with-github-actions
- exclude:
id:
- cpp/jpl-c/basic-int-types
13 changes: 13 additions & 0 deletions .github/codeql/jpl-standard-pack-3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: "CodeQL JPL Coding Standard - Recommendations 2 of 2"

disable-default-queries: true

packs:
# Source of the query pack is https://github.com/github/codeql/tree/main/cpp/ql/src/JPL_C
- codeql/cpp-queries:JPL_C

query-filters:
# This will ONLY include the following query
- include:
id:
- cpp/jpl-c/basic-int-types
15 changes: 15 additions & 0 deletions .github/codeql/security.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "CodeQL security and quality"

queries:
- uses: security-and-quality

query-filters:
- include:
id: cpp/incorrect-not-operator-usage
- include:
tags contain: correctness
- include:
tags contain: reliability

paths-ignore:
- docs/
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,10 @@ repos:
rev: v20.1.8
hooks:
- id: clang-format

- repo: https://github.com/cpplint/cpplint
rev: 2.0.0
hooks:
- id: cpplint
args:
- --config=cpplint.cfg
64 changes: 64 additions & 0 deletions cpplint.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#
# 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=docs
exclude_files=build-fprime-automatic-*