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

Analyzers: AdditionalFiles not used #1510

Closed
AntyMew opened this issue May 30, 2019 · 4 comments
Closed

Analyzers: AdditionalFiles not used #1510

AntyMew opened this issue May 30, 2019 · 4 comments

Comments

@AntyMew
Copy link

AntyMew commented May 30, 2019

OS: Debian buster
Dev env: vscode 1.34.0 + omnisharp-roslyn 1.19.1 + StyleCop.Analyzers 1.1.118

Given this example code:

// <copyright file="Program.cs" company="Callie LeFave">
// Copyright (c) Callie LeFave 2019
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// </copyright>

using System;

namespace testproj
{
    public class Program
    {
        public static void Main()
        {
            Console.WriteLine("Hello world!");
        }
    }
}

And this stylecop.json:

{
    "$schema": "https://github.com/raw/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
    "settings": {
        "documentationRules": {
            "companyName": "Callie LeFave",
            "copyrightText": "Copyright (c) {companyName} {copyrightYear}\n{licenseNotice}",
            "variables": {
                "copyrightYear": "2019",
                "licenseNotice": "This Source Code Form is subject to the terms of the Mozilla Public\nLicense, v. 2.0. If a copy of the MPL was not distributed with this\nfile, You can obtain one at https://mozilla.org/MPL/2.0/."
            }
        },
        "orderingRules": {
            "usingDirectivesPlacement": "outsideNamespace"
        }
    }
}

On build, the following warnings are raised:

Program.cs(12,18): warning CS1591: Missing XML comment for publicly visible type or member 'Program' [/home/callie/.local/src/testproj/testproj.csproj]
Program.cs(14,28): warning CS1591: Missing XML comment for publicly visible type or member 'Program.Main()' [/home/callie/.local/src/testproj/testproj.csproj]
Program.cs(12,18): warning SA1600: Elements should be documented [/home/callie/.local/src/testproj/testproj.csproj]
Program.cs(14,28): warning SA1600: Elements should be documented [/home/callie/.local/src/testproj/testproj.csproj]

But in the editor, SA1636 and SA1200 are also raised, despite the configuration:

2019-05-30-194436_1920x1080_scrot

Thank you for your time!

@savpek
Copy link
Contributor

savpek commented Jun 1, 2019

Not sure about this since i am not familiar with the custom configuration files but i think this feature isn't implemented at all at omnisharp. Theres methods like http://source.roslyn.io/#Microsoft.CodeAnalysis.Workspaces/Workspace/Workspace.cs,15c1644018187c11,references in workspace base but they are internal so i am not sure is this possible to implement without reflection? cc @rchande @filipw any insights for this?

@rchande
Copy link

rchande commented Jun 3, 2019

cc @heejaechang @mavasani

@filipw
Copy link
Member

filipw commented Jul 14, 2019

fixed by #1547

@filipw filipw closed this as completed Jul 14, 2019
@AntyMew
Copy link
Author

AntyMew commented Jul 18, 2019

Confirmed fixed, thank you!

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

4 participants