Skip to content

Commit

Permalink
Allow hyphen char in workspace name
Browse files Browse the repository at this point in the history
Closes #11837.

Closes #11838.

PiperOrigin-RevId: 326286694
  • Loading branch information
davido authored and aiuto committed Aug 12, 2020
1 parent f674007 commit 26bdafb
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 26bdafb

Please sign in to comment.