-
Notifications
You must be signed in to change notification settings - Fork 707
Labels
featgood first issueBugs ideal for the first time, good for newcomers contributorsBugs ideal for the first time, good for newcomers contributors
Description
Summary
The var-naming[no-role-prefix] rule is not detected in a role's handlers files that register variables with no prefix.
Issue Type
- Bug Report
OS / ENVIRONMENT
ansible-lint 25.9.2 using ansible-core:2.17.0 ansible-compat:25.8.2 ruamel-yaml:0.18.15 ruamel-yaml-clib:0.2.14- ansible installation method:
pip - ansible-lint installation method:
pip
STEPS TO REPRODUCE
Setup
mkdir -p ./roles/test/{handlers,tasks}
cat << _EOF_ > "./roles/test/handlers/main.yml"
---
- name: Echo thefoo
ansible.builtin.command: echo thefoo
changed_when: true
register: thefoo
_EOF_
cat << _EOF_ > "./roles/test/tasks/main.yml"
---
- name: Ls the root directory
ansible.builtin.command: ls /
changed_when: true
register: test_foo
notify: Echo thefoo
_EOF_Run
ansible-lint --offlineDesired Behavior
I would expect that the var-naming[no-role-prefix] rule to be detected/violated in the role's handlers files tested. Especially since this rule has been extended to include variables defined by a role's tasks files (#4677).
Actual Behavior
The actual behavior is that the var-naming[no-role-prefix] rule is not detected/violated in the role's handlers files tested.
Metadata
Metadata
Assignees
Labels
featgood first issueBugs ideal for the first time, good for newcomers contributorsBugs ideal for the first time, good for newcomers contributors
Type
Projects
Status
No status