Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

Commit

Permalink
fix: restore analyze command as default command (#675)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkrutskikh authored Feb 1, 2022
1 parent dfa1280 commit 67c2f3d
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 10 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"bools",
"codeclimate",
"codecov",
"codequality",
"cyclomatic",
"dartanalyzer",
"dartdocs",
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 4.10.1

* fix: restore `analyze` command as default command.

## 4.10.0

* feat: add `check-unused-code` command with monorepos support.
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ To set this up:
```yaml
name: dart_code_metrics_plugin_loader
description: This pubspec determines the version of the analyzer plugin to load.
version: 4.10.0
version: 4.10.1
environment:
sdk: ">=2.14.0 <3.0.0"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ add it manually to `pubspec.yaml`

```yaml
dev_dependencies:
dart_code_metrics: ^4.10.0
dart_code_metrics: ^4.10.1
```
and then run
Expand Down
6 changes: 4 additions & 2 deletions lib/src/cli/cli_runner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ class CliRunner extends CommandRunner<void> {
@override
Future<void> run(Iterable<String> args) async {
try {
final results = parse(args);
final argsWithDefaultCommand = _addDefaultCommand(args);

final results = parse(argsWithDefaultCommand);
final showVersion = results[FlagNames.version] as bool;

if (showVersion) {
Expand All @@ -47,7 +49,7 @@ class CliRunner extends CommandRunner<void> {
return;
}

await super.run(_addDefaultCommand(args));
await super.run(argsWithDefaultCommand);
} on UsageException catch (e) {
_output
..writeln(e.message)
Expand Down
2 changes: 1 addition & 1 deletion lib/src/version.dart
Original file line number Diff line number Diff line change
@@ -1 +1 @@
const packageVersion = '4.10.0';
const packageVersion = '4.10.1';
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: dart_code_metrics
version: 4.10.0
version: 4.10.1
description: Software analytics tool that helps developers analyse and improve software quality.
homepage: https://dartcodemetrics.dev
repository: https://github.com/dart-code-checker/dart-code-metrics
Expand Down
4 changes: 2 additions & 2 deletions tools/analyzer_plugin/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: dart_code_metrics_plugin_loader
description: This pubspec determines the version of the analyzer plugin to load.
version: 4.10.0
version: 4.10.1

environment:
sdk: ">=2.14.0 <3.0.0"

dependencies:
dart_code_metrics: ^4.10.0
dart_code_metrics: ^4.10.1

dev_dependencies:
lints: ^1.0.1
2 changes: 1 addition & 1 deletion website/docs/cli/analyze.md
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ code_quality:
before_script:
- dart pub global activate dart_code_metrics
script:
- dart pub global run dart_code_metrics:metrics lib -r gitlab > code-quality-report.json
- dart pub global run dart_code_metrics:metrics analyze lib -r gitlab > code-quality-report.json
artifacts:
reports:
codequality: code-quality-report.json
Expand Down
2 changes: 1 addition & 1 deletion website/docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ environment:
sdk: '>=2.12.0 <3.0.0'

dev_dependencies:
dart_code_metrics: ^4.10.0
dart_code_metrics: ^4.10.1
```
and then run
Expand Down

0 comments on commit 67c2f3d

Please sign in to comment.