salsify_rubocop 0.40.0 → 0.40.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +79 -9
- data/conf/rubocop_without_rspec.yml +9 -0
- data/lib/salsify_rubocop/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f740776b4dd783805ab13489676b4d8aa6ffa1c0
|
4
|
+
data.tar.gz: aa84e48dffec1b909c2ecbda341558dac30cd638
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06fb43b8eae49f4e048c12a7c054e094c958882bf181e38d59d12e3f997acb11da40a9b9522b83a69f0a28a72427ea90acc43efe271e4fc5e071769bb7274505
|
7
|
+
data.tar.gz: 25c00c93bd7e7eed800b17ee161870d35e33c889959627095a1dc196469c188c41115ca5bb6ef207f7bdb58f1fa4310d55b05926e5681d5fb2fab4f94cf13f34
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,16 @@
|
|
1
1
|
# salsify_rubocop
|
2
2
|
|
3
|
+
## v0.40.1
|
4
|
+
- Changes to `rubocop_without_rspec` configuration:
|
5
|
+
|
6
|
+
Performance/RedundantMerge:
|
7
|
+
MaxKeyValuePairs: 1
|
8
|
+
|
9
|
+
Style/ModuleFunction:
|
10
|
+
Enabled: false
|
11
|
+
|
12
|
+
Style/RaiseArgs:
|
13
|
+
EnforcedStyle: compact
|
14
|
+
|
3
15
|
## v0.40.0
|
4
16
|
- Initial version
|
data/README.md
CHANGED
@@ -1,28 +1,98 @@
|
|
1
|
-
#
|
1
|
+
# salsify_rubocop
|
2
2
|
|
3
|
-
|
3
|
+
This gem provides shared configuration for RuboCop for Salsify applications
|
4
|
+
and gems.
|
4
5
|
|
5
|
-
|
6
|
+
[RuboCop](https://github.com/bbatsov/rubocop) is a static code analyzer that
|
7
|
+
can enforce style conventions as well as identify common problems.
|
6
8
|
|
7
9
|
## Installation
|
8
10
|
|
9
11
|
Add this line to your application's Gemfile:
|
10
12
|
|
11
13
|
```ruby
|
12
|
-
|
14
|
+
group :development, :test do
|
15
|
+
gem 'salsify_rubocop', require: false
|
16
|
+
end
|
13
17
|
```
|
14
18
|
|
15
|
-
|
19
|
+
Or to your gem's gemspec file:
|
16
20
|
|
17
|
-
|
21
|
+
```ruby
|
22
|
+
spec.add_development_dependency 'salsify_rubocop'
|
23
|
+
```
|
24
|
+
|
25
|
+
If you created your gem using
|
26
|
+
[cookiecutter-salsify-gem](https://github.com/salsify/cookiecutter-salsify-gem)
|
27
|
+
then this dependency was added automatically.
|
28
|
+
|
29
|
+
Then execute:
|
30
|
+
|
31
|
+
$ bundle install
|
32
|
+
|
33
|
+
It's best to ensure that you're starting from the latest release, so execute:
|
34
|
+
|
35
|
+
$ bundle update salsify_rubocop
|
36
|
+
|
37
|
+
## Configuration
|
38
|
+
|
39
|
+
To use one of the shared RuboCop configurations from this gem, you must define
|
40
|
+
a `.rubocop.yml` file at the top-level directory in your project:
|
41
|
+
|
42
|
+
```yaml
|
43
|
+
inherit_gem:
|
44
|
+
salsify_rubocop: conf/rubocop_rails.yml
|
45
|
+
```
|
18
46
|
|
19
|
-
|
47
|
+
Further customization of RuboCop for your local project may also be added to
|
48
|
+
this file.
|
20
49
|
|
21
|
-
|
50
|
+
### Available Configurations
|
22
51
|
|
52
|
+
- **rubocop_rails**: For Rails projects, this inherits from **rubocop**.
|
53
|
+
- **rubocop**: Assumes RSpec is used and requires
|
54
|
+
[rubocop-rspec](https://github.com/nevir/rubocop-rspec). This configuration
|
55
|
+
is the default for gems. This inherits from **rubocop_without_rspec**.
|
56
|
+
- **rubocop_without_rspec**: Configuration without `rubocop-rspec`. This is
|
57
|
+
intended for gems that we may have forked and taken ownership of without
|
58
|
+
converting tests from a different framework.
|
59
|
+
|
23
60
|
## Usage
|
24
61
|
|
25
|
-
|
62
|
+
Run `rubocop` for an entire project:
|
63
|
+
|
64
|
+
$ bundle exec rubocop --format fu
|
65
|
+
|
66
|
+
See the `rubocop` command-line for additional options including auto-generating
|
67
|
+
configuration for existing offenses and auto-correction.
|
68
|
+
|
69
|
+
### Overcommit
|
70
|
+
|
71
|
+
Consider using [overcommit](https://github.com/brigade/overcommit) to
|
72
|
+
automatically run `rubocop` on changed files before committing.
|
73
|
+
|
74
|
+
This is automatically added by
|
75
|
+
[cookiecutter-salsify-gem](https://github.com/salsify/cookiecutter-salsify-gem/blob/master/%7B%7Bcookiecutter.repo_name%7D%7D/.overcommit.yml).
|
76
|
+
|
77
|
+
### CI
|
78
|
+
|
79
|
+
Consider running `rubocop` prior to running tests in CI for your project.
|
80
|
+
|
81
|
+
TODO: add more info here.
|
82
|
+
|
83
|
+
## Versioning
|
84
|
+
|
85
|
+
This gem is versioned based on the MAJOR.MINOR version of `rubocop`. The first
|
86
|
+
release of the `salsify_rubocop` gem was v0.40.0.
|
87
|
+
|
88
|
+
The patch version for this gem does _not_ correspond to the patch version of
|
89
|
+
`rubocop`. The patch version for this gem will change any time that one of its
|
90
|
+
configurations is modified _or_ its dependency on `rubocop` is changed to require
|
91
|
+
a different patch version.
|
92
|
+
|
93
|
+
This gem also includes a dependency on `rubocop-rspec` that will be updated to
|
94
|
+
the latest compatible version each time that the MAJOR.MINOR version of `rubocop`
|
95
|
+
is updated.
|
26
96
|
|
27
97
|
## Development
|
28
98
|
|
@@ -12,6 +12,9 @@ AllCops:
|
|
12
12
|
Lint/AmbiguousOperator:
|
13
13
|
Enabled: false
|
14
14
|
|
15
|
+
Performance/RedundantMerge:
|
16
|
+
MaxKeyValuePairs: 1
|
17
|
+
|
15
18
|
Style/Alias:
|
16
19
|
EnforcedStyle: prefer_alias_method
|
17
20
|
|
@@ -54,6 +57,9 @@ Style/GuardClause:
|
|
54
57
|
Style/Lambda:
|
55
58
|
Enabled: false
|
56
59
|
|
60
|
+
Style/ModuleFunction:
|
61
|
+
Enabled: false
|
62
|
+
|
57
63
|
Style/MultilineMethodCallIndentation:
|
58
64
|
Enabled: false
|
59
65
|
|
@@ -66,6 +72,9 @@ Style/MultilineBlockLayout:
|
|
66
72
|
Style/Proc:
|
67
73
|
Enabled: false
|
68
74
|
|
75
|
+
Style/RaiseArgs:
|
76
|
+
EnforcedStyle: compact
|
77
|
+
|
69
78
|
Style/RegexpLiteral:
|
70
79
|
Enabled: false
|
71
80
|
|
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: 0.40.
|
4
|
+
version: 0.40.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: 2016-05-
|
11
|
+
date: 2016-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
version: '0'
|
126
126
|
requirements: []
|
127
127
|
rubyforge_project:
|
128
|
-
rubygems_version: 2.
|
128
|
+
rubygems_version: 2.5.1
|
129
129
|
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: Shared shared RuboCop configuration
|