Skip to content

Exclude mkdocs.yml from the ansible-lint pre-commit hook#234

Merged
Jakub Wlodek (jwlodek) merged 2 commits into
mainfrom
copilot/fix-review-comment-233
Jun 1, 2026
Merged

Exclude mkdocs.yml from the ansible-lint pre-commit hook#234
Jakub Wlodek (jwlodek) merged 2 commits into
mainfrom
copilot/fix-review-comment-233

Conversation

Copilot AI commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

A review comment noted that the ansible-lint pre-commit hook was running against all YAML files, which would incorrectly pull in mkdocs.yml once MkDocs config is added. This narrows the hook scope so non-Ansible YAML is not linted as Ansible.

  • Pre-commit hook scope

    • Added mkdocs.yml to the explicit ansible-lint --exclude list in .pre-commit-config.yaml.
    • Kept the change limited to the existing local ansible-lint hook configuration.
  • Result

    • ansible-lint remains focused on Ansible YAML instead of repository-wide YAML that is unrelated to Ansible.
entry: >
  ansible-lint --offline
  --exclude roles/install_module/vars/*
  --exclude scripts/deploy_ioc.yml
  --exclude mkdocs.yml

Copilot AI changed the title [WIP] Fix the code as per review comment for PR #233 Exclude mkdocs.yml from the ansible-lint pre-commit hook Jun 1, 2026
@jwlodek Jakub Wlodek (jwlodek) marked this pull request as ready for review June 1, 2026 14:57
Copilot AI review requested due to automatic review settings June 1, 2026 14:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR narrows the scope of the local ansible-lint pre-commit hook so it won’t lint the repository’s MkDocs configuration YAML as if it were Ansible content.

Changes:

  • Added mkdocs.yml to the explicit ansible-lint --exclude list in .pre-commit-config.yaml.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jwlodek Jakub Wlodek (jwlodek) merged commit 9c87ffa into main Jun 1, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants