Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 6.0.0 #15

Merged
merged 7 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
## 6.0.0
- Add DCM rule prefer-correct-error-name with `e` for error
- Add DCM rule prefer-widget-private-members
- Remove DCM rule banned-dependencies since we do not configure it (and add comment so we know it's ok)
- Adhere to DCM 1.11.0:
- Add avoid-duplicate-cascades
- Add avoid-duplicate-switch-case-conditions
- Add avoid-unnecessary-local-late
- Add avoid-unnecessary-super
- Add prefer-both-inlining-annotations
- Add prefer-correct-callback-field-name
- Add prefer-correct-error-name
- Add prefer-correct-setter-parameter-name
- Add prefer-explicit-function-type
- Add prefer-specific-cases-first
- Add prefer-typedefs-for-callbacks
- Add prefer-unique-test-names
- Add prefer-widget-private-members

## 5.0.0
- Adhere to DCM 1.10.0:
- Add avoid-accessing-collections-by-constant-index
Expand Down
52 changes: 37 additions & 15 deletions lib/dcm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,25 @@ dart_code_metrics:
- avoid-accessing-collections-by-constant-index
- avoid-accessing-other-classes-private-members
- avoid-async-call-in-sync-function
# - avoid-banned-file-names
# - avoid-banned-imports
# - avoid-banned-types
# - avoid-banned-annotations # * OK, we just don't have global config
# - avoid-banned-file-names # * OK, we just don't have global config
# - avoid-banned-imports # * OK, we just don't have global config
# - avoid-banned-types # * OK, we just don't have global config
# - avoid-barrel-files # for now we use them
- avoid-bottom-type-in-patterns
- avoid-bottom-type-in-records
- avoid-cascade-after-if-null
- avoid-collapsible-if
- avoid-collection-methods-with-unrelated-types
# - avoid-collection-mutating-methods # sometimes it's ok
- avoid-declaring-call-method
- avoid-double-slash-imports
- avoid-duplicate-cascades
- avoid-duplicate-exports
- avoid-duplicate-mixins
- avoid-duplicate-named-imports
- avoid-duplicate-patterns
- avoid-duplicate-switch-case-conditions
- avoid-dynamic
- avoid-equal-expressions
- avoid-explicit-pattern-field-name
Expand All @@ -33,14 +37,15 @@ dart_code_metrics:
- avoid-identical-exception-handling-blocks
- avoid-ignoring-return-values
- avoid-importing-entrypoint-exports
# - avoid-inferrable-type-arguments # TODO, after config to ignore context.read and context.watch is added
- avoid-inverted-boolean-checks
- avoid-keywords-in-wildcard-pattern
# - avoid-late-keyword
- avoid-local-functions
# - avoid-long-files # hard to get the right settings
# - avoid-long-functions # way too pedantic
# - avoid-long-parameter-list: # way too pedantic
# ignore-optional: true # exclude optional and (non-required) named parameters
# ignore-optional: true # exclude optional and (non-required) named parameters
- avoid-long-records
- avoid-map-keys-contains
- avoid-missed-calls
Expand Down Expand Up @@ -98,11 +103,12 @@ dart_code_metrics:
- avoid-unnecessary-futures
# - avoid-unnecessary-getter # it's ok to have getter for private field
- avoid-unnecessary-if
- avoid-unnecessary-late
- avoid-unnecessary-local-late
- avoid-unnecessary-negations
- avoid-unnecessary-nullable-return-type
- avoid-unnecessary-reassignment
- avoid-unnecessary-return
- avoid-unnecessary-super
- avoid-unnecessary-type-assertions
- avoid-unnecessary-type-casts
- avoid-unrelated-type-assertions
Expand All @@ -113,7 +119,7 @@ dart_code_metrics:
- avoid-unused-parameters
- avoid-weak-cryptographic-algorithms
- avoid-wildcard-cases-with-enums
# - banned-usage
# - banned-usage # * OK, we just don't have global config
- binary-expression-operand-order
- double-literal-format
- enum-constants-ordering
Expand All @@ -126,6 +132,7 @@ dart_code_metrics:
- test/**
- match-class-name-pattern
# - match-getter-setter-field-names # forces API to equals internal code
# - match-lib-folder-structure # maybe later
# - match-positional-field-names-on-assignment # not compatible with avoid-redundant-positional-field-name
- member-ordering:
order:
Expand Down Expand Up @@ -181,25 +188,34 @@ dart_code_metrics:
#- no-magic-number: # way too strict for default values of parameters etc.
- no-object-declaration
# - parameters-ordering # way too strict
# - prefer-addition-subtraction-assignments # dunno
- prefer-async-await
- prefer-both-inlining-annotations
- prefer-bytes-builder
- prefer-commenting-analyzer-ignores
- prefer-conditional-expressions
# - prefer-correct-error-name # we use `e`
- prefer-correct-callback-field-name
- prefer-correct-error-name:
allowed-names:
- e
- prefer-correct-for-loop-increment
- prefer-correct-future-return-type
# - prefer-correct-handler-name # not now
# - prefer-correct-identifier-length # way too pedantic
# - prefer-correct-json-casts # overkill
- prefer-correct-setter-parameter-name
- prefer-correct-stream-return-type
- prefer-correct-switch-length
- prefer-correct-test-file-name
- prefer-correct-type-name
- prefer-declaring-const-constructor
- prefer-early-return
- prefer-enums-by-name
- prefer-explicit-function-type
- prefer-explicit-parameter-names
# - prefer-explicit-type-arguments # inference is better
- prefer-first
# - prefer-getter-over-method # way to pedantic
# - prefer-getter-over-method # way too pedantic
- prefer-immediate-return
- prefer-iterable-of
- prefer-last
Expand All @@ -211,25 +227,31 @@ dart_code_metrics:
exclude:
- test/**
- prefer-named-boolean-parameters
# - prefer-named-imports # ok, but we don't have a usecase now
# - prefer-named-imports # * OK, we just don't have global config
- prefer-null-aware-spread
- prefer-parentheses-with-if-null
# - prefer-prefixed-global-constants # * OK, we just don't have global config
- prefer-public-exception-classes
- prefer-return-await
# - prefer-returning-conditional-expressions # annoying sometimes
- prefer-simpler-patterns-null-check
- prefer-specific-cases-first
- prefer-static-class:
ignore-private: true
ignore-names:
- (.*)Provider
- use(.*)
- prefer-test-matchers
- prefer-trailing-comma
# - prefer-type-over-var # we prefer inference
# - prefer-type-over-var # we prefer type inference
- prefer-typedefs-for-callbacks
- prefer-unique-test-names
# - prefer-unwrapping-future-or # we are ok with awaiting values
- prefer-visible-for-testing-on-members
- avoid-missing-interpolation:
exclude:
- test/**
# - avoid-missing-test-files # * OK, but should be enabled per project
- prefer-wildcard-pattern
- tag-name
- unnecessary-trailing-comma:
Expand Down Expand Up @@ -269,7 +291,7 @@ dart_code_metrics:
- prefer-sliver-prefix
- prefer-text-rich
- prefer-using-list-view
# - prefer-widget-private-members # cannot use this.field in constructor
- prefer-widget-private-members
- proper-super-calls
- use-setstate-synchronously

Expand Down Expand Up @@ -302,10 +324,10 @@ dart_code_metrics:
- prefer-custom-finder-over-find
- prefer-symbol-over-key

## Fake Async
### Fake Async
- avoid-async-callback-in-fake-async

## Get It
### Get It
- avoid-functions-in-register-singleton:
severity: error

Expand All @@ -326,9 +348,9 @@ dart_code_metrics:
### Pubspec
- avoid-any-version
# - avoid-dependency-overrides
- banned-dependencies
# - banned-dependencies # * OK, we just don't have global config
- prefer-caret-version-syntax
# - prefer-correct-package-name
# - prefer-correct-package-name # * OK, we just don't have global config
- prefer-correct-screenshots
- prefer-publish-to-none
- prefer-semver-version
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: netglade_analysis
version: 5.0.0
version: 6.0.0
description: Lint rules for Dart and Flutter used internally at netglade.
repository: https://github.com/netglade/netglade_analysis
issue_tracker: https://github.com/netglade/netglade_analysis/issues
Expand Down