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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 59fec0f321a3661ec067f41b4b8e68e9c8ef0f5a798ad68a437d34055d1d7717
4
- data.tar.gz: 22f3e7bbb91f44959582665628a665685a621db192e67979cf600491a2370d4a
3
+ metadata.gz: dd646f6d502dcae26a3ee043a4a9f379b5f818ed513c7b12816b81b58c092a1d
4
+ data.tar.gz: 3e2e3ca11118f2a7a1d411762f08f6388f787bdeac29ec099fc0d8b210f82f16
5
5
  SHA512:
6
- metadata.gz: d7cd44b71dc770b86972f0526deb530d903d04ec844a77f2065b311bec25a6d91684012f946e457790092fb919d25b747d15989dcb9c601476ce161414497be5
7
- data.tar.gz: 8e5c218b8ccb858ab528d4c13a3ecad50a4329a811f85c3123dc701b411e17cc4f22a7789e375b565efd643c4e34e8eb7068647ff6490d5f54acbcae2ad38a39
6
+ metadata.gz: 689e52d24e000cfd8b2239c91dc260b185cdafcf0861a250258c81f76bc4dfc2f4b90af58ffeb16c28a2cc171608542ac999c841f8a87e9b24e4dcc4aa4b6d55
7
+ data.tar.gz: 5d061b0091edde9c16815a2c93d6661f4f71e5842eefb052e3fb01a58e2dfb5ac928b0a91d7464fc55b94eb87771d24f0bcb622a4f08ea18e247c4a36364234a
data/.gitignore CHANGED
@@ -8,5 +8,8 @@
8
8
  /tmp/
9
9
  /vendor/**/*
10
10
 
11
+ Gemfile.lock
12
+ Gemfile.local
13
+
11
14
  # rspec failure tracking
12
15
  .rspec_status
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ module Cop
5
+ module Layout
6
+ class SpaceAfterComma < Cop
7
+ include SpaceAfterPunctuation
8
+ end
9
+ end
10
+ end
11
+ end
@@ -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,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ module Cop
5
+ module Lint
6
+ class UnreachableCode < Cop
7
+ MSG = "ζ*'ヮ')ζ<うっうー!処理されないコードがありますよー!".freeze
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ module Cop
5
+ module Lint
6
+ class UselessAccessModifier < Cop
7
+ MSG = "ζ*'ヮ')ζ<うっうー!`%<current>s`は意味がないですよー!".freeze
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ module Cop
5
+ module Lint
6
+ class UselessAssignment < Cop
7
+ MSG = "ζ*'ヮ')ζ<うっうー!使っていない変数がありますよー! - `%<variable>s`.".freeze
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ module Cop
5
+ module SpaceAfterPunctuation
6
+ MSG = "ζ*'ヮ')ζ<うっうー!%<token>sの後ろにスペースがないですよー!".freeze
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ module Cop
5
+ module Naming
6
+ class AsciiIdentifiers < Cop
7
+ MSG = "ζ*'ヮ')ζ<うっうー!識別子にはラテン文字だけを使いましょうねー".freeze
8
+ end
9
+ end
10
+ end
11
+ 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,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ module Cop
5
+ module Style
6
+ class DefWithParentheses < Cop
7
+ MSG = "ζ*'ヮ')ζ<うっうー!メソッドに引数がないときは、`()`を省略しましょうねー!".freeze
8
+ end
9
+ end
10
+ end
11
+ 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
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ module Cop
5
+ module Style
6
+ class MutableConstant < Cop
7
+ MSG = "ζ*'ヮ')ζ<うっうー!書き換え可能な定数を`.freeze`で更新できないようにしましょうねー!".freeze
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ module Cop
5
+ module Style
6
+ class NumericLiterals < Cop
7
+ MSG = "ζ*'ヮ')ζ<うっうー!3桁区切りにアンダースコア(_)を使いましょうねー!".freeze
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ module Cop
5
+ module Style
6
+ class RedundantReturn < Cop
7
+ MSG = "ζ*'ヮ')ζ<うっうー!冗長な`return`がありますよー!".freeze
8
+ MULTI_RETURN_MSG = "ζ*'ヮ')ζ<うっうー!複数の値を返すときは配列を使いましょうねー!".freeze
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ module Cop
5
+ module Style
6
+ class UnneededInterpolation < Cop
7
+ MSG = "ζ*'ヮ')ζ<うっうー!文字列の式展開よりも`to_s`を使いましょうねー!".freeze
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ module Cop
5
+ module Style
6
+ class WordArray < Cop
7
+ PERCENT_MSG = "ζ*'ヮ')ζ<うっうー!文字列だけだけの配列には`%w`か`%W`を使いましょうねー!".freeze
8
+ ARRAY_MSG = "ζ*'ヮ')ζ<うっうー!配列には`[]`を使いましょうねー!".freeze
9
+ end
10
+ end
11
+ end
12
+ end
@@ -1,5 +1,5 @@
1
1
  module Rubocop
2
2
  module Yayoi
3
- VERSION = '0.0.1'.freeze
3
+ VERSION = '0.0.2'.freeze
4
4
  end
5
5
  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.1
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-01 00:00:00.000000000 Z
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