Skip to content

Commit e577f6f

Browse files
authored
Merge pull request #12 from netglade/release/4.0.0
Update to 4.0.0
2 parents 9c41f24 + f2f0f98 commit e577f6f

File tree

5 files changed

+47
-8
lines changed

5 files changed

+47
-8
lines changed

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
## 4.0.0
2+
- Adhere to DCM 1.8.0:
3+
- Add prefer-custom-finder-over-find
4+
- Add prefer-symbol-over-key
5+
- Add avoid-map-keys-contains
6+
- Add avoid-async-call-in-sync-function
7+
- Add avoid-duplicate-mixins
8+
- Add avoid-nullable-interpolation
9+
- Add avoid-unused-instances
10+
- Add enum-constants-ordering
11+
- Add prefer-named-boolean-parameters
12+
- Add prefer-correct-for-loop-increment
13+
- Add prefer-public-exception-classes
14+
- Add avoid-unnecessary-reassignment
15+
- Add avoid-recursive-widget-calls
16+
- Add prefer-text-rich
17+
- Adhere to Dart lints 3.1.0:
18+
- Add no_self_assignments
19+
- Add no_wildcard_variable_uses
20+
121
## 3.0.0
222
- Adhere to DCM 1.7.0:
323
- Add avoid-accessing-other-classes-private-members

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ To use the lints, add as a dev dependency in your `pubspec.yaml`:
2727

2828
```yaml
2929
dev_dependencies:
30-
netglade_analysis: ^2.0.0
30+
netglade_analysis: ^4.0.0
3131
```
3232
3333
Then, add an include in `analysis_options.yaml`:

lib/dcm.yaml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# version 1.7.0 - https://dcm.dev/changelog/
1+
# version 1.8.0 - https://dcm.dev/changelog/
22
dart_code_metrics:
33
pubspec-rules:
44
### Pubspec
@@ -15,6 +15,7 @@ dart_code_metrics:
1515
### Common
1616
# - arguments-ordering # way too pedantic
1717
- avoid-accessing-other-classes-private-members
18+
- avoid-async-call-in-sync-function
1819
# - avoid-banned-file-names
1920
# - avoid-banned-imports
2021
# - avoid-banned-types
@@ -27,6 +28,7 @@ dart_code_metrics:
2728
- avoid-declaring-call-method
2829
- avoid-double-slash-imports
2930
- avoid-duplicate-exports
31+
- avoid-duplicate-mixins
3032
- avoid-duplicate-named-imports
3133
- avoid-duplicate-patterns
3234
- avoid-dynamic
@@ -38,14 +40,15 @@ dart_code_metrics:
3840
- avoid-generics-shadowing
3941
- avoid-global-state
4042
- avoid-ignoring-return-values
41-
# - avoid-importing-entrypoint-exports: false # TODO: has false positives in monorepo
43+
- avoid-importing-entrypoint-exports
4244
- avoid-inverted-boolean-checks
4345
- avoid-keywords-in-wildcard-pattern
4446
# - avoid-late-keyword
4547
# - avoid-long-functions # way too pedantic
4648
# - avoid-long-parameter-list: # way too pedantic
47-
# ignore-optional: true # exclude optional and (non-required) named parameters
49+
# ignore-optional: true # exclude optional and (non-required) named parameters
4850
- avoid-long-records
51+
- avoid-map-keys-contains
4952
- avoid-missed-calls
5053
- avoid-missing-enum-constant-in-map
5154
- avoid-misused-wildcard-pattern
@@ -65,6 +68,7 @@ dart_code_metrics:
6568
- avoid-non-null-assertion:
6669
exclude:
6770
- test/**
71+
- avoid-nullable-interpolation
6872
- avoid-one-field-records
6973
- avoid-passing-async-when-sync-expected:
7074
exclude:
@@ -93,24 +97,28 @@ dart_code_metrics:
9397
- avoid-unnecessary-futures
9498
- avoid-unnecessary-negations
9599
- avoid-unnecessary-nullable-return-type
100+
- avoid-unnecessary-reassignment
96101
- avoid-unnecessary-return
97102
- avoid-unnecessary-type-assertions
98103
- avoid-unnecessary-type-casts
99104
- avoid-unrelated-type-assertions
100105
- avoid-unrelated-type-casts
101106
- avoid-unsafe-collection-methods
102107
- avoid-unused-generics
108+
- avoid-unused-instances
103109
- avoid-unused-parameters
104110
# - banned-usage
105111
- binary-expression-operand-order
106112
- double-literal-format
113+
- enum-constants-ordering
107114
- format-comment:
108115
only-doc-comments: true
109116
# - format-test-name # good but painful
110117
- function-always-returns-null
111118
- map-keys-ordering:
112119
exclude:
113120
- test/**
121+
- match-class-name-pattern
114122
# - match-positional-field-names-on-assignment # not compatible with avoid-redundant-positional-field-name
115123
- member-ordering:
116124
order:
@@ -140,6 +148,7 @@ dart_code_metrics:
140148
- move-records-to-typedefs:
141149
min-fields: 3
142150
min-occurrences: 3
151+
- newline-before-case
143152
- newline-before-return
144153
- no-boolean-literal-compare:
145154
allow-false: true # allows `variable == false` instead of just `!variable`
@@ -168,8 +177,10 @@ dart_code_metrics:
168177
- prefer-commenting-analyzer-ignores
169178
- prefer-conditional-expressions
170179
# - prefer-correct-error-name # we use `e`
180+
- prefer-correct-for-loop-increment
171181
- prefer-correct-future-return-type
172182
# - prefer-correct-identifier-length # way too pedantic
183+
# - prefer-correct-json-casts # overkill213
173184
- prefer-correct-stream-return-type
174185
- prefer-correct-switch-length
175186
- prefer-correct-test-file-name
@@ -189,7 +200,9 @@ dart_code_metrics:
189200
allowed-duplicated-chains: 3
190201
exclude:
191202
- test/**
203+
- prefer-named-boolean-parameters
192204
- prefer-parentheses-with-if-null
205+
- prefer-public-exception-classes
193206
- prefer-return-await
194207
# - prefer-returning-conditional-expressions # annoying sometimes
195208
- prefer-simpler-patterns-null-check
@@ -218,6 +231,7 @@ dart_code_metrics:
218231
- avoid-inherited-widget-in-initstate
219232
- avoid-late-context
220233
- avoid-missing-image-alt
234+
- avoid-recursive-widget-calls
221235
- avoid-returning-widgets
222236
- avoid-shrink-wrap-in-lists
223237
- avoid-state-constructors
@@ -237,6 +251,7 @@ dart_code_metrics:
237251
- prefer-extracting-callbacks
238252
- prefer-single-widget-per-file:
239253
ignore-private-widgets: true
254+
- prefer-text-rich
240255
- prefer-using-list-view
241256
# - prefer-widget-private-members # cannot use this.field in constructor
242257
- proper-super-calls
@@ -266,3 +281,7 @@ dart_code_metrics:
266281
### Intl - not used
267282

268283
### Angular - not used
284+
285+
### Patrol
286+
- prefer-custom-finder-over-find
287+
- prefer-symbol-over-key

lib/lints.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ analyzer:
1616
deprecated_member_use_from_same_package: warning
1717
record_literal_one_positional_no_trailing_comma: error
1818

19-
# version 1.35.0 - https://github.com/dart-lang/linter/blob/main/CHANGELOG.md
19+
# version 3.1.0 - https://github.com/dart-lang/linter/blob/main/CHANGELOG.md
2020
linter:
2121
rules:
2222
### ERROR
@@ -45,8 +45,8 @@ linter:
4545
- no_adjacent_strings_in_list
4646
- no_duplicate_case_values
4747
- no_logic_in_create_state
48-
# - no_self_assignments # WIP
49-
# - no_wildcard_variable_uses # WIP
48+
- no_self_assignments
49+
- no_wildcard_variable_uses
5050
# - prefer_relative_imports
5151
- prefer_void_to_null
5252
- test_types_in_equals

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: netglade_analysis
2-
version: 3.0.0
2+
version: 4.0.0
33
description: Lint rules for Dart and Flutter used internally at netglade.
44
repository: https://github.com/netglade/netglade_analysis
55
issue_tracker: https://github.com/netglade/netglade_analysis/issues

0 commit comments

Comments
 (0)