This message was deleted.
# office-hours
s
This message was deleted.
👀 1
g
PR looks good. Your rebase just brought in the new Rubocop checks from our Puppet 8 support work. Shouldn't be too tough a fix
i'll merge when you fix those
p
❤️
I do wish rubocop would say which file it is upset with
Copy code
Error: unrecognized cop or department RSpec/NoExpectationExample found in .rubocop_todo.yml
Did you mean `RSpec/RepeatedExample`?
Any ideas?
g
hmm let me check
what gives you that error?
i'm not seeing it
p
Copy code
rubocop -A
Error: unrecognized cop or department RSpec/NoExpectationExample found in .rubocop_todo.yml
Did you mean `RSpec/RepeatedExample`?
Copy code
rubocop -v
1.50.2
g
that rubocop version doesn't seem right
after you rebased have you run
bundle install
?
maybe
rm -rf Gemfile.lock .bundle
then
bundle install --path .bundle
p
Copy code
[riehecky@leibniz puppetlabs-vcsrepo]$ .bundle/ruby/3.2.0/bin/rubocop -A spec/
Error: unrecognized cop or department RSpec/NoExpectationExample found in .rubocop_todo.yml
Did you mean `RSpec/RepeatedExample`?
[riehecky@leibniz puppetlabs-vcsrepo]$ .bundle/ruby/3.2.0/bin/rubocop -v
1.50.2
d
p
hmmmm
g
try
bundle exec rubocop
instead
bundle exec rubocop -a
looks like it can autocorrect 25/47 of the offenses
p
That seems to run 🙂
g
nice!
p
I fear I may not know enough ruby to fix the remaining errors....
g
let's see
j
Hey @Pat Riehecky 👋 can you run a
bundle exec rubocop --auto-gen-config
and post that in here
p
Copy code
[riehecky@leibniz puppetlabs-vcsrepo]$ bundle exec rubocop --auto-gen-config
Phase 1 of 2: run Layout/LineLength cop (skipped because the default Layout/LineLength:Max is overridden)
Phase 2 of 2: run all cops
Inspecting 41 files
..CC.WCCWWWCCCCCCCCCCCCCCCCC...C..CCCCCCC

41 files inspected, 433 offenses detected, 18 offenses autocorrectable
Created .rubocop_todo.yml.
d
j
Okay Cool. Looks like the main cops it was complaining about (
RSpec/ContextWording
,
RSpec/NoExpectationExample
and
RSpec/DescribeClass
) are already added in our .rubocop_todo.yml. Can you push the updated .rubocop_todo.yml file up to the PR? Should stop rubocop screaming 🙂
p
pushed
j
👍
p
Hmmm, looks like
bzr
got dropped from the RHEL world... I'm not sure how to skip that test for those hosts....
j
you can confine tests to only run on certain OS's using
if: os[:family] != 'rhel'
or something similar
🙂
p
In theory I've got a check in for that pushed up just now, in practice I don't totally understand what rubocop turned it into...