Skip to content

Repository files navigation

JSF Air Vehicle C++ Coding Standards (JSF-AV) Configurations

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

Overview

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.

Repository Contents

  • .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.

Usage

You can easily enforce the JSF AV C++ Coding Standards by dropping these configuration files into the root of your C++ project workspace:

  1. Copy .clang-tidy, .clang-format, and .editorconfig to your project root.
  2. Integrate the flags in compiler-flags.txt into your CMakeLists.txt or Makefile.
  3. Run your preferred linter or rely on your IDE's built-in clang-tidy support to see real-time compliance warnings.

About

JSF Air Vehicle C++ Coding Standards configurations (clang-tidy, clang-format, editorconfig) for modern C++ projects.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors