NDepend v4 Released   Download Free Trial 14-Day Fully Functional Now!
Ignorer les liens de navigation
Home
Download
Product ▼
Purchase
Upgrade
Documentation ▼
About ▼

Critical Rules and Build Failure

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

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



At Build Process time, when a critical rule is violated the process NDepend.Console.exe returns a non-zero exit code. For that, the report section CQLinq Rules Violated must be activated in the NDepend Project. This behavior can be used to break the Build Process if a critical rule is violated. Also, NDepend.Console.exe outputs in the $OutDir$ a file named CodeRuleCriticalResult.xml that contains the names of the rules violated. Hence, this information can be easily used by the Build Process if needed.



At Development time, the NDepend interactive UI (integrated in VisualStudio, or VisualNDepend.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.





▲▲ Go to Top ▲▲

| Share

 Follow us on Twitter


Watch a Video Tour!
Getting Started
Product Features

        Code Query LINQ

NDepend is also available
for Java and C++

More than 3.000 companies provide better .NET code with NDepend

Full Visual Studio Integration

Copyright © 2004-2013 Patrick Smacchia