RFR: 2286: Git jcheck --working-tree/--staged not compatible with some checks

Erik Joelsson erikj at openjdk.org
Fri Jun 7 17:34:49 UTC 2024


On Fri, 7 Jun 2024 16:23:19 GMT, Zhao Song <zsong at openjdk.org> wrote:

> In [SKARA-1690](https://bugs.openjdk.org/browse/SKARA-1690), I tried to make SKARA CLI able to run jcheck on the diff in current working tree. But seems like this feature is not compatible with some jchecks like problemLists check.
> 
> When jcheck is checking staged or working-tree, I think there is no point to run some checks that require real commit message. Therefore I disabled the checks and Skara CLI will print a prompt to user.

cli/src/main/java/org/openjdk/skara/cli/GitJCheck.java line 333:

> 331:             ranges.clear();
> 332:             ranges.add(WORKING_TREE_REV);
> 333:             System.out.println("When jcheck is running on working-tree, the following checks are not available: DuplicateIssuesCheck, IssuesCheck, IssuesTitleCheck, MergeMessageCheck, MessageCheck, ProblemListsCheck, ReviewersCheck.");

Instead of listing the checks that aren't available, I think we should list the checks that are and base that list on the actual list in JCheck.java. A manually created message like this will likely get outdated in the future.

-------------

PR Review Comment: https://git.openjdk.org/skara/pull/1658#discussion_r1631508831


More information about the skara-dev mailing list