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

Add syntax checker for Ansible #1858

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

PrimaryCanary
Copy link

@PrimaryCanary PrimaryCanary commented Jan 14, 2021


name: New checker
about: Provide a new checker implementation
title: 'Add syntax checker for Ansible'
labels: 'component: checkers'
assignees: ''


Checklist

Description

Ansible YAML checker using ansible-lint.

Additional context

Fixes k1LoW/emacs-ansible#29

@CLAassistant
Copy link

CLAassistant commented Jan 14, 2021

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Sifus seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@PrimaryCanary PrimaryCanary changed the title Add Ansible YAML linting with ansible-lint Add syntax checker for Ansible Jan 15, 2021
Copy link
Member

@fmdkdd fmdkdd left a comment

Choose a reason for hiding this comment

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

Thanks, nice PR with tests. Good work.

I've left a minor comment, please take a look.

And sorry for the delay.

flycheck.el Outdated Show resolved Hide resolved
@nixfu
Copy link

nixfu commented Jun 15, 2021

It would be VERY nice if this could get completed and merged. I would love to use it.

@fredericgiquel
Copy link

What is lacking for this request to be merged ?

In this branch https://github.com/fredericgiquel/flycheck/tree/ansible-lint5, I added some commits after commit accffc6 in order to :

  • fix the ansible-mode detection problem
  • add support to last version of ansible-lint

Can these changes be incorporated into this PR or should I create a new one ?

@rassie
Copy link
Contributor

rassie commented Mar 30, 2022

@fmdkdd can you help unblock this PR? It seems we are missing a user who is supposed to sign a CLA and the "Changes requested" seems to be blocked too even though they have been addressed.


See URL `https://ansible-lint.readthedocs.io/en/latest/'."
;; emacs-ansible provides ansible, not ansible-mode
:enabled (bound-and-true-p ansible)
Copy link
Contributor

Choose a reason for hiding this comment

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

:enabled is still a predicate and needs a lambda(), like it was before it has been changed to bound-and-true-p.

Copy link
Contributor

Choose a reason for hiding this comment

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

Obsoleted by @fredericgiquel's branch.

@rassie
Copy link
Contributor

rassie commented Mar 30, 2022

I can confirm that @fredericgiquel's branch works as expected with ansible-lint v6.

@fredericgiquel
Copy link

I signed the CLA in early January so my branch should be able to be merged if you want to.
Do I need to do something else ?

@jdelStrother
Copy link

FWIW I tweaked some more bits on top of @fredericgiquel's branch - master...jdelStrother:flycheck:ansible-lint

I was finding that it was ignoring my .ansible-lint file when linting files in subdirectories, and ansible-lint v5/v6 are extremely slow unless you pass --offline to avoid downloading requirements each time.

(Adding the --offline flag does break v4 compatibility, though. v5 was released February 2021 - maybe we should just remove the v4 compatibility?)

@notetiene
Copy link

Any updates on this? Otherwise, I might create a checker myself if it's too complicated.

@Nebucatnetzer
Copy link

Would be great if we could move this forward.

@jdelStrother
Copy link

If we're ok dropping support for ansible-lint < 5, I'll rebase & submit my branch as a new PR? (ansible-lint 5 has been out for over 2 years now)

@Nebucatnetzer
Copy link

Nebucatnetzer commented Apr 27, 2023 via email

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.

Is there a plan to support ansible-lint?
9 participants