Skip to content

Commit

Permalink
➖ remove dart_code_metrics from dev_dependencies (#452)
Browse files Browse the repository at this point in the history
* ➖ remove dart_code_metrics as a dev dependency

* 🧑‍💻 update examples
  • Loading branch information
techouse authored Jul 9, 2023
1 parent 0856b86 commit 96f9dbc
Show file tree
Hide file tree
Showing 12 changed files with 132 additions and 201 deletions.
21 changes: 0 additions & 21 deletions chopper/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,6 @@ analyzer:
- "**.chopper.dart"
- "**.mocks.dart"
- "example/**"
plugins:
- dart_code_metrics

dart_code_metrics:
metrics:
cyclomatic-complexity: 20
number-of-arguments: 4
maximum-nesting-level: 5
number-of-parameters: 7
metrics-exclude:
- test/**
rules:
- newline-before-return
- no-boolean-literal-compare
- no-empty-block
- prefer-trailing-comma
- prefer-conditional-expressions
- no-equal-then-else
anti-patterns:
- long-method
- long-parameter-list

linter:
rules:
Expand Down
1 change: 0 additions & 1 deletion chopper/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ dev_dependencies:
build_verify: ^3.1.0
collection: ^1.16.0
coverage: ^1.0.2
dart_code_metrics: '>=4.8.1 <6.0.0'
data_fixture_dart: ^2.2.0
faker: ^2.1.0
http_parser: ^4.0.0
Expand Down
21 changes: 0 additions & 21 deletions chopper_built_value/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,6 @@ analyzer:
- "**.chopper.dart"
- "**.mocks.dart"
- "example/**"
plugins:
- dart_code_metrics

dart_code_metrics:
metrics:
cyclomatic-complexity: 20
number-of-arguments: 4
maximum-nesting-level: 5
number-of-parameters: 7
metrics-exclude:
- test/**
rules:
- newline-before-return
- no-boolean-literal-compare
- no-empty-block
- prefer-trailing-comma
- prefer-conditional-expressions
- no-equal-then-else
anti-patterns:
- long-method
- long-parameter-list

linter:
rules:
Expand Down
1 change: 0 additions & 1 deletion chopper_built_value/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ dev_dependencies:
build_runner: ^2.0.0
build_test: ^2.0.0
built_value_generator: ^8.0.6
dart_code_metrics: '>=4.8.1 <6.0.0'
lints: ^2.0.0

dependency_overrides:
Expand Down
22 changes: 0 additions & 22 deletions chopper_generator/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,6 @@ analyzer:
- "**.chopper.dart"
- "**.mocks.dart"
- "example/**"
plugins:
- dart_code_metrics

dart_code_metrics:
metrics:
cyclomatic-complexity: 20
number-of-arguments: 4
maximum-nesting-level: 5
number-of-parameters: 10
source-lines-of-code: 250
metrics-exclude:
- test/**
rules:
- newline-before-return
- no-boolean-literal-compare
- no-empty-block
- prefer-trailing-comma
- prefer-conditional-expressions
- no-equal-then-else
anti-patterns:
- long-method
- long-parameter-list

linter:
rules:
Expand Down
1 change: 0 additions & 1 deletion chopper_generator/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ dependencies:
dev_dependencies:
build_runner: ^2.0.0
build_verify: ^3.1.0
dart_code_metrics: '>=4.8.1 <6.0.0'
http: ">=0.13.0 <2.0.0"
lints: ^2.0.0
test: ^1.16.4
Expand Down
20 changes: 0 additions & 20 deletions example/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,6 @@ analyzer:
- "**.g.dart"
- "**.chopper.dart"
- "**.mocks.dart"
plugins:
- dart_code_metrics

dart_code_metrics:
metrics:
cyclomatic-complexity: 20
number-of-arguments: 4
maximum-nesting-level: 5
metrics-exclude:
- test/**
rules:
- newline-before-return
- no-boolean-literal-compare
- no-empty-block
- prefer-trailing-comma
- prefer-conditional-expressions
- no-equal-then-else
anti-patterns:
- long-method
- long-parameter-list

linter:
rules:
Expand Down
3 changes: 2 additions & 1 deletion example/lib/json_decode_service.activator.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions example/lib/json_decode_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ part 'json_decode_service.worker.g.dart';
// disable web to keep the number of generated files low for this example
web: false,
)
class JsonDecodeService extends WorkerService
with $JsonDecodeServiceOperations {
class JsonDecodeService {
@SquadronMethod()
Future<dynamic> jsonDecode(String source) async => json.decode(source);
}
12 changes: 7 additions & 5 deletions example/lib/json_decode_service.vm.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 96f9dbc

Please sign in to comment.