Skip to content

Commit

Permalink
Merge pull request #57 from samvera-labs/rubocop1
Browse files Browse the repository at this point in the history
Upgrade to rubocop 1.x
  • Loading branch information
jrgriffiniii authored Feb 23, 2022
2 parents 1c227e1 + 38f4809 commit 0d06099
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 30 deletions.
26 changes: 9 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

orbs:
samvera: samvera/circleci-orb@0
samvera: samvera/circleci-orb@1

jobs:
bundle_lint_test:
Expand All @@ -12,7 +12,7 @@ jobs:
type: string
bundler_version:
type: string
default: 1.17.3
default: 2.3.6

executor:
name: 'samvera/ruby'
Expand All @@ -21,35 +21,27 @@ jobs:
steps:
- samvera/cached_checkout

- samvera/bundle_for_gem:
- samvera/bundle:
ruby_version: << parameters.ruby_version >>
bundler_version: << parameters.bundler_version >>
project: << parameters.project >>
cache_version: '2'

- samvera/rubocop

workflows:
version: 2
ci:
jobs:
- bundle_lint_test:
project: bixby
name: ruby2-4
ruby_version: 2.4.10

- bundle_lint_test:
project: bixby
name: ruby2-5
ruby_version: 2.5.8

- bundle_lint_test:
project: bixby
name: ruby2-6
ruby_version: 2.6.6
ruby_version: 2.6.9

- bundle_lint_test:
project: bixby
name: ruby2-7
ruby_version: 2.7.1
ruby_version: 2.7.5

- bundle_lint_test:
project: bixby
name: ruby3-0
ruby_version: 3.0.3
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
inherit_from: bixby_default.yml
9 changes: 4 additions & 5 deletions bixby.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ Gem::Specification.new do |spec|
spec.version = '3.0.2'
spec.license = 'Apache-2.0'

spec.add_dependency 'rubocop', '0.85.1'
# Added to prevent downstream breakage; When we update the above
# Rubocop version, we will want to revisit this dependency. Either
# changing the version range OR removing it.
spec.add_dependency 'rubocop-ast', '~> 0.3.0'
spec.required_ruby_version = '>= 2.6'

spec.add_dependency 'rubocop', '>= 1', '< 2'
spec.add_dependency 'rubocop-ast'
spec.add_dependency 'rubocop-performance'
spec.add_dependency 'rubocop-rails'
spec.add_dependency 'rubocop-rspec'
Expand Down
8 changes: 4 additions & 4 deletions bixby_default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,6 @@ Style/MethodCallWithoutArgsParentheses:
Style/MethodDefParentheses:
Enabled: true

Style/MethodMissingSuper:
Enabled: true

Style/MissingRespondToMissing:
Enabled: true

Expand Down Expand Up @@ -726,6 +723,9 @@ Lint/LiteralInInterpolation:
Lint/Loop:
Enabled: true

Lint/MissingSuper:
Enabled: true

Lint/MultipleComparison:
Enabled: true

Expand Down Expand Up @@ -795,7 +795,7 @@ Lint/UselessAccessModifier:
Lint/UselessAssignment:
Enabled: true

Lint/UselessComparison:
Lint/BinaryOperatorWithIdenticalOperands:
Enabled: true

Lint/UselessElseWithoutRescue:
Expand Down
6 changes: 2 additions & 4 deletions bixby_rspec_enabled.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
require: rubocop-rspec

AllCops:
RSpec:
Patterns:
RSpec:
Include:
- _spec.rb
- "(?:^|/)spec/"

Expand All @@ -25,7 +24,6 @@ RSpec/DescribeMethod:

RSpec/EmptyExampleGroup:
Enabled: true
CustomIncludeMethods: []

RSpec/ExampleLength:
Enabled: true
Expand Down

0 comments on commit 0d06099

Please sign in to comment.