Skip to content
This repository was archived by the owner on Jul 24, 2025. It is now read-only.

Commit f44757d

Browse files
authored
SRCH-1874 install searchgov_style gem (#77)
- auto-correct some basic Rubocop offenses - bundle updated gems
1 parent 3ae1788 commit f44757d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+285
-213
lines changed

.codeclimate.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
---
2-
engines:
1+
version: '2'
2+
# Work around CodeClimate's inability to use Rubocop's inherit_gem directive:
3+
# https://github.com/codeclimate/codeclimate-rubocop/issues/71#issuecomment-635055223
4+
prepare:
5+
fetch:
6+
- url: https://raw.githubusercontent.com/GSA/searchgov_style/main/.default.yml
7+
path: .rubocop-https---raw-githubusercontent-com-GSA-searchgov-style-main--default-yml
8+
plugins:
39
brakeman:
410
enabled: true
511
bundler-audit:
@@ -13,11 +19,7 @@ engines:
1319
enabled: true
1420
rubocop:
1521
enabled: true
16-
ratings:
17-
paths:
18-
- Gemfile.lock
19-
- "**.rb"
20-
exclude_paths:
22+
channel: rubocop-1-8-1
23+
exclude_patterns:
2124
- config/
22-
- spec/
2325
- coverage/

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/.bundle
22
/log/*.log
33
/tmp
4+
# Ignore the rubocop YAML file that is downloaded when running `rubocop` locally
5+
.rubocop*default-yml
46
.ruby-version
57
.ruby-gemset
68
config/instagram.yml

.rubocop.yml

Lines changed: 18 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,20 @@
1-
Naming/AccessorMethodName:
2-
Enabled: false
3-
Metrics/LineLength:
4-
Enabled: false
5-
Metrics/BlockLength:
6-
Enabled: false
7-
Metrics/AbcSize:
8-
Enabled: false
9-
Metrics/MethodLength:
10-
Enabled: false
11-
Metrics/ParameterLists:
12-
Max: 7
13-
Metrics/CyclomaticComplexity:
14-
Enabled: false
15-
Metrics/PerceivedComplexity:
16-
Enabled: false
17-
Style/Documentation:
18-
Enabled: false
19-
Metrics/ClassLength:
20-
Enabled: false
21-
Rails/Output:
22-
Enabled: false
23-
Style/DateTime:
24-
Enabled: false
25-
Style/FormatStringToken:
26-
Enabled: false
27-
Rails/FilePath:
28-
Enabled: false
29-
Rails/TimeZone:
30-
Enabled: false
31-
Style/MixinUsage:
1+
# Work around CodeClimate's inability to use Rubocop's inherit_gem directive:
2+
# https://github.com/codeclimate/codeclimate-rubocop/issues/71#issuecomment-635055223
3+
inherit_from:
4+
- https://raw.githubusercontent.com/GSA/searchgov_style/main/.default.yml
5+
6+
inherit_mode:
7+
merge:
8+
- Exclude
9+
10+
AllCops:
3211
Exclude:
33-
- bin/*
34-
Rails/HttpPositionalArguments:
35-
# https://github.com/bbatsov/rubocop/issues/5624
12+
# All Instagram-related code is deprecated and will be removed
13+
- /**/**/instagram*
14+
15+
# Always omit parentheses for methods that are part of an internal DSL
16+
# (e.g., Rake, Rails, RSpec)
17+
Style/MethodCallWithArgsParentheses:
3618
Exclude:
37-
- spec/cors_spec.rb
19+
# Exclude files relying on Jbuilder DSL
20+
- app/queries/*

Gemfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ gem 'http', '~> 4.0.0'
4242

4343
group :development, :test do
4444
gem 'puma', '~> 3.12'
45-
4645
gem 'binding_of_caller'
4746
gem 'pry-rails'
4847
gem 'rspec-rails', '~> 3.8.2'
@@ -55,6 +54,9 @@ group :development do
5554
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
5655
gem 'spring'
5756
gem 'spring-watcher-listen', '~> 2.0.0'
57+
# Bumping searchgov_style? Be sure to update the Rubocop channel in .codeclimate.yml
58+
# to match the channel in searchgov_style
59+
gem 'searchgov_style', '~> 0.1', require: false
5860
end
5961

6062
group :test do

0 commit comments

Comments
 (0)