Skip to content

Commit

Permalink
Allow hyphen char in workspace name
Browse files Browse the repository at this point in the history
  • Loading branch information
davido committed Jul 25, 2020
1 parent e6cce76 commit 34771a1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
/** A collection of global Starlark build API functions that apply to WORKSPACE files. */
public class WorkspaceGlobals implements WorkspaceGlobalsApi {

// Must start with a letter and can contain letters, numbers, and underscores
private static final Pattern LEGAL_WORKSPACE_NAME = Pattern.compile("^\\p{Alpha}\\w*$");
// Must start with a letter and can contain letters, numbers, underscores and hyphens.
private static final Pattern LEGAL_WORKSPACE_NAME = Pattern.compile("^\\p{Alpha}[\\w-]*$");

private final boolean allowOverride;
private final RuleFactory ruleFactory;
Expand Down

0 comments on commit 34771a1

Please sign in to comment.