Skip to content

Commit 941ecdb

Browse files
authored
Misc doc fixes (graphql-dotnet#3821)
1 parent 71f1e5d commit 941ecdb

File tree

3 files changed

+25
-25
lines changed

3 files changed

+25
-25
lines changed

docs2/site/docs/analyzers/gql004.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -65,29 +65,6 @@ Field<HumanType>("human")
6565

6666
```
6767

68-
## Suppress a warning
69-
70-
If you just want to suppress a single violation, add preprocessor directives to
71-
your source file to disable and then re-enable the rule.
72-
73-
```csharp
74-
#pragma warning disable GQL004
75-
// The code that's violating the rule is on this line.
76-
#pragma warning restore GQL004
77-
```
78-
79-
To disable the rule for a file, folder, or project, set its severity to `none`
80-
in the
81-
[configuration file](https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/configuration-files).
82-
83-
```ini
84-
[*.cs]
85-
dotnet_diagnostic.GQL004.severity = none
86-
```
87-
88-
For more information, see
89-
[How to suppress code analysis warnings](https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/suppress-warnings).
90-
9168
## Configure code fix
9269

9370
The given diagnostic rule offers an automatic code fix. By default, it attempts
@@ -142,4 +119,27 @@ Field<StringGraphType>("name").Description("description").Arguments(null)
142119
.Resolve(context => "text");
143120
```
144121

122+
## Suppress a warning
123+
124+
If you just want to suppress a single violation, add preprocessor directives to
125+
your source file to disable and then re-enable the rule.
126+
127+
```csharp
128+
#pragma warning disable GQL004
129+
// The code that's violating the rule is on this line.
130+
#pragma warning restore GQL004
131+
```
132+
133+
To disable the rule for a file, folder, or project, set its severity to `none`
134+
in the
135+
[configuration file](https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/configuration-files).
136+
137+
```ini
138+
[*.cs]
139+
dotnet_diagnostic.GQL004.severity = none
140+
```
141+
142+
For more information, see
143+
[How to suppress code analysis warnings](https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/suppress-warnings).
144+
145145
## Related rules

docs2/site/docs/analyzers/gql006.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,4 @@ For more information, see
124124

125125
## Related rules
126126

127-
[# GQL007: Can not set source field](../gql007)
127+
[GQL007: Can not set source field](../gql007)

docs2/site/docs/analyzers/gql007.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
This rule triggers when a field defined on a type deriving from
1414
`InputObjectGraphType<TSourceType>` has a matching field or property on the
15-
`TSourceType` type but it's not not settable. If the type or one of its base
15+
`TSourceType` type but it's not settable. If the type or one of its base
1616
types override the `ParseDictionary` method the validation is skipped.
1717

1818
## Rule description

0 commit comments

Comments
 (0)