Skip to content
This repository was archived by the owner on Nov 8, 2018. It is now read-only.

Commit 3284b9d

Browse files
committed
Merge pull request #47 from dersteve/doc_46
documentation for suppression attribute added
2 parents ac6bfbd + ee39c4b commit 3284b9d

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

documentation/AvoidAsyncSuffix.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ To fix a violation of this rule, remove the `Async` suffix from the method name
3131

3232
## How to suppress violations
3333

34+
```csharp
35+
[SuppressMessage("AsyncUsage.CSharp.Naming", "AvoidAsyncSuffix", Justification = "Reviewed.")]
36+
```
37+
3438
```csharp
3539
#pragma warning disable AvoidAsyncSuffix // Avoid Async suffix
3640
public int ThisIsNotAsync()

documentation/AvoidAsyncVoid.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ To fix a violation of this rule, change the signature of the method to return a
2929

3030
## How to suppress violations
3131

32+
```csharp
33+
[SuppressMessage("AsyncUsage.CSharp.Reliability", "AvoidAsyncVoid", Justification = "Reviewed.")]
34+
```
35+
3236
```csharp
3337
#pragma warning disable AvoidAsyncVoid // Avoid async void
3438
private async void HandleSomeEvent(object sender, EventArgs e)

documentation/UseAsyncSuffix.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ To fix a violation of this rule, rename the method to include the `Async` suffix
3030

3131
## How to suppress violations
3232

33+
```csharp
34+
[SuppressMessage("AsyncUsage.CSharp.Naming", "UseAsyncSuffix", Justification = "Reviewed.")]
35+
```
36+
3337
```csharp
3438
#pragma warning disable UseAsyncSuffix // Use Async suffix
3539
public async Task<int> GetValue()

documentation/UseConfigureAwait.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ the asynchronous operation.
3131

3232
## How to suppress violations
3333

34+
```csharp
35+
[SuppressMessage("AsyncUsage.CSharp.Usage", "UseConfigureAwait", Justification = "Reviewed.")]
36+
```
37+
3438
```csharp
3539
#pragma warning disable UseConfigureAwait // Use ConfigureAwait
3640
await Task.Delay(1000);

0 commit comments

Comments
 (0)