Skip to content

Commit

Permalink
Merge 4b27710 into f874b66
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienverge committed May 10, 2023
2 parents f874b66 + 4b27710 commit 05c36f6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions yamllint/rules/anchors.py
Expand Up @@ -159,7 +159,7 @@ def check(conf, token, prev, next, nextnext, context):
if not info['used']:
yield LintProblem(info['line'] + 1,
info['column'] + 1,
f"found unused anchor {anchor}")
f'found unused anchor "{anchor}"')
elif isinstance(token, yaml.AliasToken):
context['anchors'].get(token.value, {})['used'] = True

Expand All @@ -168,7 +168,7 @@ def check(conf, token, prev, next, nextnext, context):
conf['forbid-unused-anchors']):
if isinstance(token, yaml.AnchorToken):
context['anchors'][token.value] = {
"line": token.start_mark.line,
"column": token.start_mark.column,
"used": False
'line': token.start_mark.line,
'column': token.start_mark.column,
'used': False
}

0 comments on commit 05c36f6

Please sign in to comment.