mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Add Settings.StyleCop file (#6930)
Disable: 1.SA1402 FileMayOnlyContainASingleType 2.SA1403 FileMayOnlyContainASingleNamespace 3.SA1101 PrefixLocalCallsWithThis 4.SA1126 PrefixCallsCorrectly Add custom global config file stylecop.json
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<StyleCopSettings Version="105">
|
||||
<Analyzers>
|
||||
<Analyzer AnalyzerId="StyleCop.CSharp.MaintainabilityRules">
|
||||
<Rules>
|
||||
<Rule Name="FileMayOnlyContainASingleNamespace">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="FileMayOnlyContainASingleClass">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
</Rules>
|
||||
<AnalyzerSettings />
|
||||
</Analyzer>
|
||||
<Analyzer AnalyzerId="StyleCop.CSharp.ReadabilityRules">
|
||||
<Rules>
|
||||
<Rule Name="PrefixLocalCallsWithThis">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="PrefixCallsCorrectly">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
</Rules>
|
||||
<AnalyzerSettings />
|
||||
</Analyzer>
|
||||
</Analyzers>
|
||||
</StyleCopSettings>
|
||||
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"$schema" : "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
|
||||
"settings" : {
|
||||
"indentation" : {
|
||||
"indentationSize" : 4,
|
||||
"tabSize" : 4,
|
||||
"useTabs" : false
|
||||
},
|
||||
"spacingRules" : {
|
||||
},
|
||||
"readabilityRules" : {
|
||||
"allowBuiltInTypeAliases" : true
|
||||
},
|
||||
"orderingRules" : {
|
||||
"elementOrder" : [
|
||||
"kind",
|
||||
"constant",
|
||||
"accessibility",
|
||||
"static",
|
||||
"readonly"
|
||||
],
|
||||
"systemUsingDirectivesFirst" : true,
|
||||
"usingDirectivesPlacement" : "outsideNamespace",
|
||||
"blankLinesBetweenUsingGroups" : "allow"
|
||||
},
|
||||
"namingRules" : {
|
||||
"allowCommonHungarianPrefixes" : true,
|
||||
"allowedHungarianPrefixes" : [ "c", "r" ]
|
||||
},
|
||||
"maintainabilityRules" : {
|
||||
"topLevelTypes" : [
|
||||
"class",
|
||||
"interface"
|
||||
]
|
||||
},
|
||||
"layoutRules" : {
|
||||
"newlineAtEndOfFile" : "require",
|
||||
"allowConsecutiveUsings" : false
|
||||
},
|
||||
"documentationRules" : {
|
||||
"copyrightText" : "Copyright (c) Microsoft Corporation. All rights reserved.\nLicensed under the MIT License.",
|
||||
"xmlHeader" : false,
|
||||
"documentInterfaces" : true,
|
||||
"documentExposedElements" : true,
|
||||
"documentInternalElements" : false,
|
||||
"documentPrivateElements" : false,
|
||||
"documentPrivateFields" : false,
|
||||
"documentationCulture" : "en-US",
|
||||
"fileNamingConvention" : "stylecop"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user