rubocop-bridgetown 0.1.0 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +8 -10
- data/README.md +20 -15
- data/lib/rubocop-bridgetown.rb +2 -0
- metadata +5 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47a7b3f0ef1f2e3211f32ba505d5cf60310a94f9b881c11eaad81b8d17f5edfd
|
4
|
+
data.tar.gz: c2c83c60b7487e5c87d289a1e5de1627311435987c1946cf2a6ff3d0c3d6dabc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e664f288e51eb4b1075a3e95d05f15151dc2c347b069933c5f5272a305d6bdbebd35f83800e9d2d2c5cb63135eda5e23551eb53243276a18484bfaec597c7e05
|
7
|
+
data.tar.gz: 23fe76f8cebf17e0a17f037f6817324c110bf9be907991eb1f1a5d24075599fa045e06adc4dca3301db813197821610cb2bc4b7cfafa72f9ec43eb11c581f753
|
data/.rubocop.yml
CHANGED
@@ -7,6 +7,7 @@ AllCops:
|
|
7
7
|
- bin/**/*
|
8
8
|
- exe/**/*
|
9
9
|
- benchmark/**/*
|
10
|
+
- node_modules/**/*
|
10
11
|
- script/**/*
|
11
12
|
- vendor/**/*
|
12
13
|
- tmp/**/*
|
@@ -34,7 +35,7 @@ Lint/StructNewOverride:
|
|
34
35
|
Lint/UnreachableCode:
|
35
36
|
Severity: error
|
36
37
|
Metrics/AbcSize:
|
37
|
-
Max:
|
38
|
+
Max: 24
|
38
39
|
Metrics/ClassLength:
|
39
40
|
Max: 240
|
40
41
|
Layout/LineLength:
|
@@ -89,19 +90,16 @@ Style/HashTransformKeys:
|
|
89
90
|
Enabled: false
|
90
91
|
Style/HashTransformValues:
|
91
92
|
Enabled: true
|
93
|
+
Style/Lambda:
|
94
|
+
EnforcedStyle: literal
|
95
|
+
Style/LambdaCall:
|
96
|
+
Enabled: false
|
92
97
|
Style/ModuleFunction:
|
93
98
|
Enabled: false
|
94
99
|
Style/MultilineTernaryOperator:
|
95
100
|
Severity: error
|
96
101
|
Style/PercentLiteralDelimiters:
|
97
|
-
|
98
|
-
"%q": "{}"
|
99
|
-
"%Q": "{}"
|
100
|
-
"%r": "!!"
|
101
|
-
"%s": "()"
|
102
|
-
"%w": "()"
|
103
|
-
"%W": "()"
|
104
|
-
"%x": "()"
|
102
|
+
Enabled: false
|
105
103
|
Style/RegexpLiteral:
|
106
104
|
EnforcedStyle: percent_r
|
107
105
|
Style/RescueModifier:
|
@@ -113,7 +111,7 @@ Style/StringLiterals:
|
|
113
111
|
Style/StringLiteralsInInterpolation:
|
114
112
|
EnforcedStyle: double_quotes
|
115
113
|
Style/SymbolArray:
|
116
|
-
|
114
|
+
Enabled: false
|
117
115
|
Style/TrailingCommaInArrayLiteral:
|
118
116
|
EnforcedStyleForMultiline: consistent_comma
|
119
117
|
Style/TrailingCommaInHashLiteral:
|
data/README.md
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
A RuboCop extension to enforce common code style in Bridgetown plugins.
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
![Gem Version](https://img.shields.io/gem/v/rubocop-bridgetown.svg?label=Latest%20Release)
|
6
|
+
![RuboCop Support](https://img.shields.io/badge/Rubocop%20Support-0.81.0-green.svg)
|
7
7
|
|
8
8
|
|
9
9
|
## Installation
|
@@ -19,12 +19,12 @@ or if you prefer Bundler, add it to your `Gemfile` or `gemspec`
|
|
19
19
|
```ruby
|
20
20
|
# Gemfile
|
21
21
|
|
22
|
-
gem "rubocop-bridgetown", "~> 0.
|
22
|
+
gem "rubocop-bridgetown", "~> 0.2"
|
23
23
|
```
|
24
24
|
```ruby
|
25
25
|
# <plugin>.gemspec
|
26
26
|
|
27
|
-
spec.add_development_dependency "rubocop-bridgetown", "~> 0.
|
27
|
+
spec.add_development_dependency "rubocop-bridgetown", "~> 0.2"
|
28
28
|
```
|
29
29
|
and run `bundle install`
|
30
30
|
|
@@ -32,7 +32,7 @@ and run `bundle install`
|
|
32
32
|
## Usage
|
33
33
|
|
34
34
|
You need to tell RuboCop to load the extension and *inherit* the custom RuboCop configuration advocated by
|
35
|
-
[Bridgetown](https://github.com/bridgetown).
|
35
|
+
[Bridgetown](https://github.com/bridgetownrb/bridgetown).
|
36
36
|
|
37
37
|
Place the following at the top of your `.rubocop.yml`.
|
38
38
|
|
@@ -44,17 +44,22 @@ inherit_gem:
|
|
44
44
|
|
45
45
|
Running `bundle exec rubocop` will now automatically load the `rubocop-bridgetown` cops together with the standard cops.
|
46
46
|
|
47
|
+
## Exclude Folders List
|
47
48
|
|
48
|
-
|
49
|
-
|
50
|
-
You can override any settings inherited from the extension by subsequently redefining the concerned parameters.
|
51
|
-
|
49
|
+
Currently it seems Rubocop doesn't inherit the `Excludes` folder list from the gem configuration, so you may want to add it manually to your `.rubocop.yml` file:
|
52
50
|
|
53
|
-
|
51
|
+
```yaml
|
52
|
+
AllCops:
|
53
|
+
Exclude:
|
54
|
+
- bin/**/*
|
55
|
+
- exe/**/*
|
56
|
+
- benchmark/**/*
|
57
|
+
- node_modules/**/*
|
58
|
+
- script/**/*
|
59
|
+
- vendor/**/*
|
60
|
+
- tmp/**/*
|
61
|
+
```
|
54
62
|
|
55
|
-
|
63
|
+
## Customization
|
56
64
|
|
57
|
-
|
58
|
-
2. The `master` branch of Bridgetown repository is updated to the latest RuboCop version along with any updates to their `.rubocop.yml`.
|
59
|
-
3. The RuboCop version and `.rubocop.yml` at this gem's repository is updated **via a pull request**.
|
60
|
-
4. A new minor release is subsequently cut and shipped.
|
65
|
+
You can override any settings inherited from the extension by subsequently redefining the concerned parameters.
|
data/lib/rubocop-bridgetown.rb
CHANGED
metadata
CHANGED
@@ -1,33 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-bridgetown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bridgetown Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 0.68.0
|
20
|
-
- - "<"
|
17
|
+
- - "~>"
|
21
18
|
- !ruby/object:Gem::Version
|
22
19
|
version: 0.81.0
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
|
-
- - "
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: 0.68.0
|
30
|
-
- - "<"
|
24
|
+
- - "~>"
|
31
25
|
- !ruby/object:Gem::Version
|
32
26
|
version: 0.81.0
|
33
27
|
- !ruby/object:Gem::Dependency
|
@@ -104,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
98
|
- !ruby/object:Gem::Version
|
105
99
|
version: '0'
|
106
100
|
requirements: []
|
107
|
-
rubygems_version: 3.
|
101
|
+
rubygems_version: 3.1.4
|
108
102
|
signing_key:
|
109
103
|
specification_version: 4
|
110
104
|
summary: Code style check for Bridgetown plugins
|