简体   繁体   中英

How to prevent adding .editorconfig to one solution leading to StyleCop rules getting applied to every solution?

Say I have the following folder structure:

Root -> dir A -> dir B -> sln B
              -> dir C -> sln C
     -> sln A

There's stylecop.json present for all the solutions.

{
  "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
  "settings": {
    "documentationRules": {
      "companyName": "X",
      "copyrightText": "X"
    }
  }
}

But there's no.editorconfig file and the SA rules are not applied to the solutions (not sure if it's expected). Now, the moment I create a.editorconfig file for sln C, the SA rules start getting applied to A, B, C all solutions. How do we configure it to apply for a single solution only?

[Update]: It's working. There was a.editorconfig in root directory which probably messed it up. I am unable to think of any other reason.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM