implement lint double_negations

This commit is contained in:
Kalle Wachsmuth 2024-09-01 19:22:35 +02:00
parent 9e316f3472
commit c1dcbebd0b
No known key found for this signature in database
GPG key ID: 0B52AE391C674CE5
8 changed files with 159 additions and 16 deletions

View file

@ -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