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

Add rubocop config #130

Merged
merged 3 commits into from
Jul 5, 2024
Merged

Add rubocop config #130

merged 3 commits into from
Jul 5, 2024

Conversation

bastelfreak
Copy link
Member

previously this gem only contained a rubocop config that's used in our modules. We didn't run rubocop for the ruby code in this exact gem. This is changed with this commit.

@bastelfreak bastelfreak added the enhancement New feature or request label May 24, 2024
@bastelfreak bastelfreak self-assigned this May 24, 2024
@ekohl
Copy link
Member

ekohl commented May 24, 2024

Sounds good to me, but RuboCop is not happy with you

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 opened #137 to fix 2 TODOs.

.rubocop.yml Outdated Show resolved Hide resolved
.rubocop_todo.yml Outdated Show resolved Hide resolved
@bastelfreak
Copy link
Member Author

@ekohl I merged your PR and rebased.

@bastelfreak bastelfreak force-pushed the rubocop2 branch 5 times, most recently from a30cfe7 to b10b9f1 Compare June 21, 2024 11:08
require 'puppetlabs_spec_helper/rake_tasks'

PuppetLint.configuration.log_format = '%{path}:%{line}:%{check}:%{KIND}:%{message}'
PuppetLint.configuration.log_format = '%<path>s:%<line>s:%<check>s:%<KIND>s:%<message>s'
Copy link
Member

Choose a reason for hiding this comment

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

I honestly don't now if puppet-lint understands this format.

Copy link
Member Author

Choose a reason for hiding this comment

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

It seems to work fine:

bastelfreak@bastelfreak-nb ~/code/modulesync_config/modules/voxpupuli/puppet-example $ git diff Gemfile manifests/init.pp
diff --git a/Gemfile b/Gemfile
index a4a3b20..3a8a46c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -4,7 +4,8 @@
 source ENV['GEM_SOURCE'] || 'https://rubygems.org'

 group :test do
-  gem 'voxpupuli-test', '~> 7.0',   :require => false
+  #gem 'voxpupuli-test', '~> 7.0',   :require => false
+  gem 'voxpupuli-test', git: 'https://github.com/bastelfreak/voxpupuli-test', branch: 'rubocop2'
   gem 'coveralls',                  :require => false
   gem 'simplecov-console',          :require => false
   gem 'puppet_metadata', '~> 3.5',  :require => false
diff --git a/manifests/init.pp b/manifests/init.pp
index fbf7850..eacd9af 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -1,8 +1,6 @@
 # @summary An example class
 # @param file
 #   The file to manage
-# @param content
-#   The content in the file
 class example (
   Stdlib::Absolutepath $file = '/tmp/puppet-example',
   String[1] $content = 'Hello World!',
bastelfreak@bastelfreak-nb ~/code/modulesync_config/modules/voxpupuli/puppet-example $

Copy link
Sponsor Member

Choose a reason for hiding this comment

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

was asking myself the same (my rubocop plugin wanted to auto fix this every time i opend the file XD) . but if it is tested...

lib/voxpupuli/test/spec_helper.rb Outdated Show resolved Hide resolved
previously this gem only contained a rubocop config that's used in our
modules. We didn't run rubocop for the ruby code in this exact gem. This
is changed with this commit.
@bastelfreak bastelfreak merged commit bf10e92 into voxpupuli:master Jul 5, 2024
10 checks passed
@bastelfreak bastelfreak deleted the rubocop2 branch July 5, 2024 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants