Commit Graph

17 Commits

Author SHA1 Message Date
Matt Perry 14265e464a
Add support for ansible-lint 6.0.0 (#4189)
ansible-lint 6.0.0 removed the `--parseable-severity` option. Use the
JSON output in its place.

Fixes #4188
2022-05-09 20:27:21 +09:00
Henrik Farre 056fbd08f6
Do not use tempfiles for ansible lint (#3846)
* Used %s instead of std in

* Set lint_file to 1 for ansible-lint so it does not use temp files

* Fix test for ansible-lint
2021-07-31 12:35:43 +09:00
Horacio Sanson a6719c2d4f
Fix 3673 - Add nocolor option to ansible-lint (#3811)
Co-authored-by: Horacio Sanson <horacio@allm.inc>
2021-07-20 10:00:49 +09:00
James Cherti af13c350d2
Add stdin ("-") to the command-line arguments of ansible-lint >=5.0.0 (#3786)
* Added an explicit stdin argument to ansible-lint >=5.0.0 (ansible_lint.vim).

This commit fixes the issue "<<NO OUTPUT RETURNED>>":
```
:ALEInfo
(finished - exit code 0) ['/bin/bash', '-c', ''ansible-lint'' --parseable-severity -x yaml < ''/tmp/vVyvn4B/7/test2.yml'']
<<<NO OUTPUT RETURNED>>>'
```

Reason: Ansible-lint ignores stdin when "-" or "/dev/stdin" is not
specified explicitly.

Tested with: ansible-lint 5.0.12 using ansible 2.11.2

* Update ansible-lint tests.
2021-07-05 21:48:32 +09:00
serapas 038e4a8c31
Fix ansible-lint linter definition. (#3601)
* Fix ansible-lint linter definition.

Use ansible-lint's feature auto-detection instead of temporary file.
For auto-detection to work, ansible project has to be also a git repository.

Don't use yaml rules. These are checked by yamllint.

Refactor pattern to work with ansible-lint >=5.0 version.

Clean-up obsolete test cases.

* Pull Request changes
2021-02-28 21:43:23 +09:00
w0rp 883978ece9
#2132 - Replace all uses of foo_callback with foo 2019-02-22 18:05:04 +00:00
ix5 b8359c1114 Allow custom executable for ansible linters (#1977)
* Allow custom executable for ansible linters
* Add ansible-lint tests
* ansible-lint: simplify linter command
* Rename linter "ansible" to "ansible_lint"
* Add ansible-lint options to documentation
* Add alias ansible-lint for ansible_lint
2018-10-18 09:19:27 +01:00
w0rp d2a6d9a915 Fix #1216 - Suppress trailing whitespace warings for ansible-lint when the option is set 2017-12-13 11:14:31 +00:00
w0rp ff5c6b0509 #852 - Capture error codes for ansible-lint 2017-11-15 10:11:32 +00:00
w0rp a535d07f28 Ban use of ==# or ==? in the codebase, and prefer is# or is? instead 2017-08-08 08:39:13 +01:00
w0rp bb293b297c Fix #216 - Filter out errors for other files for ansible-lint 2017-07-03 23:16:39 +01:00
w0rp f6b0a28cba Split up the flake8 and ansible-lint handlers 2017-06-14 16:20:30 +01:00
w0rp a03121f5b0 Break shared handlers up into their own files, and fix stylelint error handling 2017-04-24 22:27:18 +01:00
w0rp ecbb276805 Replace every stdin-wrapper script with the new %t formatting support 2017-02-11 19:40:57 +00:00
Bjorn Neergaard f49f615ef6
Add support for dot-seperate linters, improve linter tests
This PR first and formost implements support for dot-seperate filetypes,
a very trivial change.

This closes #132

But more importantly, this PR vastly improves the test quality for
`ale#linter#Get`. It enables us to reset the state of ale's internal
linter cache, to facilitate better testing, as well as making use of
mocked linters instead of depending on linters on disk (which may
change). In addition, a dummy linter is defined to test the autoloading
behavior.

Header guards were removed from all linters as:

* A: ale won't try and load linters if they already exist in memory
* B: we can't reset state for testing if they can't be loaded again
2016-10-21 21:02:20 -05:00
Bjorn Neergaard a2e4af1626
Document ansible-lint 2016-10-20 09:27:57 -05:00
Bjorn Neergaard c34664120b
Add ansible-lint support and factor out PEP8 handler 2016-10-20 09:23:23 -05:00