Skip to content

Commit

Permalink
Enable use_is_even_rather_than_modulo
Browse files Browse the repository at this point in the history
  • Loading branch information
passsy committed Dec 12, 2021
1 parent 3e93a2f commit d22746e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,12 @@ linter:
# https://dart-lang.github.io/linter/lints/use_function_type_syntax_for_parameters.html
- use_function_type_syntax_for_parameters

# Don't use the modulo operator for isEven/isOdd checks
#
# Linter v0.1.116
# https://dart-lang.github.io/linter/lints/use_is_even_rather_than_modulo.html
- use_is_even_rather_than_modulo

# Write `if (nullableBool ?? false)` instead of `if (nullableBool == true)`
# Not enabled, because `nullableBool == true` is very explicit, whereas `nullableBool ?? false` requires
# cognitive effort to process
Expand Down

0 comments on commit d22746e

Please sign in to comment.