>add changed empty lines guideline

This commit is contained in:
Robert Kaussow 2019-01-30 11:36:32 +01:00
parent 6c6f05bf77
commit baf846f077
4 changed files with 18 additions and 26 deletions

View File

@ -1,8 +1,2 @@
- BUGFIX
- Error while vault file classification if file is a binary [#6](https://github.com/xoxys/ansible-later/issues/6)
- Wrong line number displayed when using normalized yaml [#3](https://github.com/xoxys/ansible-later/issues/3)
- ENHANCEMENT
- Exclude include_vars from tasks that has to be named [#5](https://github.com/xoxys/ansible-later/issues/5)
- New rule: force `become` is not used without `become_user` [#4](https://github.com/xoxys/ansible-later/issues/4)
- New rule: bool values should be True/False or yes/no formatted [#2](https://github.com/xoxys/ansible-later/issues/2)
- New rule: jinja2 filters should be separated by spaces [#1](https://github.com/xoxys/ansible-later/issues/1)
- Dont be too restrictive and allow max. one empty line at the end of yaml files ()

View File

@ -18,22 +18,20 @@ The project name is an acronym for **L**ovely **A**utomation **TE**sting f**R**m
## Table of Content
- [ansible-later](#ansible-later)
- [Table of Content](#table-of-content)
- [Setup](#setup)
- [Using pip](#using-pip)
- [From source](#from-source)
- [Usage](#usage)
- [Configuration](#configuration)
- [Review a git repositories](#review-a-git-repositories)
- [Review a list of files](#review-a-list-of-files)
- [Buildin rules](#buildin-rules)
- [Build your own](#build-your-own)
- [The standards file](#the-standards-file)
- [Candidates](#candidates)
- [Minimal standards checks](#minimal-standards-checks)
- [License](#license)
- [Maintainers and Contributors](#maintainers-and-contributors)
- [Setup](#setup)
- [Using pip](#using-pip)
- [From source](#from-source)
- [Usage](#usage)
- [Configuration](#configuration)
- [Review a git repositories](#review-a-git-repositories)
- [Review a list of files](#review-a-list-of-files)
- [Buildin rules](#buildin-rules)
- [Build your own](#build-your-own)
- [The standards file](#the-standards-file)
- [Candidates](#candidates)
- [Minimal standards checks](#minimal-standards-checks)
- [License](#license)
- [Maintainers and Contributors](#maintainers-and-contributors)
---
@ -134,7 +132,7 @@ comes with a couple of built-in checks explained in the following table.
| Rule | ID | Description | Parameter |
|---------------------------------|-------------|-------------------------------------------------------------------|----------------------------------------------------------------------|
| check_yaml_empty_lines | LINT0001 | YAML should not contain unnecessarily empty lines. | {max: 1, max-start: 0, max-end: 0} |
| check_yaml_empty_lines | LINT0001 | YAML should not contain unnecessarily empty lines. | {max: 1, max-start: 0, max-end: 1} |
| check_yaml_indent | LINT0002 | YAML should be correctly indented. | {spaces: 2, check-multi-line-strings: false, indent-sequences: true} |
| check_yaml_hyphens | LINT0003 | YAML should use consitent number of spaces after hyphens (-). | {max-spaces-after: 1} |
| check_yaml_document_start | LINT0004 | YAML should contain document start marker. | {document-start: {present: true}} |

View File

@ -1,6 +1,6 @@
__author__ = "Robert Kaussow"
__project__ = "ansible-later"
__version__ = "0.1.2"
__version__ = "0.1.3"
__license__ = "MIT"
__maintainer__ = "Robert Kaussow"
__email__ = "mail@geeklabor.de"

View File

@ -45,7 +45,7 @@ def check_native_yaml(candidate, settings):
def check_yaml_empty_lines(candidate, settings):
options = "rules: {empty-lines: {max: 1, max-start: 0, max-end: 0}}"
options = "rules: {empty-lines: {max: 1, max-start: 0, max-end: 1}}"
errors = run_yamllint(candidate, settings, options)
return Result(candidate.path, errors)