Uploaded image for project: 'Skara'
  1. Skara
  2. SKARA-80

Allow valid bug ID format to be configurable

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P2 P2
    • None
    • None
    • cli
    • None

      The JDK project expects bug IDs to be exactly 7 digits with no prefix. This is enforced by `hg jcheck` today. The regex pattern used by the Skara tooling to determine what is a valid Bug ID is more relaxed in that it allows an optional prefix (e.g., JDK- or FOO123-), followed by 1 or more digits. This pattern is in a global variable, and is not configurable:

      vcs/src/main/java/org/openjdk/skara/vcs/openjdk/CommitMessageSyntax.java:
          public static final Pattern ISSUE_PATTERN = Pattern.compile("((?:[A-Z][A-Z0-9]+-)?[0-9]+): (\\S.*)$");

      The JDK project would likely prefer to use a pattern more like this:
          "([124-8][0-9]{6}): (\\S.*)$"

      Otherwise we will lose the check for too-few vs too-many digits that is there now (it would be too easy to miss the fact that there are 6 or 8 digits by visual inspection).

      If this were configurable, then each project could define their own rules (with jdk and jfx using the more restrictive rules).

            kcr Kevin Rushforth
            kcr Kevin Rushforth
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: