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

Most YAML documents use document starts (---) #1417

Closed
adrienverge opened this issue Feb 7, 2017 · 3 comments
Closed

Most YAML documents use document starts (---) #1417

adrienverge opened this issue Feb 7, 2017 · 3 comments

Comments

@adrienverge
Copy link
Contributor

Hi,

I am the creator of yamllint, the linter coala uses for YAML.

Since #965 was merged three months ago, coala fails on many projects like Ansible, OpenStack and even yamllint itself, because coala doesn't accept document start markers (---) anymore.

Document start markers are commonly used, and required when declaring multiple documents in a single .yaml file (see the spec).

The proposed fix in the original issue (#923) was to disable the rule, but the implemented fix (#965) made document starts forbidden.

My opinion is that coala should either require document starts, or disable the rule by default.

@Makman2
Copy link
Member

Makman2 commented Feb 7, 2017

Agree. We should disable the rule by default.

So task is to use None as default value here and if it's used, leave the config value for the rule, if True or False are passed, configure the rule with True/False.

@Makman2
Copy link
Member

Makman2 commented Feb 7, 2017

Btw one can remove https://github.com/coala/coala-bears/blob/master/bears/yaml/YAMLLintBear.py#L42 and directly feed the value of document-start into the configuration dictionary^^

@adhikasp
Copy link
Member

adhikasp commented Feb 7, 2017

For reference, this fix would be very similliar with #1335.

adrienverge added a commit to adrienverge/coala-bears that referenced this issue Feb 8, 2017
Some projects use documents starts (`---`) in YAML documents (for
example Ansible, OpenStack, yamllint), others don't. Since these markers
are required when declaring multiple documents in a single .yaml file
(see the spec [1]), it is a bad idea to forbid them.

This commit disables the `document-start` rule by default, instead of
forcing / forbidding the use of these markers.

[1]: http://yaml.org/spec/1.2/spec.html#id2800132

Closes: coala#1417
Fixes: coala#923 coala#965
adrienverge added a commit to adrienverge/coala-bears that referenced this issue Feb 8, 2017
Some projects use documents starts (`---`) in YAML documents (for
example Ansible, OpenStack, yamllint), others don't. Since these markers
are required when declaring multiple documents in a single .yaml file
(see the spec [1]), it is a bad idea to forbid them.

This commit disables the `document-start` rule by default, instead of
forcing / forbidding the use of these markers.

[1]: http://yaml.org/spec/1.2/spec.html#id2800132

Closes: coala#1417
Fixes: coala#923 coala#965
adrienverge added a commit to adrienverge/coala-bears that referenced this issue Feb 8, 2017
Some projects use documents starts (`---`) in YAML documents (for
example Ansible, OpenStack, yamllint), others don't. Since these markers
are required when declaring multiple documents in a single .yaml file
(see the spec [1]), it is a bad idea to forbid them.

This commit disables the `document-start` rule by default, instead of
forcing / forbidding the use of these markers.

[1]: http://yaml.org/spec/1.2/spec.html#id2800132

Closes coala#1417
Fixes coala#923 coala#965
adrienverge added a commit to adrienverge/coala-bears that referenced this issue Feb 8, 2017
Some projects use documents starts (`---`) in YAML documents (for
example Ansible, OpenStack, yamllint), others don't. Since these markers
are required when declaring multiple documents in a single .yaml file
(see the spec [1]), it is a bad idea to forbid them.

This commit disables the `document-start` rule by default, instead of
forcing / forbidding the use of these markers.

[1]: http://yaml.org/spec/1.2/spec.html#id2800132

Closes coala#1417
Related to coala#923 and coala#965
gosom pushed a commit to gosom/coala-bears that referenced this issue Jul 15, 2017
Some projects use documents starts (`---`) in YAML documents (for
example Ansible, OpenStack, yamllint), others don't. Since these markers
are required when declaring multiple documents in a single .yaml file
(see the spec [1]), it is a bad idea to forbid them.

This commit disables the `document-start` rule by default, instead of
forcing / forbidding the use of these markers.

[1]: http://yaml.org/spec/1.2/spec.html#id2800132

Closes coala#1417
Related to coala#923 and coala#965
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants