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

(SDK-244) Add rubocop validation subcommand #75

Merged
merged 2 commits into from
Jun 13, 2017
Merged

Conversation

rodjek
Copy link
Contributor

@rodjek rodjek commented Jun 13, 2017

Refactors the validators further so that parsing targets from the CLI and invoking the command are part of the base class. This way, the only thing each validator needs to do is implement a method to build an array of arguments to pass to the command

@@ -11,13 +11,18 @@ def self.name
end

def self.cmd
'pwd'
'rubocop'
Copy link
Contributor

@bmjen bmjen Jun 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for rubocop, we'll need to default target to the #{PDK::Util.module_root}/lib directory instead, because rubocop isn't liking parsing of .rubocop.yml file in the module_root.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried this again on a newly generated module with updated templates, and rubocop is ok with the rubocop.yml, but still finding issues with Gemfile and spec_helper.rb. I'll investigate.

@@ -4,10 +4,27 @@
module PDK
module Validate
class BaseValidator
def self.parse_targets(options)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Nice DRY refactor.

@bmjen bmjen merged commit 90cc8dd into puppetlabs:master Jun 13, 2017
@DavidS DavidS added the feature label Jun 16, 2017
@DavidS DavidS changed the title (SDK-244) Add rubocop validator (SDK-244) Add rubocop validation subcommand Jun 16, 2017
@rodjek rodjek deleted the sdk-244 branch November 26, 2018 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants