Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix playbook/rulebook detection #3005

Merged
merged 1 commit into from
Feb 10, 2023
Merged

Fix playbook/rulebook detection #3005

merged 1 commit into from
Feb 10, 2023

Commits on Feb 10, 2023

  1. src/ansiblelint/file_utils.py: Fix playbook/rulebook detection

    Don't try detecting the file type unless file already loaded
    in Lintable._data, otherwise the line numbers for inline
    rule skipping will be set to the line where's it's used since
    self.kind is 'yaml'. After _guess_kind() call, the kind will
    be set to playbook and the error line will be the one of the
    task, which is possibly different that the one with the 'noqa:'
    comment.
    
    Fixes: ansible#2977
    Signed-off-by: Arnaud Patard <apatard@hupstream.com>
    apatard committed Feb 10, 2023
    Configuration menu
    Copy the full SHA
    cebf266 View commit details
    Browse the repository at this point in the history