Skip to content

Commit 2a8f679

Browse files
committed
feat!: remove --version
1 parent 6d3dc43 commit 2a8f679

File tree

6 files changed

+2
-38
lines changed

6 files changed

+2
-38
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ body:
2727
label: Version
2828
description: |
2929
What version of commitlint_cli are you running?
30-
31-
> Tip: You can use `dart run commitlint_cli --version` to get the current version.
32-
placeholder: "0.5.1"
30+
placeholder: "version"
3331

3432
- type: textarea
3533
id: description

.pubignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
docs/
2-
scripts/
32
test/

docs/references-cli.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,4 @@ Global options:
1616
--edit read last commit message from the specified file.
1717
--from lower end of the commit range to lint. This is succeeded to --edit
1818
--to upper end of the commit range to lint. This is succeeded to --edit
19-
--version display version information
2019
```

lib/src/runner.dart

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import 'read.dart';
1010
import 'types/format.dart';
1111
import 'types/lint.dart';
1212
import 'types/rule.dart';
13-
import 'version.g.dart';
1413

1514
class CommitLintRunner extends CommandRunner {
1615
CommitLintRunner()
@@ -25,9 +24,7 @@ class CommitLintRunner extends CommandRunner {
2524
'lower end of the commit range to lint. This is succeeded to --edit')
2625
..addOption('to',
2726
help:
28-
'upper end of the commit range to lint. This is succeeded to --edit')
29-
..addFlag('version',
30-
negatable: false, help: 'display version information');
27+
'upper end of the commit range to lint. This is succeeded to --edit');
3128
}
3229

3330
@override
@@ -36,10 +33,6 @@ class CommitLintRunner extends CommandRunner {
3633

3734
@override
3835
Future<void> runCommand(ArgResults topLevelResults) async {
39-
if (topLevelResults['version'] == true) {
40-
stderr.writeln('commitlint@$kCurrentVersion');
41-
return;
42-
}
4336
if (topLevelResults.arguments.contains('-h') ||
4437
topLevelResults.arguments.contains('--help')) {
4538
printUsage();

lib/src/version.g.dart

Lines changed: 0 additions & 2 deletions
This file was deleted.

scripts/generate_version.dart

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)