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

Yamllint tests fail if yamllint isn't installed #379

Open
bdunne opened this issue Dec 1, 2017 · 2 comments
Open

Yamllint tests fail if yamllint isn't installed #379

bdunne opened this issue Dec 1, 2017 · 2 comments

Comments

@bdunne
Copy link
Member

bdunne commented Dec 1, 2017

    Failure/Error: _out, err, _ps = Open3.capture3("yamllint -v")
     
     Errno::ENOENT:
       No such file or directory - yamllint
     # ./app/workers/commit_monitor_handlers/commit_range/rubocop_checker/message_builder.rb:129:in `yamllint_version'
     # ./app/workers/commit_monitor_handlers/commit_range/rubocop_checker/message_builder.rb:45:in `header'
     # ./app/workers/commit_monitor_handlers/commit_range/rubocop_checker/message_builder.rb:59:in `build_comments'
     # ./app/workers/commit_monitor_handlers/commit_range/rubocop_checker/message_builder.rb:13:in `comments'
     # ./spec/workers/commit_monitor_handlers/commit_range/rubocop_checker/message_builder_spec.rb:15:in `block (3 levels) in <top (required)>'
     # ./spec/workers/commit_monitor_handlers/commit_range/rubocop_checker/message_builder_spec.rb:21:in `block (3 levels) in <top (required)>'
  • We probably shouldn't be shelling out to yamllint during tests
  • We should probably handle missing linters better (don't blow up, maybe just skip the linting)
@miq-bot
Copy link
Member

miq-bot commented Jun 11, 2020

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions! More information about the ManageIQ triage process can be found in the traige process documentation.

@miq-bot miq-bot added the stale label Jun 11, 2020
@bdunne bdunne added pinned and removed stale labels Jun 15, 2020
@bdunne
Copy link
Member Author

bdunne commented Jun 15, 2020

Copying in comment from @Fryguy in #392 since these are essentially the same issue...

There are a few approaches to fixing this...not sure what's best

* When the yamllint files don't exist, use a shared file from guides

* When the yamllint files don't exist, assuming linting is disabled and don't lint at all

* Add enable/disable support for individual linters, then fail or fallback when the files don't exist

* Send an email instead of making a comment

Also, should the same rules apply for haml lint and rubocop as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants