StyleCop / StyleCop.ReSharper

Official ReSharper extension for StyleCop

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Extension does not consider rules in stylecop.json

epitka opened this issue · comments

I have following stylecop.json file where it is declared that using directives should be outside of namespace. However every time I let R# import directives it places them within namespace. How can this be fixed?

{
"$schema":
"https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
"settings": {
"orderingRules": {
"usingDirectivesPlacement": "outsideNamespace"
},
"documentationRules": {
"xmlHeader": false,
"documentInterfaces": false,
"documentInternalElements": false,
"documentExposedElements": false,
"excludeFromPunctuationCheck": [
"seealso",
"param",
"returns",
"summary"
]
}
}
}

commented

Same issue. Extension seems valuable but is effectively unusable without it, for my use-case.

Same for me..

This extension only takes the StyleCop.Settings file into account. As of now, there is no mapping between the StyleCop.json and ReSharper settings.

Did I get this right that those files share the same internal structure, so it would be sufficient to duplicate StyleCop.json as StyleCop.Settings?

I think it would rather make sense to directly set the ReSharper settings.

Hm, but ReSharper is applying the StyleCop fixes like it is supposed to do and that includes the header writing, so the ReSharper header template doesn't get used here.

Or can this behaviour be changed?

BTW, another annoyance is this:

image

The number of dashes in file header text cannot be set to 0. That's really unfortunate because it's impossible to have the headers filled without the two lines containing dashes..