change "column" to "colon"
Seems like it was just a thinko here as there is no such thing as
a "column character", and all the syntax is parsing colons.
Change-Id: Ib5fd1c96f66a95fbec323f44033b9cf777eb11aa
diff --git a/src/main/java/com/googlesource/gerrit/plugins/findowners/Parser.java b/src/main/java/com/googlesource/gerrit/plugins/findowners/Parser.java
index b3ecda3..c1cd591 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/findowners/Parser.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/findowners/Parser.java
@@ -56,7 +56,7 @@
protected static final String COMMA = "[\\s]*,[\\s]*"; // used in unit tests
// Separator for project and file paths in an include line.
- private static final String COLUMN = "[\\s]*:[\\s]*"; // project:file
+ private static final String COLON = "[\\s]*:[\\s]*"; // project:file
private static final String BOL = "^[\\s]*"; // begin-of-line
private static final String EOL = "[\\s]*(#.*)?$"; // end-of-line
@@ -67,10 +67,10 @@
private static final String EMAIL_LIST =
"(" + EMAIL_OR_STAR + "(" + COMMA + EMAIL_OR_STAR + ")*)";
- // A Gerrit project name followed by a column and optional spaces.
- private static final String PROJECT_NAME = "([^\\s:]+" + COLUMN + ")?";
+ // A Gerrit project name followed by a colon and optional spaces.
+ private static final String PROJECT_NAME = "([^\\s:]+" + COLON + ")?";
- // A relative or absolute file path name without any column or space character.
+ // A relative or absolute file path name without any colon or space character.
private static final String FILE_PATH = "([^\\s:#]+)";
private static final String PROJECT_AND_FILE = PROJECT_NAME + FILE_PATH;
@@ -213,7 +213,7 @@
String projectName = m.group(2);
if (projectName != null && projectName.length() > 1) {
// PROJECT_NAME ends with ':'
- projectName = projectName.split(COLUMN, -1)[0].trim();
+ projectName = projectName.split(COLON, -1)[0].trim();
} else {
projectName = project; // default project name
}
diff --git a/src/main/resources/Documentation/syntax.md b/src/main/resources/Documentation/syntax.md
index ac1637e..a535788 100644
--- a/src/main/resources/Documentation/syntax.md
+++ b/src/main/resources/Documentation/syntax.md
@@ -26,8 +26,8 @@
globs := glob (SPACE* "," SPACE* glob)*
glob := [a-zA-Z0-9_-*?.]+
email := [^ @]+@[^ #]+
-project := a Gerrit project name without space or column character
-filePath := a file path name without space or column character
+project := a Gerrit project name without space or colon character
+filePath := a file path name without space or colon character
ANYCHAR := any character but EOL
EOL := end of line characters
SPACE := any white space character