Comments (6)
We can have our cake and eat it to. This can be enabled on a per project type, per MS's docs:
You can configure whether you want to exclude asynchronous methods that don't return a value from this rule. To exclude these kinds of methods, add the following key-value pair to an .editorconfig file in your project:
# Package version 2.9.0 and later
dotnet_code_quality.CA2007.exclude_async_void_methods = true
# Package version 2.6.3 and earlier
dotnet_code_quality.CA2007.skip_async_void_methods = true
You can also configure which output assembly kinds to apply this rule to. For example, to only apply this rule to code that produces a console application or a dynamically linked library (that is, not a UI app), add the following key-value pair to an .editorconfig file in your project:
dotnet_code_quality.CA2007.output_kind = ConsoleApplication, DynamicallyLinkedLibrary
from atc-coding-rules.
We can have our cake and eat it to. This can be enabled on a per project type, per MS's docs:
You can configure whether you want to exclude asynchronous methods that don't return a value from this rule. To exclude these kinds of methods, add the following key-value pair to an .editorconfig file in your project:
# Package version 2.9.0 and later dotnet_code_quality.CA2007.exclude_async_void_methods = true
# Package version 2.6.3 and earlier dotnet_code_quality.CA2007.skip_async_void_methods = true
You can also configure which output assembly kinds to apply this rule to. For example, to only apply this rule to code that produces a console application or a dynamically linked library (that is, not a UI app), add the following key-value pair to an .editorconfig file in your project:
dotnet_code_quality.CA2007.output_kind = ConsoleApplication, DynamicallyLinkedLibrary
This was the same article i just read, you beat me to it :)
from atc-coding-rules.
Notes for output_kind types:
https://docs.microsoft.com/en-us/dotnet/api/microsoft.codeanalysis.outputkind?view=roslyn-dotnet
from atc-coding-rules.
from atc-coding-rules.
since the rule only makes sense on some projects the decision is to Set to: root/suggestion
Set to NONE for test projects
from atc-coding-rules.
from atc-coding-rules.
Related Issues (20)
- NSubstitute.Analyzers.CSharp HOT 4
- Rule: SA1122 UseStringEmptyForEmptyStrings HOT 3
- dotnet pack fails with SymbolPackageFormat property HOT 1
- Align distribution MSBuild files with Atc.Cosmos
- Microsoft.CodeAnalysis.NetAnalyzers should only be included when using older SDKs HOT 1
- CA1812: Avoid uninstantiated internal classes HOT 1
- Test rule: CA1068: CancellationToken parameters must come last HOT 4
- Rule: CA1002 replaces MA0016 HOT 2
- SA1202 (ElementsMustBeOrderedByAccess) should be covered by decision for SA1201 HOT 2
- Consider all StyleCop Documentation Rules HOT 2
- Semantic versioning of the ATC Rules
- Rule: CA1305 replaces MA0011 HOT 1
- Rule: MA0038 Make method static - Same as CA1822 HOT 1
- Rule: SA1601
- Rule: IDE0060
- Directory.Build.props streamline
- Rule: csharp_style_prefer_index_operator and csharp_style_prefer_range_operator
- Rule: IDE0161 - File-scoped namespace
- Rule: CA1602
- Rule: IDE0005
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atc-coding-rules.