File tree Expand file tree Collapse file tree
packages/commitlint_cli/lib/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4141 # Your project will need to have tests in test/ and a dependency on
4242 # package:test for this step to succeed. Note that Flutter projects will
4343 # want to change this to 'flutter test'.
44- # - name: Run tests
45- # run: melos test --no-select
44+ - name : Run tests
45+ run : melos test --no-select
Original file line number Diff line number Diff line change 33
44melos analyze
55melos format-check
6- # melos test --no-select
6+ melos test --no-select
Original file line number Diff line number Diff line change @@ -44,5 +44,5 @@ scripts:
4444 exec : dart format . --output=none --set-exit-if-changed
4545 description : Run `dart format` checks for all packages.
4646
47- version : dart scripts/generate_version.dart && git add packages/commitlit_cli /lib/src/version.g.dart
47+ version : dart scripts/generate_version.dart && git add packages/commitlint_cli /lib/src/version.g.dart
4848 bootstrap : dart pub get && dart run husky install
Original file line number Diff line number Diff line change @@ -19,10 +19,10 @@ class CommitLintRunner extends CommandRunner {
1919 help: 'read last commit message from the specified file.' )
2020 ..addOption ('from' ,
2121 help:
22- 'lower end of the commit range to lint. This is preceded to --edit' )
22+ 'lower end of the commit range to lint. This is succeeded to --edit' )
2323 ..addOption ('to' ,
2424 help:
25- 'upper end of the commit range to lint. This is preceded to --edit' )
25+ 'upper end of the commit range to lint. This is succeeded to --edit' )
2626 ..addFlag ('version' ,
2727 negatable: false , help: 'display version information' );
2828 }
@@ -46,11 +46,9 @@ class CommitLintRunner extends CommandRunner {
4646 final to = topLevelResults['to' ] as String ? ;
4747 final edit = topLevelResults['edit' ] as String ? ;
4848 bool fromStdin = from == null && to == null && edit == null ;
49- final messages = fromStdin
50- ? await _stdin ()
51- : await read (from: from, to: to, edit: edit ?? '.git/COMMIT_EDITMSG' );
52- final rules = await load (LoadOptions (
53- cwd: Directory .current.path, file: topLevelResults['config' ]));
49+ final messages =
50+ fromStdin ? await _stdin () : await read (from: from, to: to, edit: edit);
51+ final rules = await load (file: topLevelResults['config' ]);
5452 final results = (await Future .wait (
5553 messages.map ((message) async => await lint (message, rules))));
5654 if (rules.isEmpty) {
Original file line number Diff line number Diff line change @@ -2,10 +2,9 @@ name: commitlint_monorepo
22publish_to : none
33
44environment :
5- sdk : ' >=2.12 .0 <3.0.0'
5+ sdk : ' >=2.18 .0 <3.0.0'
66
77dev_dependencies :
8- args : ^2.3.1
98 commitlint_cli : ^0.1.0
109 commitlint_config : ^0.1.0
1110 commitlint_format : ^0.1.0
@@ -35,7 +34,3 @@ dependency_overrides:
3534 path : ./packages/commitlint_rules
3635 commitlint_types :
3736 path : ./packages/commitlint_types
38-
39- # This allows us to use commitlint on itself during development.
40- executables :
41- commitlint:
You can’t perform that action at this time.
0 commit comments