Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation culture settings are ignored in the stylecop.json in JetBrains Rider #2958

Closed
artem-voropaev opened this issue May 8, 2019 · 6 comments

Comments

@artem-voropaev
Copy link

artem-voropaev commented May 8, 2019

I use next settings in the stylecop.json with StyleCop Analyzers 1.1.118

{
    "documentationRules": {
        "documentationCulture": "ru-RU"
    }
}

StyleCop warns me [SA1623] The property's documentation summary text should begin with: 'Gets or sets', but I use "documentationCulture": "ru-RU" and it should not warn me because my code is correct for this culture

/// <summary>
/// Получает или задает что-то.
/// </summary>
public string Foo { get; set; }

"Gets or sets" is "Получает или задает" in ru-RU (it always worked in Visual Studio with Settings.StyleCop file for .Net Framework projects)

My csproj

<Project Sdk="Microsoft.NET.Sdk">

    <PropertyGroup>
        <TargetFramework>netstandard2.0</TargetFramework>
        <CodeAnalysisRuleSet>../main.ruleset</CodeAnalysisRuleSet>
        <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
    </PropertyGroup>

    <ItemGroup>
      <PackageReference Include="StyleCop.Analyzers" Version="1.1.118" />
    </ItemGroup>

    <ItemGroup>
        <AdditionalFiles Include="../stylecop.json" />
    </ItemGroup>
    
</Project>
@sharwell
Copy link
Member

Is this warning also reported when building from the command line?

@sharwell
Copy link
Member

I just verified that this is working in Visual Studio with StyleCop Analyzers 1.1.118. Closing as external; this bug should be reported to JetBrains.

@artem-voropaev
Copy link
Author

Is this warning also reported when building from the command line?

Yes, dotnet build TestAnalyzers.sln -v n
warning SA1623: The property's documentation summary text should begin with: 'Gets or sets'

It seems that is Stylecop.Analyzers bug

@sharwell
Copy link
Member

sharwell commented Jun 4, 2019

@artem-voropaev What version of the dotnet tool are you using? It sounds like dotnet/roslyn#29014.

@artem-voropaev
Copy link
Author

@artem-voropaev What version of the dotnet tool are you using? It sounds like dotnet/roslyn#29014.

dotnet --info

Пакет SDK для .NET Core (отражающий любой global.json):
Version: 2.1.503
Commit: 4c506e0f35

Среда выполнения:
OS Name: Mac OS X
OS Version: 10.14
OS Platform: Darwin
RID: osx.10.14-x64
Base Path: /usr/local/share/dotnet/sdk/2.1.503/

Host (useful for support):
Version: 2.1.7
Commit: cca5d72d48

.NET Core SDKs installed:
2.1.4 [/usr/local/share/dotnet/sdk]
2.1.302 [/usr/local/share/dotnet/sdk]
2.1.503 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.7 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.7 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.7 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

@artem-voropaev
Copy link
Author

Why you close this issue? The problem was not solved! I'm waiting for solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants