Analyzes C# source code to enforce a set of style and consistency rules.
Patterns to include in reports.
Note: The input patterns are not applied when running StyleCop. Therefore, the files excluded by the patterns are always processed and you may even see logs related to the excluded files in the job console. However, Inspecode eventually ignores any issues detected on the excluded files when generating job reports.
Patterns to exclude from reports.
Note: Just like
input:, the ignore patterns are not applied when running StyleCop.
/property: StyleCopOverrideSettingsFile= option.
Amount of CPU. The default machine has
0.25 CPU with
960 MiB RAM.
Below is the list of options that are supported:
/property:<n>=<v> Set or override these project-level properties. <n> is the property name, and <v> is the property value. Use a semicolon or a comma to separate multiple properties, or specify each property separately. (Short form: /p) Example: /property:WarningLevel=2;OutDir=bin\Debug\
No tool specific severity levels are available.
No tool specific experimental options are available.
With default options:
inspecode: tools: stylecop: default
With custom machine:
inspecode: tools: stylecop: machine: cpu: 1.5 # 1.5 CPU, 5760 MiB RAM
With custom options:
inspecode: tools: stylecop: options: - /property: WarningLevel=2
With a configuration file:
inspecode: tools: stylecop: config-file: my-settings.StyleCop
The above configuration is equivalent to:
inspecode: tools: stylecop: options: - /property: StyleCopOverrideSettingsFile=my-settings.StyleCop
If no configuration files are specified via
options field, Inspecode walks the file tree in lexical order in your repository to find one of the following configuration files and specifies the file first found to StyleCop automatically via
Note: Inspecode ignores specific configuration files while searching. See Configuration > Tool Configuration > Field:
If the configuration file detected by Inspecode is not the one you want to use or you do not want to use any configuration files, you can disable Inspecode from detecting configuration files by explicitly setting an empty string to
config-file field like below:
inspecode: tools: stylecop: config-file: ""