forkwell_cop 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rubocop.yml +2 -0
- data/.ruby-version +1 -0
- data/.travis.yml +5 -0
- data/Gemfile +5 -0
- data/LICENSE.txt +21 -0
- data/README.md +38 -0
- data/Rakefile +6 -0
- data/config/default.yml +3 -0
- data/config/enabled.yml +80 -0
- data/config/todo.yml +91 -0
- data/forkwell_cop.gemspec +22 -0
- data/lib/forkwell_cop.rb +5 -0
- data/lib/forkwell_cop/version.rb +4 -0
- metadata +98 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 02cf4cc3d5fae3ed56ea22bd3d16ec47526a532f
|
4
|
+
data.tar.gz: e74fe68d1fdda0c675d6d806cb67dbd40cd42326
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e210d3ab23a685a38d77f9bd056b44e2010ed3e07f6f80602870195a751a06e6ff8998c231bddfff46451b24e9feba242b52a43c07393de2fe8d0d0671a68ece
|
7
|
+
data.tar.gz: b1d5c5267c85bd646bc26646c6840f0a7a8768a7670c7a71532a5fb244df5ffd3c53e3881df1988d526dc8425689f4d6243191b4d7debde2ff27e2716b4d1e3c
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.3.1
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2016 grooves
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# ForkwellCop
|
2
|
+
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/forkwell_cop.svg)](https://badge.fury.io/rb/forkwell_cop)
|
4
|
+
[![Build Status](https://travis-ci.org/grooves/forkwell_cop.svg?branch=master)](https://travis-ci.org/grooves/forkwell_cop)
|
5
|
+
|
6
|
+
RuboCop configration in [Forkwell](https://forkwell.com). Inspired by [onkcop](https://github.com/onk/onkcop).
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
Add this line to your application's Gemfile:
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
gem 'forkwell_cop', require: false
|
14
|
+
```
|
15
|
+
|
16
|
+
## Usage
|
17
|
+
|
18
|
+
Put this into your `.rubocop.yml`:
|
19
|
+
|
20
|
+
```yml
|
21
|
+
inherit_gem:
|
22
|
+
forkwell_cop:
|
23
|
+
- 'config/default.yml'
|
24
|
+
```
|
25
|
+
|
26
|
+
And then execute:
|
27
|
+
|
28
|
+
```
|
29
|
+
bundle exec rubocop
|
30
|
+
```
|
31
|
+
|
32
|
+
## Contributing
|
33
|
+
|
34
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/grooves/forkwell_cop.
|
35
|
+
|
36
|
+
## License
|
37
|
+
|
38
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/config/default.yml
ADDED
data/config/enabled.yml
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
AllCops:
|
2
|
+
# .ruby-version の指定と合わせるため指定しない
|
3
|
+
# TargetRubyVersion: ~
|
4
|
+
DisplayCopNames: true
|
5
|
+
DisplayStyleGuide: true
|
6
|
+
ExtraDetails: true
|
7
|
+
Exclude:
|
8
|
+
- 'tmp/**/*'
|
9
|
+
- 'db/schema.rb'
|
10
|
+
- 'node_modules/**/*'
|
11
|
+
|
12
|
+
Rails:
|
13
|
+
Enabled: true
|
14
|
+
|
15
|
+
Metrics/ClassLength:
|
16
|
+
CountComments: false
|
17
|
+
Max: 450
|
18
|
+
|
19
|
+
Metrics/ModuleLength:
|
20
|
+
CountComments: false
|
21
|
+
Max: 130
|
22
|
+
|
23
|
+
Metrics/LineLength:
|
24
|
+
Max: 250
|
25
|
+
AllowHeredoc: true
|
26
|
+
AllowURI: true
|
27
|
+
URISchemes:
|
28
|
+
- http
|
29
|
+
- https
|
30
|
+
|
31
|
+
Metrics/MethodLength:
|
32
|
+
Max: 130
|
33
|
+
|
34
|
+
Metrics/AbcSize:
|
35
|
+
Max: 50
|
36
|
+
|
37
|
+
# # 宗教の違いを許容する
|
38
|
+
# def some_method_with_parameters param1, param2
|
39
|
+
# # body omitted
|
40
|
+
# end
|
41
|
+
#
|
42
|
+
# def some_method_with_parameters(param1, param2)
|
43
|
+
# # body omitted
|
44
|
+
# end
|
45
|
+
Style/MethodDefParentheses:
|
46
|
+
Enabled: false
|
47
|
+
|
48
|
+
Style/AccessorMethodName:
|
49
|
+
Exclude:
|
50
|
+
# # action_args を使うため
|
51
|
+
# before_action :set_user
|
52
|
+
#
|
53
|
+
# def set_user(id)
|
54
|
+
# @user = User.find(id)
|
55
|
+
# end
|
56
|
+
- '*_controller.rb'
|
57
|
+
|
58
|
+
# 日本語コメントを許容する
|
59
|
+
Style/AsciiComments:
|
60
|
+
Enabled: false
|
61
|
+
|
62
|
+
Style/LambdaCall:
|
63
|
+
Exclude:
|
64
|
+
# # jbuilder の README の通りに書いても検出されるため
|
65
|
+
# json.(@message, :created_at, :updated_at)
|
66
|
+
- '**/*.jbuilder'
|
67
|
+
|
68
|
+
# # consistent
|
69
|
+
# hash = {
|
70
|
+
# key: :value
|
71
|
+
# }
|
72
|
+
# and_in_a_method_call({
|
73
|
+
# no: :difference
|
74
|
+
# })
|
75
|
+
Style/IndentHash:
|
76
|
+
EnforcedStyle: consistent
|
77
|
+
|
78
|
+
# ドキュメントの無い public クラスを許容する
|
79
|
+
Style/Documentation:
|
80
|
+
Enabled: false
|
data/config/todo.yml
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
# These are the cops before discussion in Forkwell team.
|
2
|
+
|
3
|
+
Lint/EnsureReturn:
|
4
|
+
Enabled: true
|
5
|
+
|
6
|
+
Lint/Eval:
|
7
|
+
Enabled: true
|
8
|
+
|
9
|
+
Metrics/CyclomaticComplexity:
|
10
|
+
Max: 12
|
11
|
+
|
12
|
+
Metrics/ParameterLists:
|
13
|
+
Max: 8
|
14
|
+
|
15
|
+
Metrics/PerceivedComplexity:
|
16
|
+
Max: 10
|
17
|
+
|
18
|
+
Rails/Date:
|
19
|
+
Enabled: true
|
20
|
+
|
21
|
+
Rails/FindEach:
|
22
|
+
Enabled: true
|
23
|
+
|
24
|
+
Rails/NotNullColumn:
|
25
|
+
Enabled: true
|
26
|
+
|
27
|
+
Rails/Output:
|
28
|
+
Enabled: true
|
29
|
+
|
30
|
+
Rails/OutputSafety:
|
31
|
+
Enabled: true
|
32
|
+
|
33
|
+
Rails/Validation:
|
34
|
+
Enabled: false
|
35
|
+
|
36
|
+
Style/Alias:
|
37
|
+
Enabled: true
|
38
|
+
|
39
|
+
Style/AlignHash:
|
40
|
+
Enabled: true
|
41
|
+
|
42
|
+
Style/AlignParameters:
|
43
|
+
Enabled: true
|
44
|
+
|
45
|
+
Style/BlockDelimiters:
|
46
|
+
Enabled: false
|
47
|
+
|
48
|
+
Style/BracesAroundHashParameters:
|
49
|
+
Enabled: false
|
50
|
+
|
51
|
+
Style/CaseEquality:
|
52
|
+
Enabled: true
|
53
|
+
|
54
|
+
Style/ClassAndModuleChildren:
|
55
|
+
Enabled: false
|
56
|
+
|
57
|
+
Style/ClassCheck:
|
58
|
+
Enabled: true
|
59
|
+
|
60
|
+
Style/ClassVars:
|
61
|
+
Enabled: true
|
62
|
+
|
63
|
+
Style/DoubleNegation:
|
64
|
+
Enabled: true
|
65
|
+
|
66
|
+
Style/FormatString:
|
67
|
+
Enabled: true
|
68
|
+
|
69
|
+
Style/HashSyntax:
|
70
|
+
Enabled: false
|
71
|
+
|
72
|
+
Style/IfInsideElse:
|
73
|
+
Enabled: true
|
74
|
+
|
75
|
+
Style/MultilineMethodCallIndentation:
|
76
|
+
Enabled: false
|
77
|
+
|
78
|
+
Style/PredicateName:
|
79
|
+
Enabled: true
|
80
|
+
|
81
|
+
Style/SafeNavigation:
|
82
|
+
Enabled: true
|
83
|
+
|
84
|
+
Style/SingleLineBlockParams:
|
85
|
+
Enabled: true
|
86
|
+
|
87
|
+
Style/VariableNumber:
|
88
|
+
Enabled: false
|
89
|
+
|
90
|
+
Style/GuardClause:
|
91
|
+
Enabled: false
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
# frozen_string_literal: true
|
3
|
+
lib = File.expand_path('../lib', __FILE__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'forkwell_cop/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = 'forkwell_cop'
|
9
|
+
spec.version = ForkwellCop::VERSION
|
10
|
+
spec.authors = ['grooves']
|
11
|
+
|
12
|
+
spec.summary = 'RuboCop configration in Forkwell'
|
13
|
+
spec.description = 'RuboCop configration in Forkwell'
|
14
|
+
spec.homepage = 'https://github.com/grooves/forkwell_cop'
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.require_paths = ['lib']
|
18
|
+
|
19
|
+
spec.add_dependency 'rubocop', '~> 0.43.0'
|
20
|
+
spec.add_development_dependency 'bundler', '~> 1.13'
|
21
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
22
|
+
end
|
data/lib/forkwell_cop.rb
ADDED
metadata
ADDED
@@ -0,0 +1,98 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: forkwell_cop
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- grooves
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-09-28 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rubocop
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.43.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.43.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.13'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.13'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
description: RuboCop configration in Forkwell
|
56
|
+
email:
|
57
|
+
executables: []
|
58
|
+
extensions: []
|
59
|
+
extra_rdoc_files: []
|
60
|
+
files:
|
61
|
+
- ".gitignore"
|
62
|
+
- ".rubocop.yml"
|
63
|
+
- ".ruby-version"
|
64
|
+
- ".travis.yml"
|
65
|
+
- Gemfile
|
66
|
+
- LICENSE.txt
|
67
|
+
- README.md
|
68
|
+
- Rakefile
|
69
|
+
- config/default.yml
|
70
|
+
- config/enabled.yml
|
71
|
+
- config/todo.yml
|
72
|
+
- forkwell_cop.gemspec
|
73
|
+
- lib/forkwell_cop.rb
|
74
|
+
- lib/forkwell_cop/version.rb
|
75
|
+
homepage: https://github.com/grooves/forkwell_cop
|
76
|
+
licenses: []
|
77
|
+
metadata: {}
|
78
|
+
post_install_message:
|
79
|
+
rdoc_options: []
|
80
|
+
require_paths:
|
81
|
+
- lib
|
82
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '0'
|
87
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
requirements: []
|
93
|
+
rubyforge_project:
|
94
|
+
rubygems_version: 2.6.6
|
95
|
+
signing_key:
|
96
|
+
specification_version: 4
|
97
|
+
summary: RuboCop configration in Forkwell
|
98
|
+
test_files: []
|