Skip to content

Commit

Permalink
SRCH-1874 install searchgov_style gem (#77)
Browse files Browse the repository at this point in the history
- auto-correct some basic Rubocop offenses
- bundle updated gems
  • Loading branch information
MothOnMars authored Feb 4, 2021
1 parent 3ae1788 commit f44757d
Show file tree
Hide file tree
Showing 43 changed files with 285 additions and 213 deletions.
18 changes: 10 additions & 8 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
---
engines:
version: '2'
# Work around CodeClimate's inability to use Rubocop's inherit_gem directive:
# https://github.com/codeclimate/codeclimate-rubocop/issues/71#issuecomment-635055223
prepare:
fetch:
- url: https://raw.githubusercontent.com/GSA/searchgov_style/main/.default.yml
path: .rubocop-https---raw-githubusercontent-com-GSA-searchgov-style-main--default-yml
plugins:
brakeman:
enabled: true
bundler-audit:
Expand All @@ -13,11 +19,7 @@ engines:
enabled: true
rubocop:
enabled: true
ratings:
paths:
- Gemfile.lock
- "**.rb"
exclude_paths:
channel: rubocop-1-8-1
exclude_patterns:
- config/
- spec/
- coverage/
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/.bundle
/log/*.log
/tmp
# Ignore the rubocop YAML file that is downloaded when running `rubocop` locally
.rubocop*default-yml
.ruby-version
.ruby-gemset
config/instagram.yml
Expand Down
53 changes: 18 additions & 35 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,20 @@
Naming/AccessorMethodName:
Enabled: false
Metrics/LineLength:
Enabled: false
Metrics/BlockLength:
Enabled: false
Metrics/AbcSize:
Enabled: false
Metrics/MethodLength:
Enabled: false
Metrics/ParameterLists:
Max: 7
Metrics/CyclomaticComplexity:
Enabled: false
Metrics/PerceivedComplexity:
Enabled: false
Style/Documentation:
Enabled: false
Metrics/ClassLength:
Enabled: false
Rails/Output:
Enabled: false
Style/DateTime:
Enabled: false
Style/FormatStringToken:
Enabled: false
Rails/FilePath:
Enabled: false
Rails/TimeZone:
Enabled: false
Style/MixinUsage:
# Work around CodeClimate's inability to use Rubocop's inherit_gem directive:
# https://github.com/codeclimate/codeclimate-rubocop/issues/71#issuecomment-635055223
inherit_from:
- https://raw.githubusercontent.com/GSA/searchgov_style/main/.default.yml

inherit_mode:
merge:
- Exclude

AllCops:
Exclude:
- bin/*
Rails/HttpPositionalArguments:
# https://github.com/bbatsov/rubocop/issues/5624
# All Instagram-related code is deprecated and will be removed
- /**/**/instagram*

# Always omit parentheses for methods that are part of an internal DSL
# (e.g., Rake, Rails, RSpec)
Style/MethodCallWithArgsParentheses:
Exclude:
- spec/cors_spec.rb
# Exclude files relying on Jbuilder DSL
- app/queries/*
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ gem 'http', '~> 4.0.0'

group :development, :test do
gem 'puma', '~> 3.12'

gem 'binding_of_caller'
gem 'pry-rails'
gem 'rspec-rails', '~> 3.8.2'
Expand All @@ -55,6 +54,9 @@ group :development do
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
# Bumping searchgov_style? Be sure to update the Rubocop channel in .codeclimate.yml
# to match the channel in searchgov_style
gem 'searchgov_style', '~> 0.1', require: false
end

group :test do
Expand Down
Loading

0 comments on commit f44757d

Please sign in to comment.