CommitFence
Esc
↑ ↓ to moveEnter to open
Rules / Rules of .editorconfig

Rules of .editorconfig

How CommitFence reads the dotnet_diagnostic severities of .editorconfig and shows them with the team's rules.

On this page

What CommitFence reads#

The rules your .editorconfig already sets, the dotnet_diagnostic severities, are read too and shown with the team's rules, as blocking or warning. They are listed by rules list and shown by rules show. The product never writes .editorconfig: to change one of these rules, change the file.

A scratch repository whose .editorconfig is:

.editorconfig
root = true[*.cs]dotnet_diagnostic.CA1822.severity = warningdotnet_diagnostic.CA1305.severity = error

In the list#

Below the team's rules, rules list adds the rules of .editorconfig, each with the line of the file it was read from. error is shown as blocks, warning as warns:

Terminal
$ commitfence rules listTEAM010  block  csharp  if-statement  No braces around a single-line ifTEAM012  block  csharp  usage  Use IClock, not DateTime.Now.editorconfig: 2 rulesCA1305  on              blocks  Specify IFormatProvider  line 5CA1822  on              warns   Mark members as static  line 4exit code 0

One rule#

Terminal
$ commitfence rules show CA1305CA1305  Specify IFormatProvider  setting:  'error'  severity: block  status:   on, applied by the build  file:     .editorconfig, line 5  source:   set in .editorconfig; the product does not change that fileexit code 0

A rule of the file is judged by the build, which is why a review with named files, which does not build, cannot judge it.

Something wrong or unclear on this page? Tell us on GitHub