Type object
File match stylecop.json
Schema URL https://catalog.lintel.tools/schemas/schemastore/stylecop-analyzers-configuration/latest.json
Source https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json

Validate with Lintel

npx @lintel/lintel check
Type: object

Configuration file for StyleCop Analyzers

Properties

settings object

The top-level object containing configuration properties for built-in rules.

8 nested properties
indentation object

Indentation configuration

3 nested properties
indentationSize integer

Specifies the indentation size.

Default: 4
min=0
tabSize integer

Specifies the tab width.

Default: 4
min=0
useTabs boolean

Specifies whether indentation should use hard tabs instead of spaces.

Default: false
spacingRules object

Configuration for spacing rules (SA1000-)

readabilityRules object

Configuration for readability rules (SA1100-)

1 nested properties
allowBuiltInTypeAliases boolean

When true, diagnostics will not be reported for using aliases of built-in types.

Default: false
orderingRules object

Configuration for ordering rules (SA1200-)

4 nested properties
elementOrder string[]

Specifies the traits used for ordering elements within a document, along with their precedence.

Default:
[
  "kind",
  "accessibility",
  "constant",
  "static",
  "readonly"
]
uniqueItems=true
systemUsingDirectivesFirst boolean

When true, System using directives should be placed before other using directives.

Default: true
usingDirectivesPlacement string

Specifies the desired placement of using directives. insideNamespace: Place using directives inside the namespace definition outsideNamespace: Place using directives outside the namespace definition preserve: Allow using directives inside or outside the namespace definition

Default: "insideNamespace"
Values: "insideNamespace" "outsideNamespace" "preserve"
blankLinesBetweenUsingGroups string

Specifies if using groups should be separated by a blank line. allow: A blank line is allowed, but not required require: A blank line is required omit: A blank line is not allowed

Default: "allow"
Values: "allow" "require" "omit"
namingRules object

Configuration for naming rules (SA1300-)

5 nested properties
allowCommonHungarianPrefixes boolean

Determines whether common Hungarian notation prefixes should be allowed.

Default: true
allowedHungarianPrefixes string[]

Allowed Hungarian notation prefixes.

Default:
[]
allowedNamespaceComponents string[]

Allowed namespace components, such as ones beginning with a lowercase letter.

Default:
[]
includeInferredTupleElementNames boolean

Specifies whether inferred tuple element names will be analyzed as well.

Default: false
tupleElementNameCasing string

Specifies the casing convention used for tuple element names.

Default: "PascalCase"
Values: "camelCase" "PascalCase"
maintainabilityRules object

Configuration for ordering rules (SA1400-)

1 nested properties
topLevelTypes string[]

The set of type kinds which should be placed in separate files according to the type name.

Default:
[
  "class"
]
uniqueItems=true
layoutRules object

Configuration for layout rules (SA1500-)

3 nested properties
newlineAtEndOfFile string

Specifies the handling for newline characters which appear at the end of a file allow: Files are allowed to end with a single newline character, but it is not required require: Files are required to end with a single newline character omit: Files may not end with a newline character

Default: "allow"
Values: "allow" "require" "omit"
allowConsecutiveUsings boolean

Specifies if SA1519 will allow consecutive using statements without braces

Default: true
allowDoWhileOnClosingBrace boolean

Specifies if SA1500 will allow the 'while' expression of a 'do'/'while' loop to be on the same line as the closing brace.

Default: false
documentationRules object

Configuration for documentation rules (SA1600-)

13 nested properties
documentExposedElements boolean

Specifies whether exposed elements need to be documented. When true, all publicly-exposed types and members require documentation.

Default: true
documentInternalElements boolean

Specifies whether internal elements need to be documented. When true, all internally-exposed types and members require documentation.

Default: true
documentPrivateElements boolean

Specifies whether private elements need to be documented. When true, all types and members except for declared private fields require documentation.

Default: false
documentInterfaces string | boolean

Specifies whether interface members need to be documented. When true, all interface members require documentation, regardless of accessibility.

Default: "all"
Values: "all" "exposed" "none" true false
documentPrivateFields boolean

Specifies whether private fields need to be documented. When true, all fields require documentation, regardless of accessibility.

Default: false
companyName string

The name of the company which appears in file headers.

Default: "PlaceholderCompany"
copyrightText string

The copyright text which should appear in file headers.

Default: "Copyright (c) {companyName}. All rights reserved."
variables object

Replacement variables which may be used in the 'copyrightText' value.

xmlHeader boolean

Determines whether the file header should be wrapped in the StyleCop-standard XML structure.

Default: true
headerDecoration string

The text used as decoration for the copyright header comment.

Default: ""
fileNamingConvention string

Specifies the preferred naming convention for files. The default value "stylecop" uses the naming convention defined by StyleCop Classic, while "metadata" uses a file naming convention that matches the metadata names of types.

Default: "stylecop"
Values: "stylecop" "metadata"
documentationCulture string

The culture that should be used for documentation comments.

Default: "en-US"
excludeFromPunctuationCheck array

Specifies the top-level tags within XML documentation that will be excluded from punctuation analysis.

Default:
[
  "seealso"
]