-
SummarySome rules (e.g. Issue Type
OS / ENVIRONMENT$ ansible-lint --version
ansible-lint 6.10.1 using ansible 2.14.1
STEPS TO REPRODUCE
Desired BehaviorWarnings are collected and reported. Actual BehaviorNo warnings are collected and reported.
---
- hosts: all
tasks:
- name: Update APT cache
ansible.builtin.package: update_cache=true cache_valid_time=3600
repos:
- repo: https://github.com/ansible/ansible-lint
rev: v6.10.1
hooks:
- id: ansible-lint |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
I made a mistake: the equivalent command for |
Beta Was this translation helpful? Give feedback.
-
I narrowed down the issue even more. So the Logs of ...
INFO Executing syntax check on playbook.yml (4.31s)
DEBUG Skipping /home/vscode/.cache/ansible-compat/cd0c3e/roles/newrelic.newrelic-infra/tasks/install_dist_pkgs.yml as it is outside of the project directory.
DEBUG Attempting to release lock 139955563604752 on /home/vscode/.cache/ansible-compat/cd0c3e/.lock
DEBUG Lock 139955563604752 released on /home/vscode/.cache/ansible-compat/cd0c3e/.lock
... I have several other roles used as well but only |
Beta Was this translation helpful? Give feedback.
-
I tried this in ---
mock_roles:
- newrelic.newrelic-infra but didn't help. |
Beta Was this translation helpful? Give feedback.
-
I think that you mislead how pre-commit works. It is no concept of warnings, only pass or fail and when it passes it hides all the output generated by the passed hook. This means that you need to make it run in strict mode if you want to be able to act on warnings... basically strict converts all warnings to errors. If you don't like this, I invite you to ask on https://github.com/pre-commit/pre-commit/ Also, please use discussions instead of issue tracker. |
Beta Was this translation helpful? Give feedback.
I think that you mislead how pre-commit works. It is no concept of warnings, only pass or fail and when it passes it hides all the output generated by the passed hook.
This means that you need to make it run in strict mode if you want to be able to act on warnings... basically strict converts all warnings to errors. If you don't like this, I invite you to ask on https://github.com/pre-commit/pre-commit/
Also, please use discussions instead of issue tracker.