Skip to content

Commit

Permalink
Allow single letter role names (#2292)
Browse files Browse the repository at this point in the history
Fixes: #2289
Fixes: #1763
  • Loading branch information
ssbarnea committed Aug 13, 2022
1 parent ba24b1a commit 84b2407
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ansiblelint/rules/role_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from ansiblelint.errors import MatchError


ROLE_NAME_REGEX = r"^[a-z][a-z0-9_]+$"
ROLE_NAME_REGEX = r"^[a-z][a-z0-9_]*$"


def _remove_prefix(text: str, prefix: str) -> str:
Expand All @@ -41,7 +41,7 @@ def _remove_prefix(text: str, prefix: str) -> str:

class RoleNames(AnsibleLintRule):
# Unable to use f-strings due to flake8 bug with AST parsing
"""Role name {0} does not match ``^[a-z][a-z0-9_]+$`` pattern."""
"""Role name {0} does not match ``^[a-z][a-z0-9_]*$`` pattern."""

id = "role-name"
description = (
Expand Down

0 comments on commit 84b2407

Please sign in to comment.