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

bears/yaml: Add TravisLintBear #1879

Merged
merged 1 commit into from Jul 5, 2017
Merged

Conversation

@yash-nisar
Copy link
Member

@yash-nisar yash-nisar commented Jul 1, 2017

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

  • I read the commit guidelines and I've followed
    them.
  • I ran coala over my code locally. (All commits have to pass
    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:

The more you review, the more your score will grow at coala.io and we will
review your PRs faster!


@linter(executable='travis',
output_format='regex',
output_regex=r'\[x\]\s+(?P<message>.+)')

This comment has been minimized.

@Makman2

Makman2 Jul 3, 2017
Member

that's all information travis-lint provides? :/

This comment has been minimized.

@yash-nisar

yash-nisar Jul 3, 2017
Author Member

Yes, even I did not like it at first, but there is no better alternative. See #294 (comment)

output_regex=r'\[x\]\s+(?P<message>.+)')
class TravisLintBear:
"""
A validator for your .travis.yml that attempts to reduce common build

This comment has been minimized.

@Makman2

Makman2 Jul 3, 2017
Member

maybe enclose .travis.yml in double backticks?

from coalib.testing.LocalBearTestHelper import LocalBearTestHelper
from coalib.testing.BearTestHelper import generate_skip_decorator
from coala_utils.ContextManagers import prepare_file

This comment has been minimized.

@Makman2

Makman2 Jul 3, 2017
Member

another newline plase ;) 2 newlines between imports and code 👍

repo: xyz/abc
ruby: 2.0.0
condition: "$(uname) = Linux"
"""

This comment has been minimized.

@Makman2

Makman2 Jul 3, 2017
Member

I think a separate file would be good.

repo: xyz/abc
ruby: 2.0.0
condition: "$(uname) = Linux"
"""

This comment has been minimized.

@Makman2

Makman2 Jul 3, 2017
Member

same here --> separate file

@yash-nisar yash-nisar force-pushed the yash-nisar:travis-lint-bear branch from 023e305 to 0ea9c0e Jul 3, 2017
@yash-nisar
Copy link
Member Author

@yash-nisar yash-nisar commented Jul 3, 2017

Updated @Makman2

secure: abcdef
gem: travis
on:
repo: xyz/abc

This comment has been minimized.

@gitmate-bot

gitmate-bot Jul 3, 2017
Collaborator

wrong indentation: expected 2 but found 4 (indentation)

YAMLLintBear, severity MAJOR, section yml.

api_key:
secure: abcdef
gem: travis
on:

This comment has been minimized.

@gitmate-bot

gitmate-bot Jul 3, 2017
Collaborator

truthy value is not quoted (truthy)

YAMLLintBear, severity NORMAL, section yml.

deploy:
provider: rubygems
api_key:
secure: abcdef

This comment has been minimized.

@gitmate-bot

gitmate-bot Jul 3, 2017
Collaborator

wrong indentation: expected 2 but found 4 (indentation)

YAMLLintBear, severity MAJOR, section yml.

- rvm: jruby
os: osx
deploy:
provider: rubygems

This comment has been minimized.

@gitmate-bot

gitmate-bot Jul 3, 2017
Collaborator

wrong indentation: expected 0 but found 2 (indentation)

YAMLLintBear, severity MAJOR, section yml.

- linux
- osx
matrix:
exclude:

This comment has been minimized.

@gitmate-bot

gitmate-bot Jul 3, 2017
Collaborator

wrong indentation: expected 0 but found 2 (indentation)

YAMLLintBear, severity MAJOR, section yml.

secure: abcdef
gem: travis
on:
repo: xyz/abc

This comment has been minimized.

@gitmate-bot

gitmate-bot Jul 3, 2017
Collaborator

wrong indentation: expected 2 but found 4 (indentation)

YAMLLintBear, severity MAJOR, section yml.

api_key:
secure: abcdef
gem: travis
on:

This comment has been minimized.

@gitmate-bot

gitmate-bot Jul 3, 2017
Collaborator

truthy value is not quoted (truthy)

YAMLLintBear, severity NORMAL, section yml.

deploy:
provider: rubygems
api_key:
secure: abcdef

This comment has been minimized.

@gitmate-bot

gitmate-bot Jul 3, 2017
Collaborator

wrong indentation: expected 2 but found 4 (indentation)

YAMLLintBear, severity MAJOR, section yml.

- rvm: jruby
os: osx
deploy:
provider: rubygems

This comment has been minimized.

@gitmate-bot

gitmate-bot Jul 3, 2017
Collaborator

wrong indentation: expected 0 but found 2 (indentation)

YAMLLintBear, severity MAJOR, section yml.

- linux
- osx
matrix:
exclude:

This comment has been minimized.

@gitmate-bot

gitmate-bot Jul 3, 2017
Collaborator

wrong indentation: expected 0 but found 2 (indentation)

YAMLLintBear, severity MAJOR, section yml.

This comment has been minimized.

@meetmangukiya

meetmangukiya Jul 3, 2017
Member

is YAMLLint insane?

This comment has been minimized.

@yash-nisar

yash-nisar Jul 3, 2017
Author Member

Haha drunk rather.

@yash-nisar
Copy link
Member Author

@yash-nisar yash-nisar commented Jul 3, 2017

Damnit gitmate.

@yash-nisar yash-nisar force-pushed the yash-nisar:travis-lint-bear branch from 0ea9c0e to d4f8bae Jul 3, 2017
- invalid YAML
- missing language key
- unsupported runtime versions of Ruby, PHP, OTP, etc

This comment has been minimized.

@AsnelChristian

AsnelChristian Jul 3, 2017
Member

etc.

import os
from queue import Queue

from bears.yaml.TravisLintBear import TravisLintBear

This comment has been minimized.

@Makman2

Makman2 Jul 3, 2017
Member

own package import ;)
below coalib imports with a newline in between ;)

@AsnelChristian
Copy link
Member

@AsnelChristian AsnelChristian commented Jul 3, 2017

the KeywordBear is messing

class TravisLintBear:
"""
A validator for your ``.travis.yml`` that attempts to reduce common build
errors such as :

This comment has been minimized.

@Makman2

Makman2 Jul 3, 2017
Member

obsolete space between as and colon

@yash-nisar yash-nisar force-pushed the yash-nisar:travis-lint-bear branch from d4f8bae to 95fb76e Jul 4, 2017
@yash-nisar
Copy link
Member Author

@yash-nisar yash-nisar commented Jul 4, 2017

Updated @Makman2

@yash-nisar yash-nisar force-pushed the yash-nisar:travis-lint-bear branch from 95fb76e to 7e96b7e Jul 4, 2017
Closes #294
@yash-nisar yash-nisar force-pushed the yash-nisar:travis-lint-bear branch from 7e96b7e to 2f004bc Jul 5, 2017
@Makman2
Copy link
Member

@Makman2 Makman2 commented Jul 5, 2017

ack 2f004bc

@Makman2
Copy link
Member

@Makman2 Makman2 commented Jul 5, 2017

@rultor merge

@rultor
Copy link

@rultor rultor commented Jul 5, 2017

@rultor merge

@Makman2 OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit 2f004bc into coala:master Jul 5, 2017
6 of 8 checks passed
6 of 8 checks passed
ci/circleci CircleCI is running your tests
Details
continuous-integration/appveyor/branch Waiting for AppVeyor build to complete
Details
codecov/project 100% (target 100%)
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
review/gitmate/commit No issues with this one - go ahead! :)
Details
review/gitmate/manual This commit was acknowledged.
Details
review/gitmate/pr All is well! :) (0 problems solved)
Details
@rultor
Copy link

@rultor rultor commented Jul 5, 2017

@rultor merge

@Makman2 Done! FYI, the full log is here (took me 2min)

@yash-nisar yash-nisar deleted the yash-nisar:travis-lint-bear branch Jul 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

6 participants
You can’t perform that action at this time.