We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
bool-literal-in-expr
1 parent b89a959 commit 44e1992Copy full SHA for 44e1992
RULES_DESCRIPTIONS.md
@@ -183,6 +183,32 @@ _Configuration_: N/A
183
_Description_: Using Boolean literals (`true`, `false`) in logic expressions may make the code less readable.
184
This rule suggests removing Boolean literals from logic expressions.
185
186
+### Examples
187
+
188
+Before (violation):
189
190
+```go
191
+if attachRequired == true {
192
+ // do something
193
+}
194
195
+if mustReply == false {
196
197
198
+```
199
200
+After (fixed):
201
202
203
+if attachRequired {
204
205
206
207
+if !mustReply {
208
209
210
211
212
_Configuration_: N/A
213
214
## call-to-gc
0 commit comments