salsify_rubocop 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.circleci/config.yml +34 -0
- data/CHANGELOG.md +3 -3
- data/README.md +24 -0
- data/conf/rubocop_rails.yml +4 -0
- data/conf/rubocop_without_rspec.yml +4 -0
- data/lib/salsify_rubocop/version.rb +1 -1
- data/salsify_rubocop.gemspec +1 -0
- metadata +17 -3
- data/.travis.yml +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf4488cacf9244dcc1eef749f7e8be0aec426462bbdd97bba63f2585d9e341fa
|
4
|
+
data.tar.gz: 7c804cbcb3576fd3ba2852a667f0db842eb5b2393a7e775101930488eb2b97d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a19b74a0b2600a044f45ae9203a4115cf8dc66b8422c7cf3424d9028d81e273e9cd474dc2f518c5d1f6b39c48b8b95ffb28ec534f56ce14f5bf1ac8f4973689a
|
7
|
+
data.tar.gz: 30b89b5377a2a32895e26947cee22985a17221334519e26bf7e0e3b63e37becd2616c1856626350a5123d51958254beebb5fdde7e1fd1bb16f4d67d8c1bffef5
|
@@ -0,0 +1,34 @@
|
|
1
|
+
version: 2
|
2
|
+
jobs:
|
3
|
+
build:
|
4
|
+
docker:
|
5
|
+
- image: salsify/ruby_ci:2.5.8
|
6
|
+
environment:
|
7
|
+
CIRCLE_TEST_REPORTS: "test-results"
|
8
|
+
working_directory: ~/salsify_rubocop
|
9
|
+
steps:
|
10
|
+
- checkout
|
11
|
+
- restore_cache:
|
12
|
+
keys:
|
13
|
+
- v1-gems-ruby-2.5.8-{{ checksum "salsify_rubocop.gemspec" }}-{{ checksum "Gemfile" }}
|
14
|
+
- v1-gems-ruby-2.5.8-
|
15
|
+
- run:
|
16
|
+
name: Install Gems
|
17
|
+
command: |
|
18
|
+
if ! bundle check --path=vendor/bundle; then
|
19
|
+
bundle install --path=vendor/bundle --jobs=4 --retry=3
|
20
|
+
bundle clean
|
21
|
+
fi
|
22
|
+
- save_cache:
|
23
|
+
key: v1-gems-ruby-2.5.8-{{ checksum "salsify_rubocop.gemspec" }}-{{ checksum "Gemfile" }}
|
24
|
+
paths:
|
25
|
+
- "vendor/bundle"
|
26
|
+
- run:
|
27
|
+
name: Run Rubocop
|
28
|
+
command: bundle exec rubocop
|
29
|
+
- run:
|
30
|
+
name: Run Tests
|
31
|
+
command: |
|
32
|
+
bundle exec rspec --format RspecJunitFormatter --out $CIRCLE_TEST_REPORTS/rspec/junit.xml --format progress spec
|
33
|
+
- store_test_results:
|
34
|
+
path: "test-results"
|
data/CHANGELOG.md
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
# salsify_rubocop
|
2
2
|
|
3
|
-
## 1.0.
|
3
|
+
## 1.0.1
|
4
|
+
- Configure file exclusions for `Rails/RakeEnvironment` and `Gemspec/RequiredRubyVersion`
|
4
5
|
|
6
|
+
## 1.0.0
|
5
7
|
- Upgrade to `rubocop` v1.0.0
|
6
8
|
- Upgrade to `rubocop-rspec` v2.0.0
|
7
9
|
|
8
10
|
## 0.93.1
|
9
|
-
|
10
11
|
- Upgrade to `rubocop` v0.93.1
|
11
12
|
- Add configuration for pending 1.0 cops
|
12
13
|
|
13
14
|
## 0.91.0
|
14
|
-
|
15
15
|
- Upgrade to `rubocop` v0.91.0
|
16
16
|
|
17
17
|
## 0.85.0
|
data/README.md
CHANGED
@@ -93,6 +93,30 @@ This gem also includes a dependency on `rubocop-rspec` that will be updated to
|
|
93
93
|
the latest compatible version each time that the MAJOR.MINOR version of `rubocop`
|
94
94
|
is updated.
|
95
95
|
|
96
|
+
## Change Process
|
97
|
+
|
98
|
+
This configuration is meant to represent the general opinion of Salsify's Ruby community around best practices for
|
99
|
+
writing readable Ruby code. As a result, changes to this configuration should go through a discussion phase in the
|
100
|
+
#rubocop-changes Slack channel to ensure the broader Salsify Ruby community is on board with the change. Non-Salsify
|
101
|
+
developers should file an issue via GitHub with proposed changes.
|
102
|
+
|
103
|
+
When enabling a cop we try to keep the following points in mind to avoid overburdening consumers:
|
104
|
+
|
105
|
+
* Does the cop support safe auto-correction? If not, do we expect a large number of offenses needing manual remediation?
|
106
|
+
* Does the cop help avoid bugs or is it merely stylistic?
|
107
|
+
* For stylistic cops, does the enforced style reflect that of Salsify developers?
|
108
|
+
|
109
|
+
### Updating RuboCop
|
110
|
+
|
111
|
+
Updating to a new minor version of `rubocop` may add new "pending" cops which are not enabled until the next major
|
112
|
+
version (see: [RuboCop Versioning](https://docs.rubocop.org/rubocop/versioning.html)). However, we may wish to eagerly
|
113
|
+
enable or explicitly disable newly introduced cops. Any such decisions around "pending" cops should go through the
|
114
|
+
change process described above.
|
115
|
+
|
116
|
+
When updating to a new major version or updating other dependencies that don't follow the same versioning pattern, we
|
117
|
+
should check if there are any newly enabled cops included in the update. Any new cops should go through a review process
|
118
|
+
in #rubocop-changes to ensure we truly want to enable the cop.
|
119
|
+
|
96
120
|
## Development
|
97
121
|
|
98
122
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. Run `bundle exec salsify_rubocop` to use the gem in this directory, ignoring other installed copies of this gem.
|
data/conf/rubocop_rails.yml
CHANGED
@@ -19,6 +19,10 @@ Bundler/GemComment:
|
|
19
19
|
- 'github'
|
20
20
|
- 'gist'
|
21
21
|
|
22
|
+
Gemspec/RequiredRubyVersion:
|
23
|
+
Exclude:
|
24
|
+
- schemas_gem/*_schemas.gemspec
|
25
|
+
|
22
26
|
# This cop has poor handling for the common case of a lambda arg in a DSL
|
23
27
|
Lint/AmbiguousBlockAssociation:
|
24
28
|
Enabled: false
|
data/salsify_rubocop.gemspec
CHANGED
@@ -35,6 +35,7 @@ Gem::Specification.new do |spec|
|
|
35
35
|
spec.add_development_dependency 'bundler', '~> 2.0'
|
36
36
|
spec.add_development_dependency 'rake', '~> 10.0'
|
37
37
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
38
|
+
spec.add_development_dependency 'rspec_junit_formatter'
|
38
39
|
|
39
40
|
spec.add_runtime_dependency 'rubocop', '~> 1.0.0'
|
40
41
|
spec.add_runtime_dependency 'rubocop-performance', '~> 1.5.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: salsify_rubocop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Salsify, Inc
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec_junit_formatter
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: rubocop
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,10 +129,10 @@ executables: []
|
|
115
129
|
extensions: []
|
116
130
|
extra_rdoc_files: []
|
117
131
|
files:
|
132
|
+
- ".circleci/config.yml"
|
118
133
|
- ".gitignore"
|
119
134
|
- ".rspec"
|
120
135
|
- ".rubocop.yml"
|
121
|
-
- ".travis.yml"
|
122
136
|
- CHANGELOG.md
|
123
137
|
- Gemfile
|
124
138
|
- LICENSE.txt
|