Skip to content

Conversation

@chelnak
Copy link

@chelnak chelnak commented Oct 13, 2022

This commit adds .rubocop.yml as a required file in the gemspec. This is so that other puppet-lint plugins can inherit a common set of rules.

Ultimately this could make navigating the landscape easier if coding style is simiar.

This commit adds .rubocop.yml as a required file in the gemspec. This is
so that other puppet-lint plugins can inherit a common set of rules.

Ultimately this could make navigating the landscape easier if coding
style is simiar.
@david22swan david22swan merged commit 6fc3d5e into main Oct 13, 2022
@david22swan david22swan deleted the maint-add_rubocop_config_to_gem branch October 13, 2022 10:22
'.rubocop.yml',
'lib/**/*',
'bin/**/*',
'spec/**/*',
Copy link

Choose a reason for hiding this comment

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

It was already merged, but I'll just leave a note here that this breaks things for plugins. You essentially broke this method:

# Public: Load the puppet-lint spec_helper.rb
#
# Returns nothings.
def self.load_spec_helper
gemspec = gemspecs.find { |spec| spec.name == 'puppet-lint' }
load(Pathname.new(gemspec.full_gem_path) + 'spec/spec_helper.rb')
end

Copy link
Author

Choose a reason for hiding this comment

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

Oh my bad - must have been on autopilot in vim...

Will restore! Good catch!

Copy link
Author

Choose a reason for hiding this comment

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

fixed in #63

Copy link

Choose a reason for hiding this comment

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

I'll admit I only know this because in Fedora the spec files are part of rubygem-puppet-lint-doc and I had weird failures because I only had rubygem-puppet-lint installed. Took me a while to figure out.

chelnak added a commit that referenced this pull request Oct 13, 2022
This commit corrects a regression caused by the removal of `spec/**/*',`
in the gemspec.

As noted by @ekohl in #60, it would break every plugin due to the
consumption of the spec helpers from puppet-lint.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants