Stylecopanalyzers: SA1642 Warnings occur when using .NET Core SDK 2.1.300

Created on 6 Jun 2018  路  8Comments  路  Source: DotNetAnalyzers/StyleCopAnalyzers

I've recently updated to the latest version of the .NET Core SDK, version 2.1.300. I'm now seeing SA1642 warnings when running dotnet build on a project which changes the documentationCulture to en-GB. I've managed to replicate this with version 2.1.300 on both Ubuntu and Windows.

It also appears that other rules are being respected. For example, I've changed the usingDirectivesPlacement from that standard and get no warnings. I've also dropped in a global.json into my solution to downgrade the .NET Core SDK version to 2.1.200 and 2.1.201. When I do this, I no longer get any warnings.

I was initially running version 1.1.0-beta006 and thought that might be a cause, but when I also upgraded to 1.1.0-beta007 the issues also occurred.

My stylecop.json looks like:

{
  "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
  "settings": {
    "documentationRules": {
      "documentationCulture": "en-GB"
    },
    "orderingRules": {
      "blankLinesBetweenUsingGroups": "omit",
      "usingDirectivesPlacement": "outsideNamespace"
    }
  }
}

Let me know if you need any other information.

bug external

All 8 comments

Can you provide a code snippet that used to work, but no longer does?

@vweijsters here is an example that no longer works

```c#
using System;
using System.Collections.Generic;
using System.Linq;

namespace MyProject
{
///


/// This is a test class.
///

public sealed class MyClass
{
///
/// Initialises a new instance of the class.
///

public MyClass()
{
}
}
}


When I change 
```c#
/// <summary>
/// Initialises a new instance of the <see cref="MyClass"/> class.
/// </summary>

to
c# /// <summary> /// Initializes a new instance of the <see cref="MyClass"/> class. /// </summary>
then everything works as expected.

Obviously this is a bit of a pain as I'm based in the UK and would prefer not to use American spellings 馃槈

I'm now seeing SA1642 warnings when running dotnet build

Does it reproduce when running msbuild from a Visual Studio developer command prompt on Windows?

@nguerrera No, that works fine.

Thanks, this confirms my expectation and adds weight to my assessment here: https://github.com/dotnet/sdk/issues/2332#issuecomment-397491403

Same problem for me with de-DE. As the one who originally implemented documentationCulture I can't imagine why it should behave any different from the other options so I agree with @nguerrera's assessment.

@sharwell Can you provide the translation without satellite assemblies until the problem in the Roslyn compiler is fixed?

@fubar-coder I would prefer to see someone put time into fixing the underlying bug instead. All of the code in question is open source.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

snowjim picture snowjim  路  6Comments

arashk1368 picture arashk1368  路  4Comments

jeroenlandheer picture jeroenlandheer  路  3Comments

RehanSaeed picture RehanSaeed  路  6Comments

mzhukovs picture mzhukovs  路  4Comments