Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .fvmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"flutter": "3.38.2"
"flutter": "3.44.2"
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"dart.flutterSdkPath": ".fvm/versions/3.38.2",
"dart.flutterSdkPath": ".fvm/versions/3.44.2",
"search.exclude": {
"**/.fvm": true,
"**/*.g.dart": true
Expand Down
2 changes: 1 addition & 1 deletion dcm_global.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version: "1.36.0"
version: "1.38.0"
49 changes: 40 additions & 9 deletions packages/netglade_analysis/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,45 @@
## 23.0.0
- Exclude in tests:
- avoid-duplicate-collection-elements
Comment thread
tenhobi marked this conversation as resolved.
- avoid-unsafe-collection-methods
- avoid-sensitive-query-params
- Adhere to DCM 1.38.0
- Add avoid-duplicate-factories
- Add avoid-unnecessary-factory
- Add avoid-unmodified-loop-condition
- Add prefer-private-named-parameters
- Add prefer-initializing-formals
- Add prefer-random-secure
- Add avoid-sensitive-query-params
- Add avoid-unrestricted-navigation
- Add avoid-unrestricted-javascript
- Add prefer-single-notifier-per-file
- Add prefer-correct-provider-file-name
- Add prefer-riverpod-provider-suffix
- Add prefer-riverpod-notifier-suffix
- Add prefer-correct-notifier-file-name
- Adhere to DCM 1.37.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
Comment thread
tenhobi marked this conversation as resolved.

## 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
2 changes: 1 addition & 1 deletion packages/netglade_analysis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ To use the lints, add as a dev dependency in your `pubspec.yaml`:

```yaml
dev_dependencies:
netglade_analysis: ^22.0.0
netglade_analysis: ^23.0.0
```

Then, add an include in `analysis_options.yaml`:
Expand Down
2 changes: 1 addition & 1 deletion packages/netglade_analysis/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ publish_to: none
version: 0.0.1

environment:
sdk: ">=3.6.0 <4.0.0"
sdk: ^3.12.0

dependencies:
netglade_analysis:
Expand Down
39 changes: 35 additions & 4 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,11 +40,15 @@ 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
- avoid-duplicate-collection-elements:
exclude:
- test/**
# - avoid-duplicate-constant-values # ! check later, does not work for us for 2+ parameters as expected
- avoid-duplicate-exports
- avoid-duplicate-factories
- avoid-duplicate-initializers
- avoid-duplicate-map-keys
- avoid-duplicate-mixins
Expand Down Expand Up @@ -90,6 +94,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 @@ -157,6 +162,9 @@ dart_code_metrics:
- avoid-returning-void
- avoid-self-assignment
- avoid-self-compare
- avoid-sensitive-query-params:
exclude:
- test/**
- avoid-shadowed-extension-methods
- avoid-shadowing:
ignore-parameters: true
Expand All @@ -183,6 +191,7 @@ dart_code_metrics:
- avoid-uncaught-future-errors
- avoid-unconditional-break
- avoid-unknown-pragma
- avoid-unmodified-loop-condition
- avoid-unnecessary-block
- avoid-unnecessary-call
- avoid-unnecessary-collections
Expand All @@ -194,6 +203,7 @@ dart_code_metrics:
- avoid-unnecessary-enum-arguments
- avoid-unnecessary-enum-prefix
- avoid-unnecessary-extends
- avoid-unnecessary-factory
- avoid-unnecessary-futures
# - avoid-unnecessary-getter # it's ok to have getter for private field
- avoid-unnecessary-if
Expand All @@ -219,7 +229,9 @@ dart_code_metrics:
- avoid-unrelated-type-assertions
- avoid-unrelated-type-casts
- avoid-unremovable-callbacks-in-listeners
- avoid-unsafe-collection-methods
- avoid-unsafe-collection-methods:
exclude:
- test/**
- avoid-unsafe-reduce
- avoid-unused-after-null-check
- avoid-unused-assignment
Expand All @@ -246,6 +258,7 @@ dart_code_metrics:
- useEffect
- function-always-returns-same-value
- handle-throwing-invocations
- initializers-ordering
- map-keys-ordering:
exclude:
- test/**
Expand All @@ -254,7 +267,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 +307,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 +346,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 @@ -395,6 +413,7 @@ dart_code_metrics:
- prefer-for-in
# - prefer-getter-over-method # way too pedantic
- prefer-immediate-return
- prefer-initializing-formals
- prefer-iterable-of
- prefer-last
- prefer-match-file-name:
Expand All @@ -417,8 +436,10 @@ dart_code_metrics:
- prefer-parentheses-with-if-null
# - prefer-prefixed-global-constants # * OK, we just don't have global config
- prefer-private-extension-type-field
- prefer-private-named-parameters
- prefer-public-exception-classes
- prefer-pushing-conditional-expressions
- prefer-random-secure
- prefer-redirecting-superclass-constructor
- prefer-return-await
# - prefer-returning-condition # Sometimes it is more readable to have if statement
Expand Down Expand Up @@ -461,6 +482,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 +491,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 All @@ -493,10 +516,13 @@ dart_code_metrics:
- avoid-unnecessary-overrides-in-state
- avoid-unnecessary-setstate
- avoid-unnecessary-stateful-widgets
- avoid-unrestricted-javascript
- avoid-unrestricted-navigation
- avoid-wrapping-in-padding
- 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 Expand Up @@ -582,7 +608,12 @@ dart_code_metrics:
- avoid-ref-watch-outside-build
- avoid-unnecessary-consumer-widgets
- dispose-provided-instances
- prefer-correct-notifier-file-name
- prefer-correct-provider-file-name
- prefer-immutable-provider-arguments
- prefer-riverpod-notifier-suffix
- prefer-riverpod-provider-suffix
- prefer-single-notifier-per-file
- use-ref-and-state-synchronously
- use-ref-read-synchronously

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
4 changes: 2 additions & 2 deletions packages/netglade_analysis/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: netglade_analysis
resolution: workspace
description: Lint rules for Dart and Flutter used internally at netglade.
version: 22.0.0
version: 23.0.0
repository: https://github.com/netglade/flutter_core/tree/main/packages/netglade_analysis
issue_tracker: https://github.com/netglade/flutter_core/issues
homepage: https://github.com/netglade/flutter_core
documentation: https://github.com/netglade/flutter_core/tree/main/packages/netglade_analysis

environment:
sdk: ^3.10.0
sdk: ^3.12.0
screenshots:
- description: The netglade_analysis package logo.
path: doc/icon.png
5 changes: 3 additions & 2 deletions packages/netglade_flutter_utils/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## Unreleased
- Require Dart SDK 3.10.0 or later.
## 1.4.0
- Require Dart SDK 3.12.0 or later.
- Require Flutter SDK 3.42.0 or later.

## 1.3.0
- Require Dart SDK 3.9.0 or later.
Expand Down
6 changes: 3 additions & 3 deletions packages/netglade_flutter_utils/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ publish_to: none
version: 0.0.1

environment:
sdk: ^3.10.0
flutter: ">=3.32.0"
sdk: ^3.12.0
flutter: '>=3.42.0'

dependencies:
flutter:
sdk: flutter
netglade_analysis: ^22.0.0
netglade_analysis: ^23.0.0
netglade_flutter_utils:
path: ..

Expand Down
Loading
Loading