-
Notifications
You must be signed in to change notification settings - Fork 0
Initial implementation #1
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
Conversation
I should probably write some tests too. |
Dockerfile
Outdated
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.
Isn't there a -slim
version of this we can use?
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'll look and hope it compiles -- been running into some nokogiri issues.
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.
Oh, yeah, I think you need the ruby-dev
package (& maybe some build tools as well), which -slim
images don't come with. Bummer. If we don't need 2.3, maybe stick with our alpine image for now? The full Ruby image is pretty large, if I recall. (I should really make time to update our alpine image for newer Rubies).
OK, this is ready for final review. @mrb once merged, how would you like me to proceed on this? I propose:
|
I tested this engine across a a handful of repos from https://github.com/chef-cookbooks and it looks 👍 to me. |
This is an extracted combination of mrb/foodcritic (the code_climate_support branch) and chef/codeclimate-foodcritic and is meant to obviate both of those in a codeclimate-community-maintained version. It has the following notable differences from those projects: - Invokes foodcritic as-is (does not rely on bugfixes in the mrb fork) - Expands and filters include_paths into .rb files as necessary - Supports config.tags - Supports config.cookbook_paths (means ignoring include_paths) - Hides issues on non-existent files (CC does not support this)
@jpignata I've rebased with (hopefully) a good commit message. If you agree, please feel free to merge, open source this repo, and begin the process of getting it in front of the customer. I have to run, but hope to be back online ~10:15. |
/cc @mrb @codeclimate/review
The current engine is deployed from here, which includes some
bug-fixes to the underlying tool.
This repo copied over its wrapper script with the following changes:
General refactor
Use the tool as-is
Pass (essentially)
include_paths/**/*.rb
as cookbook pathsDon't use the tool's
exclude_paths
featureSupport
config.tags
Support
config.cookbook_paths
NOTE: If present, our own computed
include_paths
are ignoredHide issues on non-existent files
Comparing on an example repo:
Existing engine: https://codeclimate.com/github/mrb/mysql/issues
This version (required excluding test and spec):
(The same.)