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
bears/yaml: Add TravisLintBear #1879
Conversation
|
||
@linter(executable='travis', | ||
output_format='regex', | ||
output_regex=r'\[x\]\s+(?P<message>.+)') |
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.
that's all information travis-lint provides? :/
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.
Yes, even I did not like it at first, but there is no better alternative. See #294 (comment)
bears/yaml/TravisLintBear.py
Outdated
output_regex=r'\[x\]\s+(?P<message>.+)') | ||
class TravisLintBear: | ||
""" | ||
A validator for your .travis.yml that attempts to reduce common build |
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.
maybe enclose .travis.yml
in double backticks?
tests/yaml/TravisLintBearTest.py
Outdated
from coalib.testing.LocalBearTestHelper import LocalBearTestHelper | ||
from coalib.testing.BearTestHelper import generate_skip_decorator | ||
from coala_utils.ContextManagers import prepare_file | ||
|
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.
another newline plase ;) 2 newlines between imports and code
tests/yaml/TravisLintBearTest.py
Outdated
repo: xyz/abc | ||
ruby: 2.0.0 | ||
condition: "$(uname) = Linux" | ||
""" |
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.
I think a separate file would be good.
tests/yaml/TravisLintBearTest.py
Outdated
repo: xyz/abc | ||
ruby: 2.0.0 | ||
condition: "$(uname) = Linux" | ||
""" |
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.
same here --> separate file
023e305
to
0ea9c0e
Compare
Updated @Makman2 |
secure: abcdef | ||
gem: travis | ||
on: | ||
repo: xyz/abc |
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.
wrong indentation: expected 2 but found 4 (indentation)
YAMLLintBear, severity MAJOR, section yml
.
api_key: | ||
secure: abcdef | ||
gem: travis | ||
on: |
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.
truthy value is not quoted (truthy)
YAMLLintBear, severity NORMAL, section yml
.
deploy: | ||
provider: rubygems | ||
api_key: | ||
secure: abcdef |
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.
wrong indentation: expected 2 but found 4 (indentation)
YAMLLintBear, severity MAJOR, section yml
.
- rvm: jruby | ||
os: osx | ||
deploy: | ||
provider: rubygems |
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.
wrong indentation: expected 0 but found 2 (indentation)
YAMLLintBear, severity MAJOR, section yml
.
- linux | ||
- osx | ||
matrix: | ||
exclude: |
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.
wrong indentation: expected 0 but found 2 (indentation)
YAMLLintBear, severity MAJOR, section yml
.
secure: abcdef | ||
gem: travis | ||
on: | ||
repo: xyz/abc |
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.
wrong indentation: expected 2 but found 4 (indentation)
YAMLLintBear, severity MAJOR, section yml
.
api_key: | ||
secure: abcdef | ||
gem: travis | ||
on: |
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.
truthy value is not quoted (truthy)
YAMLLintBear, severity NORMAL, section yml
.
deploy: | ||
provider: rubygems | ||
api_key: | ||
secure: abcdef |
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.
wrong indentation: expected 2 but found 4 (indentation)
YAMLLintBear, severity MAJOR, section yml
.
- rvm: jruby | ||
os: osx | ||
deploy: | ||
provider: rubygems |
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.
wrong indentation: expected 0 but found 2 (indentation)
YAMLLintBear, severity MAJOR, section yml
.
- linux | ||
- osx | ||
matrix: | ||
exclude: |
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.
wrong indentation: expected 0 but found 2 (indentation)
YAMLLintBear, severity MAJOR, section yml
.
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.
is YAMLLint insane?
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.
Haha drunk rather.
Damnit gitmate. |
0ea9c0e
to
d4f8bae
Compare
bears/yaml/TravisLintBear.py
Outdated
|
||
- invalid YAML | ||
- missing language key | ||
- unsupported runtime versions of Ruby, PHP, OTP, etc |
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.
etc.
tests/yaml/TravisLintBearTest.py
Outdated
import os | ||
from queue import Queue | ||
|
||
from bears.yaml.TravisLintBear import TravisLintBear |
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.
own package import ;)
below coalib imports with a newline in between ;)
the KeywordBear is messing |
bears/yaml/TravisLintBear.py
Outdated
class TravisLintBear: | ||
""" | ||
A validator for your ``.travis.yml`` that attempts to reduce common build | ||
errors such as : |
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.
obsolete space between as
and colon
d4f8bae
to
95fb76e
Compare
Updated @Makman2 |
95fb76e
to
7e96b7e
Compare
7e96b7e
to
2f004bc
Compare
ack 2f004bc |
@rultor merge |
Closes #294
For short term contributors: we understand that getting your commits well
defined like we require is a hard task and takes some learning. If you
look to help without wanting to contribute long term there's no need
for you to learn this. Just drop us a message and we'll take care of brushing
up your stuff for merge!
Checklist
them.
individually. It is not sufficient to have "fixup commits" on your PR,
our bot will still report the issues for the previous commit.) You will
likely receive a lot of bot comments and build failures if coala does not
pass on every single commit!
After you submit your pull request, DO NOT click the 'Update Branch' button.
When asked for a rebase, consult coala.io/rebase
instead.
Please consider helping us by reviewing other peoples pull requests as well:
cobot mark wip <URL>
to get it outof the review queue.
The more you review, the more your score will grow at coala.io and we will
review your PRs faster!