Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
31 changes: 22 additions & 9 deletions packages/netglade_analysis/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
## 23.0.0
- Adhere to DCM 1.37.0 and 1.38.0:
- Add avoid-labels
- Add initializers-ordering
- Add newline-before-break
- Add newline-before-continue
- Add newline-before-throw
- Add prefer-assert-initializers-first
- Add require-atomic-async-updates
- Add always-pass-global-key
- Add keep-state-below-its-widget
- TODO DCM 1.38.0

## 22.0.0
- Adhere to DCM 1.36.0:
- avoid-unassigned-local-variable
- avoid-unnecessary-parentheses
- prefer-non-nulls
- prefer-correct-static-icon-provider
- add-equatable-props
- avoid-implementation-in-mocks
- pass-mock-object
- prefer-correct-any-matcher
- use-then-answer
- Add avoid-unassigned-local-variable
- Add avoid-unnecessary-parentheses
- Add prefer-non-nulls
- Add prefer-correct-static-icon-provider
- Add add-equatable-props
- Add avoid-implementation-in-mocks
- Add pass-mock-object
- Add prefer-correct-any-matcher
- Add use-then-answer

## 21.0.0
- Adhere to DCM 1.34.0 and 1.35.0:
Expand Down
15 changes: 13 additions & 2 deletions packages/netglade_analysis/lib/dcm.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# version 1.35.0 - https://dcm.dev/changelog
# version 1.37.0 - https://dcm.dev/changelog
dart_code_metrics:
rules:
### Common
Expand Down Expand Up @@ -40,6 +40,7 @@ dart_code_metrics:
- avoid-default-tostring:
ignore-enums: true
- avoid-deprecated-usage
# - avoid-dot-shorthands # we prefer dot shorthands
- avoid-double-slash-imports
- avoid-duplicate-cascades
- avoid-duplicate-collection-elements
Expand Down Expand Up @@ -90,6 +91,7 @@ dart_code_metrics:
- Get.find
- avoid-inverted-boolean-checks
- avoid-keywords-in-wildcard-pattern
- avoid-labels
# - avoid-late-keyword
- avoid-local-functions:
exclude:
Expand Down Expand Up @@ -246,6 +248,7 @@ dart_code_metrics:
- useEffect
- function-always-returns-same-value
- handle-throwing-invocations
- initializers-ordering
- map-keys-ordering:
exclude:
- test/**
Expand All @@ -254,7 +257,8 @@ dart_code_metrics:
# - 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
# - max-imports # way too strict
# - max-imports # way too pedantic
# - max-statements # way too pedantic
- member-ordering:
order:
- public-fields
Expand Down Expand Up @@ -293,10 +297,13 @@ dart_code_metrics:
min-occurrences: 3
- move-variable-closer-to-its-usage
- move-variable-outside-iteration
- newline-before-break
- newline-before-case
- newline-before-constructor
- newline-before-continue
- newline-before-method
- newline-before-return
- newline-before-throw
- no-boolean-literal-compare:
allow-false: true # allows `variable == false` instead of just `!variable`
- no-empty-block
Expand Down Expand Up @@ -329,6 +336,7 @@ dart_code_metrics:
- prefer-add-all
# - prefer-addition-subtraction-assignments # dunno
- prefer-any-or-every
- prefer-assert-initializers-first
# - prefer-assigning-await-expressions # way too strict sometimes
- prefer-async-await
- prefer-boolean-prefixes:
Expand Down Expand Up @@ -461,6 +469,7 @@ dart_code_metrics:
- avoid-misused-test-matchers
- prefer-wildcard-pattern
- record-fields-ordering
- require-atomic-async-updates
- avoid-late-final-reassignment
# - tag-name # * OK, we just don't have global config
- unnecessary-trailing-comma:
Expand All @@ -469,6 +478,7 @@ dart_code_metrics:

### Flutter
# - add-copy-with # * OK, we just don't have global config
- always-pass-global-key
- always-remove-listener
- avoid-border-all
# - avoid-disposing-late-fields # not sure it works for us
Expand Down Expand Up @@ -497,6 +507,7 @@ dart_code_metrics:
- check-for-equals-in-render-object-setters
- consistent-update-render-object
- dispose-fields
- keep-state-below-its-widget
- pass-existing-future-to-future-builder
- pass-existing-stream-to-stream-builder
- prefer-action-button-tooltip
Expand Down
16 changes: 8 additions & 8 deletions packages/netglade_analysis/lib/lints.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ formatter:
page_width: 120
trailing_commas: preserve

# version 3.10.0 - https://github.com/dart-lang/sdk/blob/main/pkg/linter/CHANGELOG.md
# version 3.12.0 - https://github.com/dart-lang/sdk/blob/main/pkg/linter/CHANGELOG.md
# lints here - https://dart.dev/tools/linter-rules
linter:
rules:
Expand Down Expand Up @@ -65,6 +65,7 @@ linter:
- use_key_in_widget_constructors
- use_truncating_division
- valid_regexps
- var_with_no_type_annotation

### STYLE
- always_declare_return_types
Expand All @@ -89,7 +90,6 @@ linter:
- avoid_init_to_null
- avoid_js_rounded_ints
- avoid_multiple_declarations_per_line
- avoid_null_checks_in_equality_operators
- avoid_equals_and_hash_code_on_mutable_classes
- avoid_positional_boolean_parameters
- avoid_private_typedef_functions
Expand Down Expand Up @@ -147,8 +147,8 @@ linter:
- null_check_on_nullable_type_parameter
- null_closures
- omit_local_variable_types
# - omit_obvious_local_variable_types # ! experimental
# - omit_obvious_property_types # ! experimental
# - omit_obvious_local_variable_types
# - omit_obvious_property_types
- one_member_abstracts
- only_throw_errors
- overridden_fields
Expand All @@ -170,7 +170,6 @@ linter:
- prefer_final_fields
- prefer_final_in_for_each
- prefer_final_locals
# - prefer_final_parameters
# - prefer_foreach
- prefer_for_elements_to_map_fromIterable
- prefer_function_declarations_over_variables
Expand All @@ -196,14 +195,16 @@ linter:
- recursive_getters
# - remove_deprecations_in_breaking_versions
- require_trailing_commas
- simple_directive_paths
- simplify_variable_pattern
- sized_box_for_whitespace
- sized_box_shrink_expand
- slash_for_doc_comments
- sort_child_properties_last
# - sort_constructors_first
- sort_unnamed_constructors_first
# - specify_nonobvious_local_variable_types # ! experimental
# - specify_nonobvious_property_types # ! experimental
# - specify_nonobvious_local_variable_types
# - specify_nonobvious_property_types
- strict_top_level_inference
- tighten_type_of_initializing_formals
- type_annotate_public_apis
Expand Down Expand Up @@ -244,7 +245,6 @@ linter:
- use_enums
- use_full_hex_values_for_flutter_colors
- use_function_type_syntax_for_parameters
- use_if_null_to_convert_nulls_to_bools
- use_is_even_rather_than_modulo
- use_late_for_private_fields_and_variables
- use_named_constants
Expand Down
Loading