@@ -65,29 +65,6 @@ Field<HumanType>("human")
65
65
66
66
```
67
67
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
-
91
68
## Configure code fix
92
69
93
70
The given diagnostic rule offers an automatic code fix. By default, it attempts
@@ -142,4 +119,27 @@ Field<StringGraphType>("name").Description("description").Arguments(null)
142
119
.Resolve (context => " text" );
143
120
```
144
121
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
+
145
145
## Related rules
0 commit comments