rubocop-yayoi 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/lib/rubocop/cop/layout/space_after_comma.rb +11 -0
- data/lib/rubocop/cop/lint/ineffective_access_modifier.rb +17 -0
- data/lib/rubocop/cop/lint/unreachable_code.rb +11 -0
- data/lib/rubocop/cop/lint/useless_access_modifier.rb +11 -0
- data/lib/rubocop/cop/lint/useless_assignment.rb +11 -0
- data/lib/rubocop/cop/mixin/space_after_punctuation.rb +9 -0
- data/lib/rubocop/cop/naming/ascii_identifiers.rb +11 -0
- data/lib/rubocop/cop/style/comment_annotation.rb +13 -0
- data/lib/rubocop/cop/style/def_with_parentheses.rb +11 -0
- data/lib/rubocop/cop/style/empty_method.rb +13 -0
- data/lib/rubocop/cop/style/mutable_constant.rb +11 -0
- data/lib/rubocop/cop/style/numeric_literals.rb +11 -0
- data/lib/rubocop/cop/style/redundant_return.rb +12 -0
- data/lib/rubocop/cop/style/unneeded_interpolation.rb +11 -0
- data/lib/rubocop/cop/style/word_array.rb +12 -0
- data/lib/rubocop/yayoi/version.rb +1 -1
- data/lib/rubocop-yayoi.rb +14 -0
- metadata +17 -3
- data/Gemfile.lock +0 -50
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd646f6d502dcae26a3ee043a4a9f379b5f818ed513c7b12816b81b58c092a1d
|
4
|
+
data.tar.gz: 3e2e3ca11118f2a7a1d411762f08f6388f787bdeac29ec099fc0d8b210f82f16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 689e52d24e000cfd8b2239c91dc260b185cdafcf0861a250258c81f76bc4dfc2f4b90af58ffeb16c28a2cc171608542ac999c841f8a87e9b24e4dcc4aa4b6d55
|
7
|
+
data.tar.gz: 5d061b0091edde9c16815a2c93d6661f4f71e5842eefb052e3fb01a58e2dfb5ac928b0a91d7464fc55b94eb87771d24f0bcb622a4f08ea18e247c4a36364234a
|
data/.gitignore
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
module Cop
|
5
|
+
module Lint
|
6
|
+
class IneffectiveAccessModifier < Cop
|
7
|
+
MSG = "ζ*'ヮ')ζ<うっうー!%<line>d行目にある`%<modifier>s`は" \
|
8
|
+
'シングルトンメソッドの%<modifier>sを作りませんよー!' \
|
9
|
+
'代わりに%<alternative>s'.freeze
|
10
|
+
ALTERNATIVE_PRIVATE = '`private_class_method`か`private`を' \
|
11
|
+
'`class << self`ブロックの内部に置きましょー!'.freeze
|
12
|
+
ALTERNATIVE_PROTECTED = '`protected`を' \
|
13
|
+
'`class << self`ブロックの内部に置きましょー!'.freeze
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
module Cop
|
5
|
+
module Style
|
6
|
+
class CommentAnnotation < Cop
|
7
|
+
MSG = "ζ*'ヮ')ζ<うっうー!`%<keyword>s`のような注釈は全部大きい文字にして" \
|
8
|
+
'コロン、スペースのあとにコメントを書きましょうねー!'.freeze
|
9
|
+
MISSING_NOTE = "ζ*'ヮ')ζ<うっうー!`%<keyword>s`があるけども、肝心のコメントがないですよー!".freeze
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
module Cop
|
5
|
+
module Style
|
6
|
+
class EmptyMethod < Cop
|
7
|
+
MSG_COMPACT = "ζ*'ヮ')ζ<うっうー!なにも書いてないメソッドは1行で書きましょうねー!".freeze
|
8
|
+
MSG_EXPANDED = "ζ*'ヮ')ζ<うっうー!なにも書いてないメソッドは1行で書かないで、" \
|
9
|
+
'`end`を次の行に書きましょうねー!'.freeze
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/lib/rubocop-yayoi.rb
CHANGED
@@ -13,17 +13,23 @@ require_relative 'rubocop/cop/layout/initial_indentation'
|
|
13
13
|
require_relative 'rubocop/cop/layout/space_around_operators'
|
14
14
|
|
15
15
|
require_relative 'rubocop/cop/lint/ambiguous_block_association'
|
16
|
+
require_relative 'rubocop/cop/lint/ineffective_access_modifier'
|
17
|
+
require_relative 'rubocop/cop/lint/unreachable_code'
|
16
18
|
require_relative 'rubocop/cop/lint/unused_block_argument'
|
17
19
|
require_relative 'rubocop/cop/lint/unused_method_argument'
|
20
|
+
require_relative 'rubocop/cop/lint/useless_access_modifier'
|
21
|
+
require_relative 'rubocop/cop/lint/useless_assignment'
|
18
22
|
|
19
23
|
require_relative 'rubocop/cop/mixin/empty_lines_around_body'
|
20
24
|
require_relative 'rubocop/cop/mixin/end_keyword_alignment'
|
25
|
+
require_relative 'rubocop/cop/mixin/space_after_punctuation'
|
21
26
|
require_relative 'rubocop/cop/mixin/uncommunicative_name'
|
22
27
|
|
23
28
|
require_relative 'rubocop/cop/metrics/cyclomatic_complexity'
|
24
29
|
require_relative 'rubocop/cop/metrics/line_length'
|
25
30
|
require_relative 'rubocop/cop/metrics/perceived_complexity'
|
26
31
|
|
32
|
+
require_relative 'rubocop/cop/naming/ascii_identifiers'
|
27
33
|
require_relative 'rubocop/cop/naming/class_and_module_camel_case'
|
28
34
|
require_relative 'rubocop/cop/naming/predicate_name'
|
29
35
|
require_relative 'rubocop/cop/naming/variable_name'
|
@@ -31,7 +37,15 @@ require_relative 'rubocop/cop/naming/variable_name'
|
|
31
37
|
require_relative 'rubocop/cop/style/and_or'
|
32
38
|
require_relative 'rubocop/cop/style/ascii_comments'
|
33
39
|
require_relative 'rubocop/cop/style/colon_method_call'
|
40
|
+
require_relative 'rubocop/cop/style/comment_annotation'
|
41
|
+
require_relative 'rubocop/cop/style/def_with_parentheses'
|
34
42
|
require_relative 'rubocop/cop/style/documentation'
|
35
43
|
require_relative 'rubocop/cop/style/double_negation'
|
44
|
+
require_relative 'rubocop/cop/style/empty_method'
|
45
|
+
require_relative 'rubocop/cop/style/mutable_constant'
|
46
|
+
require_relative 'rubocop/cop/style/numeric_literals'
|
47
|
+
require_relative 'rubocop/cop/style/redundant_return'
|
36
48
|
require_relative 'rubocop/cop/style/string_literals'
|
37
49
|
require_relative 'rubocop/cop/style/unneeded_condition'
|
50
|
+
require_relative 'rubocop/cop/style/unneeded_interpolation'
|
51
|
+
require_relative 'rubocop/cop/style/word_array'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-yayoi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- YutaGoto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-05-
|
11
|
+
date: 2019-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -65,7 +65,6 @@ files:
|
|
65
65
|
- ".travis.yml"
|
66
66
|
- CODE_OF_CONDUCT.md
|
67
67
|
- Gemfile
|
68
|
-
- Gemfile.lock
|
69
68
|
- LICENSE.txt
|
70
69
|
- README.md
|
71
70
|
- Rakefile
|
@@ -80,17 +79,24 @@ files:
|
|
80
79
|
- lib/rubocop/cop/layout/indentation_consistency.rb
|
81
80
|
- lib/rubocop/cop/layout/indentation_width.rb
|
82
81
|
- lib/rubocop/cop/layout/initial_indentation.rb
|
82
|
+
- lib/rubocop/cop/layout/space_after_comma.rb
|
83
83
|
- lib/rubocop/cop/layout/space_around_operators.rb
|
84
84
|
- lib/rubocop/cop/lint/ambiguous_block_association.rb
|
85
|
+
- lib/rubocop/cop/lint/ineffective_access_modifier.rb
|
86
|
+
- lib/rubocop/cop/lint/unreachable_code.rb
|
85
87
|
- lib/rubocop/cop/lint/unused_block_argument.rb
|
86
88
|
- lib/rubocop/cop/lint/unused_method_argument.rb
|
89
|
+
- lib/rubocop/cop/lint/useless_access_modifier.rb
|
90
|
+
- lib/rubocop/cop/lint/useless_assignment.rb
|
87
91
|
- lib/rubocop/cop/metrics/cyclomatic_complexity.rb
|
88
92
|
- lib/rubocop/cop/metrics/line_length.rb
|
89
93
|
- lib/rubocop/cop/metrics/perceived_complexity.rb
|
90
94
|
- lib/rubocop/cop/mixin/.DS_Store
|
91
95
|
- lib/rubocop/cop/mixin/empty_lines_around_body.rb
|
92
96
|
- lib/rubocop/cop/mixin/end_keyword_alignment.rb
|
97
|
+
- lib/rubocop/cop/mixin/space_after_punctuation.rb
|
93
98
|
- lib/rubocop/cop/mixin/uncommunicative_name.rb
|
99
|
+
- lib/rubocop/cop/naming/ascii_identifiers.rb
|
94
100
|
- lib/rubocop/cop/naming/class_and_module_camel_case.rb
|
95
101
|
- lib/rubocop/cop/naming/predicate_name.rb
|
96
102
|
- lib/rubocop/cop/naming/uncommunicative_method_param_name.rb
|
@@ -98,10 +104,18 @@ files:
|
|
98
104
|
- lib/rubocop/cop/style/and_or.rb
|
99
105
|
- lib/rubocop/cop/style/ascii_comments.rb
|
100
106
|
- lib/rubocop/cop/style/colon_method_call.rb
|
107
|
+
- lib/rubocop/cop/style/comment_annotation.rb
|
108
|
+
- lib/rubocop/cop/style/def_with_parentheses.rb
|
101
109
|
- lib/rubocop/cop/style/documentation.rb
|
102
110
|
- lib/rubocop/cop/style/double_negation.rb
|
111
|
+
- lib/rubocop/cop/style/empty_method.rb
|
112
|
+
- lib/rubocop/cop/style/mutable_constant.rb
|
113
|
+
- lib/rubocop/cop/style/numeric_literals.rb
|
114
|
+
- lib/rubocop/cop/style/redundant_return.rb
|
103
115
|
- lib/rubocop/cop/style/string_literals.rb
|
104
116
|
- lib/rubocop/cop/style/unneeded_condition.rb
|
117
|
+
- lib/rubocop/cop/style/unneeded_interpolation.rb
|
118
|
+
- lib/rubocop/cop/style/word_array.rb
|
105
119
|
- lib/rubocop/formatter/progress_formatter.rb
|
106
120
|
- lib/rubocop/formatter/simple_text_formatter.rb
|
107
121
|
- lib/rubocop/yayoi.rb
|
data/Gemfile.lock
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
rubocop-yayoi (0.0.1)
|
5
|
-
rubocop (>= 0.67.2)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
ast (2.4.0)
|
11
|
-
diff-lcs (1.3)
|
12
|
-
jaro_winkler (1.5.2)
|
13
|
-
parallel (1.17.0)
|
14
|
-
parser (2.6.3.0)
|
15
|
-
ast (~> 2.4.0)
|
16
|
-
rainbow (3.0.0)
|
17
|
-
rake (10.5.0)
|
18
|
-
rspec (3.8.0)
|
19
|
-
rspec-core (~> 3.8.0)
|
20
|
-
rspec-expectations (~> 3.8.0)
|
21
|
-
rspec-mocks (~> 3.8.0)
|
22
|
-
rspec-core (3.8.0)
|
23
|
-
rspec-support (~> 3.8.0)
|
24
|
-
rspec-expectations (3.8.3)
|
25
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
26
|
-
rspec-support (~> 3.8.0)
|
27
|
-
rspec-mocks (3.8.0)
|
28
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
29
|
-
rspec-support (~> 3.8.0)
|
30
|
-
rspec-support (3.8.0)
|
31
|
-
rubocop (0.68.1)
|
32
|
-
jaro_winkler (~> 1.5.1)
|
33
|
-
parallel (~> 1.10)
|
34
|
-
parser (>= 2.5, != 2.5.1.1)
|
35
|
-
rainbow (>= 2.2.2, < 4.0)
|
36
|
-
ruby-progressbar (~> 1.7)
|
37
|
-
unicode-display_width (>= 1.4.0, < 1.6)
|
38
|
-
ruby-progressbar (1.10.0)
|
39
|
-
unicode-display_width (1.5.0)
|
40
|
-
|
41
|
-
PLATFORMS
|
42
|
-
ruby
|
43
|
-
|
44
|
-
DEPENDENCIES
|
45
|
-
rake (~> 10.0)
|
46
|
-
rspec (~> 3.0)
|
47
|
-
rubocop-yayoi!
|
48
|
-
|
49
|
-
BUNDLED WITH
|
50
|
-
2.0.1
|