-
Notifications
You must be signed in to change notification settings - Fork 580
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
YAMLLintBear: Disable document-start
rule by default
#965
Conversation
Thanks for your contribution! Reviewing pull requests take really a lot of time and we're all volunteers. Please make sure you go through the following check list and complete them all before pinging someone for a review.
As you learn things over your Pull Request please help others on the chat and on PRs to get their stuff right as well! |
Comment on 1751d74. Shortlog of HEAD commit is 4 character(s) longer than the limit (54 > 50). GitCommitBear, severity NORMAL, section |
''' | ||
:param document_start: | ||
Use this rule to require or forbid the use of document start | ||
marker (---). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line contains following spacing inconsistencies:
- Tabs used instead of spaces.
SpaceConsistencyBear, severity NORMAL, section python
.
The issue can be fixed by applying the following patch:
--- a/bears/yml/YAMLLintBear.py
+++ b/bears/yml/YAMLLintBear.py
@@ -27,7 +27,7 @@
'''
:param document_start:
Use this rule to require or forbid the use of document start
- marker (---).
+ marker (---).
'''
yamllint_configs = {'extends': 'default',
'rules':
document_start: bool=False): | ||
''' | ||
:param document_start: | ||
Use this rule to require or forbid the use of document start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line contains following spacing inconsistencies:
- Tabs used instead of spaces.
SpaceConsistencyBear, severity NORMAL, section python
.
The issue can be fixed by applying the following patch:
--- a/bears/yml/YAMLLintBear.py
+++ b/bears/yml/YAMLLintBear.py
@@ -26,7 +26,7 @@
document_start: bool=False):
'''
:param document_start:
- Use this rule to require or forbid the use of document start
+ Use this rule to require or forbid the use of document start
marker (---).
'''
yamllint_configs = {'extends': 'default',
yamllint_configs = {'extends': 'default', | ||
'rules': | ||
{'document-start': | ||
{'present': False} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code does not comply to PEP8.
PEP8Bear, severity NORMAL, section autopep8
.
The issue can be fixed by applying the following patch:
--- a/bears/yml/YAMLLintBear.py
+++ b/bears/yml/YAMLLintBear.py
@@ -32,9 +32,9 @@
yamllint_configs = {'extends': 'default',
'rules':
{'document-start':
- {'present': False}
- }
- }
+ {'present': False}
+ }
+ }
if document_start:
yamllint_configs['rules']['document-start']['present'] = True
document_start: bool=False): | ||
''' | ||
:param document_start: | ||
Use this rule to require or forbid the use of document start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code does not comply to PEP8.
PEP8Bear, severity NORMAL, section autopep8
.
The issue can be fixed by applying the following patch:
--- a/bears/yml/YAMLLintBear.py
+++ b/bears/yml/YAMLLintBear.py
@@ -26,8 +26,8 @@
document_start: bool=False):
'''
:param document_start:
- Use this rule to require or forbid the use of document start
- marker (---).
+ Use this rule to require or forbid the use of document start
+ marker (---).
'''
yamllint_configs = {'extends': 'default',
'rules':
hey this is unreviewable with so many gitmate issues, could you fix them? simply running |
1751d74
to
60a223f
Compare
60a223f
to
b48311d
Compare
Oy! I like this! b48311d is ready |
@rafidaslam if you rebase this we can merge it, here are the rebase instructions just in case you need them: Hi, it looks like your PR is out of date and needs a rebase. This page may help you to get started on this. (Do not press the update branch button. It's evil.) Add the original coala repository as a remote:
Then go to your branch and rebase it onto our master:
Now push it up. You will need to do a force push because you change history here (do not do this on master branches :)):
If you're just looking to fix an issue very quickly and not interested in contributing to coala long term, we can fix it up for you - just tell us :). Ping us on our gitter channel if you need help! |
Disable YAMLLint rule `document-start` by default because many YAML files have no need for start and end markers, but user still can enable it by using `document_start=true` setting. Closes coala#923
b48311d
to
5c5a6e1
Compare
@sils rebased :) |
ack 5c5a6e1 |
1 similar comment
ack 5c5a6e1 |
@rultor merge |
@AsnelChristian OK, I'll try to merge now. You can check the progress of the merge here |
@AsnelChristian Done! FYI, the full log is here (took me 1min) |
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
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
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
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
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
Disable YAMLLint rule
document-start
by default becausemany YAML files have no need for start and end markers, but
user still can enable it by using
document_start=true
setting.
Add unit tests for YAMLLintBear.
Closes #923