You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 1, 2023. It is now read-only.
* Add more comprehensive checks and better error messages to area/iteration path validation
* Join invalid chars with space instead of comma
* Make tree path validation more testable
* Add error code for invalid ADO project in config
* Write unit tests for tree path validation
* Format tree path unit tests
* Merge escape character and control character checks and clarify error message
// Invalid characters from the link above plus the escape sequences (since they have backslashes and produce confusingly formatted errors if not caught here)
$"{treeNodeTypeName} Path \"{string.Join('\\',path)}\" is invalid. \"{erroneous}\" is too long. It must be less than {maxNodeLength} characters.",
126
+
"Learn more about naming restrictions here: https://learn.microsoft.com/en-us/azure/devops/organizations/settings/about-areas-iterations?view=azure-devops#naming-restrictions"
127
+
});
128
+
}
129
+
130
+
// Ensure that none of the path parts contain invalid characters
$"Path \"{path}\" is invalid. It must start with the project name, \"{project}\".",
98
-
$"Example: \"{project}\\{path}\".",
134
+
$"{treeNodeTypeName} Path \"{string.Join('\\',path)}\" is invalid. \"{erroneous}\" contains an invalid character ({string.Join(" ",invalidChars)}).",
135
+
"Make sure that the path is separated by backslashes (\\) and not forward slashes (/).",
136
+
"Learn more about naming restrictions here: https://learn.microsoft.com/en-us/azure/devops/organizations/settings/about-areas-iterations?view=azure-devops#naming-restrictions"
$"{pathType} Path \"{path}\" is invalid. \"{project}\" is not a valid project.",
144
+
// More about control codes and their range here: https://en.wikipedia.org/wiki/Unicode_control_characters
145
+
$"{treeNodeTypeName} Path \"{string.Join('\\',path)}\" is invalid. \"{erroneous}\" contains a unicode control character (\\u0000 - \\u001F or \\u007F - \\u009F).",
146
+
"Make sure that you're path doesn't contain any escape characters (\\0 \\a \\b \\f \\n \\r \\t \\v).",
147
+
"Learn more about naming restrictions here: https://learn.microsoft.com/en-us/azure/devops/organizations/settings/about-areas-iterations?view=azure-devops#naming-restrictions"
$"{treeNodeTypeName} Path \"{string.Join('\\',path)}\" is invalid. It must be less than {maxDepth} levels deep.",
155
+
"Learn more about naming restrictions here: https://learn.microsoft.com/en-us/azure/devops/organizations/settings/about-areas-iterations?view=azure-devops#naming-restrictions"
156
+
});
157
+
}
158
+
159
+
160
+
// Path should always start with the project name ADO expects an absolute path
0 commit comments