searchgov_style 0.1.18 → 0.1.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/.default.yml +157 -0
  3. data/LICENSE.md +31 -0
  4. data/README.md +77 -0
  5. metadata +6 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 98771b273a45b8b7e4d5ed4342fcfcbd3f3dbe7d027ee76854069608459928ff
4
- data.tar.gz: 79ca1103933f4c4fd62555dd7ddde12efe5286532ae130627230118465f26ef7
3
+ metadata.gz: b0c997be5507b22317f796308dbf415e0aa2dcaab578d82f8de5d7b897814b66
4
+ data.tar.gz: 27b70f590fb1efaacfce4173d8bc4e54fff658786fff69ea7b671d9fc568ce78
5
5
  SHA512:
6
- metadata.gz: 64e017a753221760175d859ae0b770117fe8fe514a7a4e036b900d82efcb9af08ccf0e2ab43989be1d5634e65a8f838ead86ac0fb51900da35170202d678b387
7
- data.tar.gz: a1345c46f7bed734c5a435806dcbfa32a767fde3f88d7eebe1c6eccc1c0d0b282f56bc8574fa3162cfda2137c0755deee9c73d6110fa4fe19d9df5b5eb4dbacc
6
+ metadata.gz: 9039caf1780f00279b5e30d8a9082685f69a9123d3aa8c798f55f362add2c4ab2a75ab7fab0fdd08f51016a82489bd02b0b53fa35dd05b7d9f130ee791c4cdcd
7
+ data.tar.gz: 81e9903cc9b32e7b03d4f37568f2099d48703082654c949962038ff33ca6f225a4c859305834e161d16324edee61da025ba18d51bec33a017b48624ea66735dc
data/.default.yml ADDED
@@ -0,0 +1,157 @@
1
+ require:
2
+ - rubocop-performance
3
+ - rubocop-rails
4
+ - rubocop-rake
5
+ - rubocop-rspec
6
+
7
+ AllCops:
8
+ NewCops: enable
9
+ Exclude:
10
+ - 'bin/**/*'
11
+ - 'config/**/*'
12
+ - 'config.ru'
13
+ - 'db/**/*'
14
+ - 'vendor/**/*'
15
+
16
+ #### Bundler ####
17
+
18
+ Bundler/OrderedGems:
19
+ Enabled: false
20
+
21
+ #### Layout ####
22
+
23
+ Layout/DotPosition:
24
+ EnforcedStyle: trailing
25
+
26
+ Layout/ExtraSpacing:
27
+ AllowForAlignment: true
28
+
29
+ # We are disabling this cop to prevent analysis from tripping on the many pre-existing
30
+ # offenses in our repos. Devs can rely on themselves and each other to maintain
31
+ # sane line lengths going forward, and fix offending lines as needed.
32
+ Layout/LineLength:
33
+ Enabled: false
34
+
35
+ Layout/MultilineMethodCallIndentation:
36
+ EnforcedStyle: indented
37
+
38
+ #### Lint ####
39
+ Lint/AmbiguousBlockAssociation:
40
+ Exclude:
41
+ # https://github.com/rubocop/rubocop/issues/4222#issuecomment-290655562
42
+ - 'spec/**/*'
43
+
44
+ #### Metrics ####
45
+
46
+ Metrics/BlockLength:
47
+ CountComments: false # count full line comments?
48
+ Max: 25
49
+ IgnoredMethods:
50
+ # By default, exclude the `#refine` method, as it tends to have larger
51
+ # associated blocks.
52
+ - refine
53
+ Exclude:
54
+ # Specs by nature tend to have lengthy, nested blocks
55
+ - '*.gemspec'
56
+ - 'spec/**/*'
57
+
58
+ Metrics/MethodLength:
59
+ CountAsOne:
60
+ - array
61
+ - hash
62
+ - heredoc
63
+
64
+ #### Performance ####
65
+
66
+ Performance/TimesMap:
67
+ # Disabling. Using `Array.new` with a block is marginally more performant, but
68
+ # `n.times.map` is much more readable. The former can be used when n is large.
69
+ # https://stackoverflow.com/questions/41518896/why-does-rubocop-suggest-replacing-times-map-with-array-new
70
+ Enabled: false
71
+
72
+ #### Rails ####
73
+
74
+ Rails/SkipsModelValidations:
75
+ # We are leaving this cop enabled as a warning.
76
+ # Failures can be approved as needed during code review.
77
+ Enabled: true
78
+
79
+ #### RSpec ####
80
+
81
+ # See also the list of RSpec statements that we exempt from the block
82
+ # length cop, under Metrics/BlockLength above
83
+
84
+ RSpec/DescribeClass:
85
+ Exclude:
86
+ - 'spec/lib/tasks/**/*'
87
+
88
+ RSpec/DescribedClass:
89
+ SkipBlocks: true
90
+
91
+ RSpec/ExampleLength:
92
+ Enabled: false
93
+
94
+ RSpec/ExpectChange:
95
+ EnforcedStyle: block
96
+
97
+ RSpec/ImplicitSubject:
98
+ EnforcedStyle: single_statement_only
99
+
100
+ RSpec/MessageChain:
101
+ Enabled: false
102
+
103
+ RSpec/MultipleExpectations:
104
+ Enabled: false
105
+
106
+ RSpec/NestedGroups:
107
+ Enabled: false
108
+
109
+ #### Style ####
110
+
111
+ Style/Documentation:
112
+ Enabled: false
113
+
114
+ Style/IfUnlessModifier:
115
+ Enabled: false
116
+
117
+ Style/MethodCallWithArgsParentheses:
118
+ Description: 'Use parentheses for method calls with arguments.'
119
+ Enabled: true
120
+ IgnoredMethods:
121
+ # Ignore Ruby keyword methods:
122
+ # https://rubystyle.guide/#methods-that-have-keyword-status-in-ruby
123
+ - require
124
+ - yield
125
+ # https://rubystyle.guide/#exceptions
126
+ - raise
127
+ # Ignore logging methods, as they are considered part of an internal DSL
128
+ # https://rubystyle.guide/#methods-that-are-part-of-an-internal-dsl
129
+ - debug
130
+ - info
131
+ - warn
132
+ - error
133
+ - fatal
134
+ # Ignore Rails DSL methods
135
+ - has_many
136
+ - has_one
137
+ - order
138
+ - redirect_to
139
+ - render
140
+ - reset_callbacks
141
+ - set_callback
142
+ - skip_callback
143
+ Exclude:
144
+ - 'spec/**/*'
145
+ - 'Gemfile'
146
+ - 'db/**/*'
147
+ - '*.gemspec'
148
+
149
+ Style/MixinUsage:
150
+ Exclude:
151
+ - bin/*
152
+
153
+ Style/RescueStandardError:
154
+ Enabled: false
155
+
156
+ Style/SymbolArray:
157
+ MinSize: 4
data/LICENSE.md ADDED
@@ -0,0 +1,31 @@
1
+ As a work of the United States government, this project is in the
2
+ public domain within the United States.
3
+
4
+ Additionally, we waive copyright and related rights in the work
5
+ worldwide through the CC0 1.0 Universal public domain dedication.
6
+
7
+ ## CC0 1.0 Universal summary
8
+
9
+ This is a human-readable summary of the [Legal Code (read the full text)](https://creativecommons.org/publicdomain/zero/1.0/legalcode).
10
+
11
+ ### No copyright
12
+
13
+ The person who associated a work with this deed has dedicated the work to
14
+ the public domain by waiving all rights to the work worldwide
15
+ under copyright law, including all related and neighboring rights, to the
16
+ extent allowed by law.
17
+
18
+ You can copy, modify, distribute and perform the work, even for commercial
19
+ purposes, all without asking permission.
20
+
21
+ ### Other information
22
+
23
+ In no way are the patent or trademark rights of any person affected by CC0,
24
+ nor are the rights that other persons may have in the work or in how the
25
+ work is used, such as publicity or privacy rights.
26
+
27
+ Unless expressly stated otherwise, the person who associated a work with
28
+ this deed makes no warranties about the work, and disclaims liability for
29
+ all uses of the work, to the fullest extent permitted by applicable law.
30
+ When using or citing the work, you should not imply endorsement by the
31
+ author or the affirmer.
data/README.md ADDED
@@ -0,0 +1,77 @@
1
+ # searchgov_style
2
+
3
+ Shared [Rubocop](https://rubocop.org/) configuration for Search.gov repositories
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ group :test, :development do
11
+ gem 'searchgov_style'
12
+ end
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install searchgov_style
22
+
23
+ ## Usage
24
+
25
+ In the root directory of the repo using this gem, create a `.rubocop.yml` with the following directives:
26
+
27
+ ```yaml
28
+ inherit_gem:
29
+ searchgov_style:
30
+ - .default.yml
31
+ ```
32
+
33
+ Now, run:
34
+
35
+ ```bash
36
+ $ bundle exec rubocop
37
+ ```
38
+
39
+ You do not need to include rubocop directly in your application's dependencies. searchgov_style will include specific versions of `rubocop` and related gems (such as `rubocop-rspec`) that are shared across all projects.
40
+
41
+ Refer to the [Rubocop documentation](https://docs.rubocop.org/) for Rubocop usage instructions.
42
+
43
+ ## Development
44
+
45
+ Install the development gems:
46
+
47
+ $ bundle
48
+
49
+ Run Rubocop on the gem repository itself:
50
+
51
+ $ rubocop
52
+
53
+ ### Upgrading Rubocop
54
+
55
+ To upgrade the version of Rubocop used by this gem, perform the
56
+ following steps to ensure [compatibility with CodeClimate](https://docs.codeclimate.com/docs/rubocop#using-rubocops-newer-versions):
57
+
58
+ 1. Verify that the new version is supported by CodeClimate:
59
+ [list of Rubocop channels for CodeClimate](https://github.com/codeclimate/codeclimate-rubocop/branches/all?utf8=%E2%9C%93&query=channel%2Frubocop)
60
+ 1. Verify that the new version is listed as a channel for the Rubocop engine for the CodeClimate CLI:
61
+ [CodeClimate Engines](https://github.com/codeclimate/codeclimate/blob/master/config/engines.yml)
62
+ 1. Bump the version of Rubocop in the [gemspec](searchgov-style.gemspec)
63
+ 1. Bump the Rubocop channel in [.codeclimate.yml](.codeclimate.yml)
64
+
65
+ Verify your configuration and compatibility locally using the [CodeClimate CLI](https://github.com/codeclimate/codeclimate):
66
+
67
+ $ bundle update
68
+ $ codeclimate validate-config
69
+ $ codeclimate analyze lib/ -e rubocop
70
+
71
+ ## Contributing
72
+
73
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/searchgov_style.
74
+
75
+ ## License
76
+
77
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: searchgov_style
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.18
4
+ version: 0.1.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - MothOnMars
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-16 00:00:00.000000000 Z
11
+ date: 2022-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -114,7 +114,10 @@ email:
114
114
  executables: []
115
115
  extensions: []
116
116
  extra_rdoc_files: []
117
- files: []
117
+ files:
118
+ - ".default.yml"
119
+ - LICENSE.md
120
+ - README.md
118
121
  homepage: https://github.com/GSA/searchgov_style
119
122
  licenses:
120
123
  - MIT