This repository provides ready-to-use linting and editor configuration files based on the Joint Strike Fighter (JSF) Air Vehicle C++ Coding Standards (Doc. No. 2RDU00001 Rev C). It is designed to help developers seamlessly integrate and enforce Lockheed Martin's robust C++ coding guidelines into modern C++ projects using tools like clang-tidy and clang-format.
The original documentation can be found here: JSF-AV-rules.pdf
Applying mission-critical C++ coding standards manually can be tedious. This project automates the enforcement of the JSF-AV rules through widely adopted static analysis and formatting tools. By dropping these configuration files into your repository, you can catch memory leaks, prevent undefined behaviors, and maintain strict code consistency.
.clang-tidy: Comprehensive Clang-Tidy configuration mapping directly to the JSF AV rules where applicable. Includes over 100 automated checks with comments referencing specific rules (e.g., AV Rule 1, AV Rule 206)..clang-format: Code formatting rules enforcing JSF guidelines such as Allman brace placement, indentation limits, and pointer alignments..editorconfig: Basic editor settings ensuring consistent tabs, spaces, and line lengths across different IDEs (VS Code, CLion, Vim, etc.).compiler-flags.txt: Recommended compiler warnings (-Wall,-Wshadow,-Wconversion, etc.) to enforce rules that cannot be evaluated by static analysis alone.pr-reviewer-agent-prompt.md: A highly specific prompt template designed for AI agents (e.g., ChatGPT, Claude) to review Pull Requests and catch semantic JSF-AV violations that static analysis tools miss.
You can easily enforce the JSF AV C++ Coding Standards by dropping these configuration files into the root of your C++ project workspace:
- Copy
.clang-tidy,.clang-format, and.editorconfigto your project root. - Integrate the flags in
compiler-flags.txtinto yourCMakeLists.txtorMakefile. - Run your preferred linter or rely on your IDE's built-in
clang-tidysupport to see real-time compliance warnings.