implement lint double_negations
This commit is contained in:
parent
9e316f3472
commit
c1dcbebd0b
8 changed files with 159 additions and 16 deletions
|
@ -76,6 +76,11 @@ lint_builtin_deprecated_attr_link = use of deprecated attribute `{$name}`: {$rea
|
|||
lint_builtin_deref_nullptr = dereferencing a null pointer
|
||||
.label = this code causes undefined behavior when executed
|
||||
|
||||
lint_builtin_double_negations = use of a double negation
|
||||
.note = the prefix `--` could be misinterpreted as a decrement operator which exists in other languages
|
||||
.note_decrement = use `-= 1` if you meant to decrement the value
|
||||
.add_parens_suggestion = add parentheses for clarity
|
||||
|
||||
lint_builtin_ellipsis_inclusive_range_patterns = `...` range patterns are deprecated
|
||||
.suggestion = use `..=` for an inclusive range
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue