Skip to content

Commit 1ae4682

Browse files
author
Honza Bittner
committed
Init version 7.0.0
1 parent 4c6c7b8 commit 1ae4682

File tree

5 files changed

+29
-9
lines changed

5 files changed

+29
-9
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
## 7.0.0
2+
- Adhere to DCM 1.13.0:
3+
- Add avoid-duplicate-collection-elements
4+
- Add avoid-duplicate-initializers
5+
- Add avoid-duplicate-map-keys
6+
- Add avoid-nullable-tostring
7+
- Add avoid-unused-after-null-check
8+
- Add move-variable-outside-iteration
9+
- Update prefer-switch-with-enums with `ignore-contains: true`
10+
- Remove DCM rules `match-class-name-pattern`, `tag-name`, `add-copy-with`, and `extend-equatable`, since we do not configure it (and added comment so we know it's ok)
11+
112
## 6.0.0
213
- Add DCM rule prefer-correct-error-name with `e` for error
314
- Add DCM rule prefer-widget-private-members

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 0.0.1
33
publish_to: none
44

55
environment:
6-
sdk: ">=2.18.0 <3.0.0"
6+
sdk: ">=2.18.0 <4.0.0"
77

88
dependencies:
99
netglade_analysis:

lib/dcm.yaml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# version 1.12.0 - https://dcm.dev/changelog/
1+
# version 1.13.0 - https://dcm.dev/changelog/
22
dart_code_metrics:
33
rules:
44
### Common
@@ -20,7 +20,10 @@ dart_code_metrics:
2020
- avoid-declaring-call-method
2121
- avoid-double-slash-imports
2222
- avoid-duplicate-cascades
23+
- avoid-duplicate-collection-elements
2324
- avoid-duplicate-exports
25+
- avoid-duplicate-initializers
26+
- avoid-duplicate-map-keys
2427
- avoid-duplicate-mixins
2528
- avoid-duplicate-named-imports
2629
- avoid-duplicate-patterns
@@ -75,6 +78,7 @@ dart_code_metrics:
7578
- test/**
7679
- avoid-nullable-interpolation
7780
- avoid-nullable-parameters-with-default-values
81+
- avoid-nullable-tostring
7882
- avoid-one-field-records
7983
- avoid-passing-async-when-sync-expected:
8084
exclude:
@@ -119,6 +123,7 @@ dart_code_metrics:
119123
- avoid-unrelated-type-assertions
120124
- avoid-unrelated-type-casts
121125
- avoid-unsafe-collection-methods
126+
- avoid-unused-after-null-check
122127
- avoid-unused-generics
123128
- avoid-unused-instances
124129
- avoid-unused-parameters
@@ -137,7 +142,7 @@ dart_code_metrics:
137142
- map-keys-ordering:
138143
exclude:
139144
- test/**
140-
- match-class-name-pattern
145+
# - match-class-name-pattern # * OK, we just don't have global config
141146
# - match-getter-setter-field-names # forces API to equals internal code
142147
# - match-lib-folder-structure # maybe later
143148
# - match-positional-field-names-on-assignment # not compatible with avoid-redundant-positional-field-name
@@ -170,6 +175,7 @@ dart_code_metrics:
170175
min-fields: 3
171176
min-occurrences: 3
172177
- move-variable-closer-to-its-usage
178+
- move-variable-outside-iteration
173179
- newline-before-case
174180
- newline-before-return
175181
- no-boolean-literal-compare:
@@ -238,7 +244,7 @@ dart_code_metrics:
238244
# - prefer-named-imports # * OK, we just don't have global config
239245
- prefer-null-aware-spread
240246
- prefer-parentheses-with-if-null
241-
# - prefer-prefixed-global-constants # * OK, we just don't have global config
247+
# - prefer-prefixed-global-constants # * OK, we just don't have global config
242248
- prefer-public-exception-classes
243249
- prefer-return-await
244250
# - prefer-returning-conditional-expressions # annoying sometimes
@@ -249,7 +255,8 @@ dart_code_metrics:
249255
ignore-names:
250256
- (.*)Provider
251257
- use(.*)
252-
- prefer-switch-with-enums
258+
- prefer-switch-with-enums:
259+
ignore-contains: true
253260
- prefer-test-matchers
254261
- prefer-trailing-comma
255262
# - prefer-type-over-var # we prefer type inference
@@ -263,12 +270,12 @@ dart_code_metrics:
263270
# - avoid-missing-test-files # * OK, but should be enabled per project
264271
- avoid-misused-test-matchers
265272
- prefer-wildcard-pattern
266-
- tag-name
273+
# - tag-name # * OK, we just don't have global config
267274
- unnecessary-trailing-comma:
268275
max-width: 80
269276

270277
### Flutter
271-
- add-copy-with
278+
# - add-copy-with # * OK, we just don't have global config
272279
- always-remove-listener
273280
- avoid-border-all
274281
- avoid-empty-setstate
@@ -321,7 +328,7 @@ dart_code_metrics:
321328
- prefer-multi-bloc-provider
322329

323330
### Equatable
324-
- extend-equatable
331+
# - extend-equatable # * OK, we just don't have global config
325332
- list-all-equatable-fields
326333

327334
### Flame - not used

lib/netglade_analysis.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore_for_file: unused-files
2+
13
/// NetGlade Dart and Flutter analyzer settings and best practices
24
/// used internally at [netglade](https://netglade.com).
35
library netglade_analysis;

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: 6.0.0
2+
version: 7.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)