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

You have twenty seconds to comply. #229

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jhoblitt
Copy link
Member

No description provided.

.rubocop.yml Outdated Show resolved Hide resolved
@@ -10,4 +10,6 @@ end

group :development do
gem 'github_changelog_generator', '>= 1.16.4'
# provides the rubocop config and an awesome circular dependency to boot!
Copy link
Member

Choose a reason for hiding this comment

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

🤨 Wat? CI seems happy with this…

Copy link
Member Author

Choose a reason for hiding this comment

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

voxpupuli-test has a dep on facterdb. I'm not sure if this would work at all if the Gemfile was in a released version of facterdb. We all use constraint resolvers every day but does anyone actually understand them? :)


inherit_gem:
voxpupuli-test: rubocop.yml

Copy link
Member

Choose a reason for hiding this comment

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

@ekohl ehat do you think about this? at the moment we only use it in modules. other gems have their own rubocop config which is isually way shorter.

Copy link
Member

Choose a reason for hiding this comment

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

I do think our Rubocop in vp-test is intended for Puppet modules, not real Ruby code. It would be better to come up with a shared config for real gems. It also would prevent this from pulling in a LOT of unrelated code.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm fairly sure that as-is is a bad idea. My goal with this PR was to simply get rubocop working and merged before the style changes bit-rot. Then additional PRs can be made as cop configuration is agreed upon. Configuring rubocop is like ordering a pizza... I was concerned that starting from scratch was going to take a long time to build consensus. I have two suggestions to resolve the circular dependency and I honestly don't have much of a preference.

A) move rubocop.yml out of voxpupuli-test: into a new gem
B) copy the current voxpupuli-test rubocop.yml into this module with minimal modifications

Are either of those acceptable solutions?

Copy link
Member

Choose a reason for hiding this comment

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

I think those are all points I can agree with. I'm fine with either solution. My suggestion there was roughly option A and then use that gem in all Ruby projects maintained by Vox Pupuli. I'd also be happy with option B short term and option A long term. That would at least allow this to move forward and we need to align a lot of projects anyway.

Copy link
Member Author

Choose a reason for hiding this comment

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

@ekohl If I copy the rubcop.yml from voxpupuli-test, would this PR be ready for merge?

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

I'd not pull in voxpupuli-test. It's intended for Puppet modules and pulls in a lot of unrelated code. I do see the benefit in the same coding style for all gems. We could introduce a new common gem for this.

spec/spec_helper.rb Outdated Show resolved Hide resolved
spec/spec_helper.rb Show resolved Hide resolved
spec/facts_spec.rb Outdated Show resolved Hide resolved
spec/facts_spec.rb Outdated Show resolved Hide resolved
@jhoblitt jhoblitt force-pushed the feature/rubocop branch 2 times, most recently from 9280568 to e2eae81 Compare January 28, 2022 16:59
@jhoblitt
Copy link
Member Author

@TheMeier
Copy link
Contributor

Is this still relevant? Would need a rebase has merge conflicts.

@jhoblitt
Copy link
Member Author

I think that the PMC needs to make a decision on rubocop policy for puppet vs ruby repos.

@bastelfreak
Copy link
Member

We've https://github.com/voxpupuli/voxpupuli-rubocop/ which provides a rubocop config for our gems. For Puppet we've to support ancient Ruby versions that are often EoL. We don't have that requirements for most gems so I think it makes sense to maintain two rubocop configs. One for EoL Puppet Ruby and one for the rest.

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

Successfully merging this pull request may close these issues.

5 participants