dotnet / dotnet/docs

api_surface of code analyzer rule in .editorconfig can be "none"

Open
#22,074 5 comments 0 reactions 0 assignees View on GitHub
dotnet-fundamentals/svc
Dominant language
No language data
Stars
4.8k
Forks
6.1k
Avg merge
15h 21m
Merged PRs (30d)
370

Description

### Type of issue

Other (describe below)

### Description

Moved issue to .NET
Old issue: [https://github.com/MicrosoftDocs/visualstudio-docs/issues/5838](https://github.com/MicrosoftDocs/visualstudio-docs/issues/5838)

For full discussion, see **5838**

The documentation does not list `none` among the allowable values for `api_surface`. However, the following syntax in .editorconfig seems to effectively disable the code analyzer rule, when using Microsoft.CodeAnalysis.FxCopAnalyzers 2.9.4. Please consider documenting it.

```
[*.cs]
dotnet_code_quality.CA1716.api_surface = none
```

The `none` name matches [`SymbolVisibilityGroup.None`]( "roslyn-analyzers/SymbolVisibilityGroup.cs at v2.9.4 · dotnet/roslyn-analyzers").

### Page URL

https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/code-quality-rule-options

### Content source URL

https://github.com/dotnet/docs/blob/live/docs/fundamentals/code-analysis/code-quality-rule-options.md

### Document Version Independent Id

1081edc4-e2aa-02c6-3d5c-2903e368e57b

### Article author

@gewarren

### Metadata

* ID: 6483776b-1b83-5a25-065d-e2351f40bf52
* Service: **dotnet-fundamentals**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.