PricingDownload
Product

Platform

All features44 capabilities, from IDE to CICompliance KitsISO 26262, DO-178C, IEC 62304...AI GovernanceControl AI-generated C/C++ codeWhat’s new in 2027Latest version highlightsScreenshotsSee the product in action

Analyze & improve

Coding standardsMISRA, CERT, CWE, AUTOSARArchitecture & dependenciesGraphs, matrix, cyclesTechnical debtMeasured in hours and dollarsQuality gatesStop regressions in CISmart Code CityYour codebase in 3D

Integrations

IDE pluginsVisual Studio, VS Code, CLion...CI/CD pipelinesJenkins, Azure DevOps, GitHub, GitLabSonarQube pluginC/C++ results in SonarQubeExternal analyzersClang-Tidy, Cppcheck, coverageFeature on Demand
Solutions

By need

Functional safetyCompliance kits per standardCoding standardsMISRA, CERT, AUTOSAR, ISO...Legacy modernizationRefactor large C/C++ safelyCode auditExpert review of your codebaseM&A due diligenceAssess technical health fast

By role

DevelopersSoftware architectsTech leadsDevOps engineersEngineering managersProject managers

CTOsCIOs / IT leadersQA engineersSecurity leadersComplianceConsultantsRequest a guided PoC
Industries

Safety-critical

AutomotiveISO 26262, MISRA, AUTOSARAerospace & DefenseDO-178C programsMedical DevicesIEC 62304 softwareEnergy & UtilitiesIEC 61508 systemsEmbedded SystemsFirmware and devices

Enterprise

Financial ServicesTrading and paymentsGame DevelopmentEngines and large C++Software VendorsCommercial C/C++ productsGovernmentAgencies and contractorsAll industries & case studies
Resources

Learn

DocumentationGuides, rules and CI setupKnowledge baseFrequently asked questionsBlogC and C++ code quality articlesRelease notesEvery version since 2009

Customers

Case studiesSuccess storiesTestimonialsWhat users sayOur customersCompanies using CppDependGold Code QualityOpen source projects we rate

Programs & company

Feature on DemandMissing features built for freeFree for open sourceLicenses for OSS and studentsContact usSales and supportEULALicense agreement
Docs
Documentation

Guides

Critical Rules and Build Failure

1 min readGuidesCppDepend 2027

CppDepend comes with the notion of Critical CQLinq Rule. Critical rules represent a mean to define high priority rules that must never be violated. With critical rules, it is possible to break the Build Process when a critical rule violation occurs.

Defining Critical Rules

A critical rule is just a CQLinq rule with the flag Critical Rule checked:

Critical rule flag

Build Process Integration

At Build Process time, when a critical rule is violated the process CppDepend.Console.exe returns a non-zero exit code. For that, the report section CQLinq Rules Violated must be activated in the CppDepend Project. This behavior can be used to break the Build Process if a critical rule is violated. Also, CppDepend.Console.exe outputs in the $OutDir$ a file named:

Output File
CodeRuleCriticalResult.xml

This file contains the names of the rules violated. Hence, this information can be easily used by the Build Process if needed.

Command line critical rules

Visual Indicators

At Development time, the CppDepend interactive UI (integrated in VisualStudio, or VisualCppDepend.exe standalone) comes with several visual indicators when a critical rule is violated:

  • The bottom-right circle becomes red.
  • The number of critical rule violated is shown in the bottom-right circle tooltip panel.
  • In Queries and Rules Explorer panel, violated rules status have a top-left red flag.
  • In Queries and Rules Explorer panel, the status of groups that contains a violated rules have a top-left red flag.
Rules Explorer panel with critical rule flags
Was this page helpful?
Evaluating CppDepend on a production codebase?Get a guided proof of concept with our static analysis architects.
Request a PoC