MISRA C:2012 and MISRA C++:2008 rules for the NeuralInverse static analysis engine.
This package provides a complete, structured set of MISRA rules for static analysis of C and C++ source code. Covers safety-critical and embedded software standards used in automotive, aerospace, medical, and industrial domains.
| Standard | Rules | Status |
|---|---|---|
| MISRA C:2012 | 143 rules + 16 directives | In progress |
| MISRA C++:2008 | 228 rules | In progress |
npm install @neuralinverse/misraimport { MISRA_RULES, MISRA_C_2012_RULES, MISRA_CPP_2008_RULES } from '@neuralinverse/misra';
// All rules across both standards
console.log(MISRA_RULES.length);
// Filter by standard
const cRules = MISRA_C_2012_RULES;
const cppRules = MISRA_CPP_2008_RULES;
// Filter by category
const mandatory = MISRA_RULES.filter(r => r.category === 'mandatory');
const required = MISRA_RULES.filter(r => r.category === 'required');
const advisory = MISRA_RULES.filter(r => r.category === 'advisory');
// Filter by decidability
const decidable = MISRA_RULES.filter(r => r.decidability === 'decidable');interface IMisraRule {
id: string; // e.g. 'misra-c-2012-8.1' or 'misra-cpp-2008-5-0-1'
standard: MisraStandard; // 'misra-c-2012' | 'misra-cpp-2008'
ruleId: string; // e.g. 'Rule 8.1' or '5-0-1'
category: MisraCategory; // 'mandatory' | 'required' | 'advisory' | 'document'
decidability: Decidability; // 'decidable' | 'undecidable'
title: string;
description: string;
severity: Severity;
languages: Language[]; // 'c' | 'cpp'
targets: RuleTarget[];
pattern: IDetectionPattern;
remediation: string;
references: string[];
}Business Source License 1.1 — see LICENSE.
Change Date: 2029-01-01 | Change License: GPL v2.0
For commercial licensing: legal@neuralinverse.com