Hi folks,
probably user error but stylecop.json is just not working for me. I followed Configuration.md for easy creation of json file. However when I adjusted the company tag it still gives me "PlaceholderCompany".
Followed all the suggestions in [https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/1720].
ProjectFile:
<ItemGroup>
<None Include="stylecop.json" />
</ItemGroup>
(so in it's own item group)
Json file:
{
"$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
"settings": {
"documentationRules": {
"companyName": "ANOTHER",
"copyrightText": "Copyright (c) {companyName}. All rights reserved."
}
}
}
Any ideas?
....this gives me an "Invalid child element" warning.
Works though. Thanks!
:+1:
I'm not sure what's wrong, but I appear to be running into a similar issue with the config file. Despite setting "useTabs" to true, it still reports one warning per line stating that "Tabs must not be used". This leads me to assuming that the settings file I use is either incorrect or not parsed.
I followed the steps in the above documentation and created a minimal Console application to reproduce this behavior: ConsoleApplication1.zip
Since most people don't seem to have a problem with this, it might very well be a problem with my configuration, but if anyone can point me into the right direction, this would very much be appreciated.
@ilexp I've also been having this issue still. Did you ever solve it?
@alexreg No, but I did work around it to a degree by using the new VS editorconfig file instead.
Ah, for me it turned out that I was using v1.0.2 of StyleCop.Analyzers, which didn't support useTabs. I needed one of the v1.1.0 betas!
Most helpful comment
Ah, for me it turned out that I was using v1.0.2 of StyleCop.Analyzers, which didn't support
useTabs. I needed one of the v1.1.0 betas!