rubocop-bridgetown 0.2.3 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +22 -37
- data/README.md +15 -12
- data/lib/rubocop/cop/bridgetown/no_p_allowed.rb +1 -1
- data/lib/rubocop/cop/bridgetown/no_puts_allowed.rb +1 -1
- data/lib/rubocop-bridgetown.rb +1 -1
- metadata +13 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 672cf19d93df420e0b5d39013347e57bf618ee8b9eb6fa013b90f0dcfd3bd66a
|
4
|
+
data.tar.gz: 9ec8303b15642fe57854420562d7e5df529508fa24127b2a9a64863b85d813b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3af8850965db58dccaa35502531234da7ebca8f71a0c65feaae764102a43777885de64ede24eec274670f05592d8c5bba25b13d8b58ad574054de970e624a2a8
|
7
|
+
data.tar.gz: f324c2c2763e064ab1529842bfb7ae31b5dedbc38be2dae4624ea2518b5d9a56d45bd95c901116a03742cdad3bd0fb5aff05ea049a615659cbca7939b5e7cc16
|
data/.rubocop.yml
CHANGED
@@ -3,6 +3,8 @@ require:
|
|
3
3
|
|
4
4
|
AllCops:
|
5
5
|
TargetRubyVersion: 2.5
|
6
|
+
NewCops: enable
|
7
|
+
SuggestExtensions: false
|
6
8
|
Exclude:
|
7
9
|
- bin/**/*
|
8
10
|
- exe/**/*
|
@@ -12,35 +14,31 @@ AllCops:
|
|
12
14
|
- vendor/**/*
|
13
15
|
- tmp/**/*
|
14
16
|
|
15
|
-
Layout/
|
16
|
-
|
17
|
-
Layout/
|
17
|
+
Layout/EmptyComment:
|
18
|
+
Enabled: false
|
19
|
+
Layout/EndAlignment:
|
18
20
|
Severity: error
|
19
21
|
Layout/FirstArrayElementIndentation:
|
20
22
|
EnforcedStyle: consistent
|
21
23
|
Layout/FirstHashElementIndentation:
|
22
24
|
EnforcedStyle: consistent
|
25
|
+
Layout/HashAlignment:
|
26
|
+
EnforcedHashRocketStyle: table
|
27
|
+
Layout/IndentationWidth:
|
28
|
+
Severity: error
|
23
29
|
Layout/MultilineMethodCallIndentation:
|
24
30
|
EnforcedStyle: indented
|
25
31
|
Layout/MultilineOperationIndentation:
|
26
32
|
EnforcedStyle: indented
|
27
|
-
Layout/
|
28
|
-
|
29
|
-
|
30
|
-
Severity: error
|
31
|
-
Lint/RaiseException:
|
32
|
-
Enabled: true
|
33
|
-
Lint/StructNewOverride:
|
34
|
-
Enabled: true
|
33
|
+
Layout/LineLength:
|
34
|
+
Max: 100
|
35
|
+
Severity: warning
|
35
36
|
Lint/UnreachableCode:
|
36
37
|
Severity: error
|
37
38
|
Metrics/AbcSize:
|
38
39
|
Max: 24
|
39
40
|
Metrics/ClassLength:
|
40
41
|
Max: 240
|
41
|
-
Layout/LineLength:
|
42
|
-
Max: 100
|
43
|
-
Severity: warning
|
44
42
|
Metrics/MethodLength:
|
45
43
|
CountComments: false
|
46
44
|
Max: 20
|
@@ -61,41 +59,28 @@ Style/Alias:
|
|
61
59
|
EnforcedStyle: prefer_alias_method
|
62
60
|
Style/AndOr:
|
63
61
|
Severity: error
|
62
|
+
Style/ClassAndModuleChildren:
|
63
|
+
Enabled: false
|
64
64
|
Style/FrozenStringLiteralComment:
|
65
65
|
EnforcedStyle: always
|
66
66
|
Style/Documentation:
|
67
67
|
Enabled: false
|
68
68
|
Style/DoubleNegation:
|
69
69
|
Enabled: false
|
70
|
-
Style/
|
71
|
-
|
72
|
-
Style/HashEachMethods:
|
73
|
-
Enabled: true
|
74
|
-
Style/HashSyntax: # This now adheres to GitHub's newest Ruby style guide
|
75
|
-
EnforcedStyle: ruby19
|
76
|
-
SupportedStyles:
|
77
|
-
# checks for 1.9 syntax (e.g. {a: 1}) for all symbol keys
|
78
|
-
- ruby19
|
79
|
-
# checks for hash rocket syntax for all hashes
|
80
|
-
- hash_rockets
|
81
|
-
# forbids mixed key syntaxes (e.g. {a: 1, :b => 2})
|
82
|
-
- no_mixed_keys
|
83
|
-
# enforces both ruby19 and no_mixed_keys styles
|
84
|
-
- ruby19_no_mixed_keys
|
85
|
-
# Force hashes that have a symbol value to use hash rockets
|
86
|
-
UseHashRocketsWithSymbolValues: false
|
87
|
-
# Do not suggest { a?: 1 } over { :a? => 1 } in ruby19 style
|
88
|
-
PreferHashRocketsForNonAlnumEndingSymbols: false
|
89
|
-
Style/HashTransformKeys:
|
90
|
-
Enabled: false
|
91
|
-
Style/HashTransformValues:
|
92
|
-
Enabled: true
|
70
|
+
Style/EndlessMethod:
|
71
|
+
EnforcedStyle: allow_always
|
93
72
|
Style/Lambda:
|
94
73
|
EnforcedStyle: literal
|
74
|
+
Style/LambdaCall:
|
75
|
+
Enabled: false
|
95
76
|
Style/ModuleFunction:
|
96
77
|
Enabled: false
|
78
|
+
Style/MultilineBlockChain:
|
79
|
+
Enabled: false
|
97
80
|
Style/MultilineTernaryOperator:
|
98
81
|
Severity: error
|
82
|
+
Style/ParallelAssignment:
|
83
|
+
Enabled: false
|
99
84
|
Style/PercentLiteralDelimiters:
|
100
85
|
Enabled: false
|
101
86
|
Style/RegexpLiteral:
|
data/README.md
CHANGED
@@ -1,34 +1,27 @@
|
|
1
1
|
# RuboCop Bridgetown
|
2
2
|
|
3
|
-
A RuboCop extension to enforce common code style in Bridgetown
|
3
|
+
A RuboCop extension to enforce a common code style in the Bridgetown ecosystem and beyond.
|
4
4
|
|
5
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-
|
6
|
+
![RuboCop Support](https://img.shields.io/badge/Rubocop%20Support-1.22.0-green.svg)
|
7
7
|
|
8
8
|
|
9
9
|
## Installation
|
10
10
|
|
11
|
-
Just
|
12
|
-
|
13
|
-
```
|
14
|
-
gem install rubocop-bridgetown
|
15
|
-
```
|
16
|
-
|
17
|
-
or if you prefer Bundler, add it to your `Gemfile` or `gemspec`
|
11
|
+
Just add the `rubocop-bridgetown` gem to your Gemfile.
|
18
12
|
|
19
13
|
```ruby
|
20
14
|
# Gemfile
|
21
15
|
|
22
|
-
gem "rubocop-bridgetown", "~> 0.
|
16
|
+
gem "rubocop-bridgetown", "~> 0.3"
|
23
17
|
```
|
24
18
|
```ruby
|
25
19
|
# <plugin>.gemspec
|
26
20
|
|
27
|
-
spec.add_development_dependency "rubocop-bridgetown", "~> 0.
|
21
|
+
spec.add_development_dependency "rubocop-bridgetown", "~> 0.3"
|
28
22
|
```
|
29
23
|
and run `bundle install`
|
30
24
|
|
31
|
-
|
32
25
|
## Usage
|
33
26
|
|
34
27
|
You need to tell RuboCop to load the extension and *inherit* the custom RuboCop configuration advocated by
|
@@ -44,6 +37,16 @@ inherit_gem:
|
|
44
37
|
|
45
38
|
Running `bundle exec rubocop` will now automatically load the `rubocop-bridgetown` cops together with the standard cops.
|
46
39
|
|
40
|
+
You can also add a `rubocop` task to your `Rakefile`.
|
41
|
+
|
42
|
+
```ruby
|
43
|
+
# Rakefile
|
44
|
+
|
45
|
+
require "rubocop/rake_task"
|
46
|
+
|
47
|
+
RuboCop::RakeTask.new
|
48
|
+
```
|
49
|
+
|
47
50
|
## Exclude Folders List
|
48
51
|
|
49
52
|
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:
|
data/lib/rubocop-bridgetown.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-bridgetown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bridgetown Team
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '1.23'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: '1.23'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rubocop-performance
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1.
|
33
|
+
version: '1.12'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1.
|
40
|
+
version: '1.12'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,7 +66,8 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '12.0'
|
69
|
-
description: A RuboCop extension to enforce common code style in Bridgetown
|
69
|
+
description: A RuboCop extension to enforce common code style in Bridgetown projects
|
70
|
+
and beyond
|
70
71
|
email:
|
71
72
|
- maintainers@bridgetownrb.com
|
72
73
|
executables: []
|
@@ -83,7 +84,7 @@ homepage: https://github.com/bridgetownrb/rubocop-bridgetown
|
|
83
84
|
licenses:
|
84
85
|
- MIT
|
85
86
|
metadata: {}
|
86
|
-
post_install_message:
|
87
|
+
post_install_message:
|
87
88
|
rdoc_options: []
|
88
89
|
require_paths:
|
89
90
|
- lib
|
@@ -98,8 +99,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
98
99
|
- !ruby/object:Gem::Version
|
99
100
|
version: '0'
|
100
101
|
requirements: []
|
101
|
-
rubygems_version: 3.
|
102
|
-
signing_key:
|
102
|
+
rubygems_version: 3.2.32
|
103
|
+
signing_key:
|
103
104
|
specification_version: 4
|
104
|
-
summary: Code style check for Bridgetown
|
105
|
+
summary: Code style check for Bridgetown projects
|
105
106
|
test_files: []
|