Giter Site home page Giter Site logo

Loading settings from disk about roslynator HOT 8 CLOSED

dotnet avatar dotnet commented on May 23, 2024 1
Loading settings from disk

from roslynator.

Comments (8)

niemyjski avatar niemyjski commented on May 23, 2024 4

Please note that VS2017 is going off of .editorconfig for most formatting so maybe we could imitate that :).

from roslynator.

josefpihrt avatar josefpihrt commented on May 23, 2024

It seems to be doable.

A couple of notes:

  • There will be possibility to override Visual Studio options with options specified in a file.
  • File name will be roslynator.config.
  • File will be located in solution directory.

A file will have following structure:

<?xml version="1.0" encoding="utf-8"?>
<roslynator>
  <settings>
    <general>
      <prefixFieldIdentifierWithUnderscore isEnabled="true" />
    </general>
    <refactorings>
      <refactoring id="RR0001" isEnabled="false" />
    </refactorings>
  </settings>
</roslynator>

Refactorings ids with be specified here.

from roslynator.

NickCraver avatar NickCraver commented on May 23, 2024

+1 for a solution .json, this would be ideal for me too. I want this especially since suppression doesn't yet support namespaces (dotnet/roslyn/#486).

from roslynator.

josefpihrt avatar josefpihrt commented on May 23, 2024

@NickCraver The configuration file would be applicable only to refactorings, not analyzers.

from roslynator.

lancelarsen avatar lancelarsen commented on May 23, 2024

So when do we expect this global config file?

That or when applying the suppression in File... is there a wildcard format for the Target? ie. whole project ignore.

[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "RCS1169:Mark field as read-only.", Justification = "", Scope = "member", Target = "~F:SecondAct.Controllers.BackgroundController._backgroundTypeRepository")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "RCS1169:Mark field as read-only.", Justification = "", Scope = "member", Target = "~F:SecondAct.Controllers.BackgroundController._characterRepository")]

from roslynator.

josefpihrt avatar josefpihrt commented on May 23, 2024

@lancelarsen proposed config file would not (and cannot) be applicable to analyzers (RCS....).

I recommend to use rule set to suppress certain analyzer in entire project (see How to Configure Analyzers).

from roslynator.

lancelarsen avatar lancelarsen commented on May 23, 2024

Would love that -- really dig your extension... keep up the great work!

from roslynator.

josefpihrt avatar josefpihrt commented on May 23, 2024

How to Configure Refactorings

from roslynator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.