This repository has been archived by the owner on Apr 7, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 727bb83
Showing
14 changed files
with
292 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/.bundle/ | ||
/.yardoc | ||
/Gemfile.lock | ||
/_yardoc/ | ||
/coverage/ | ||
/doc/ | ||
/pkg/ | ||
/spec/reports/ | ||
/tmp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
inherit_gem: | ||
forkwell_cop: 'config/default.yml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2.3.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
sudo: false | ||
language: ruby | ||
before_install: gem install bundler -v 1.13.1 | ||
notifications: | ||
email: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# frozen_string_literal: true | ||
source 'https://rubygems.org' | ||
|
||
# Specify your gem's dependencies in forkwell_cop.gemspec | ||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2016 grooves | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# ForkwellCop | ||
|
||
[![Gem Version](https://badge.fury.io/rb/forkwell_cop.svg)](https://badge.fury.io/rb/forkwell_cop) | ||
[![Build Status](https://travis-ci.org/grooves/forkwell_cop.svg?branch=master)](https://travis-ci.org/grooves/forkwell_cop) | ||
|
||
RuboCop configration in [Forkwell](https://forkwell.com). Inspired by [onkcop](https://github.com/onk/onkcop). | ||
|
||
## Installation | ||
|
||
Add this line to your application's Gemfile: | ||
|
||
```ruby | ||
gem 'forkwell_cop', require: false | ||
``` | ||
|
||
## Usage | ||
|
||
Put this into your `.rubocop.yml`: | ||
|
||
```yml | ||
inherit_gem: | ||
forkwell_cop: | ||
- 'config/default.yml' | ||
``` | ||
|
||
And then execute: | ||
|
||
``` | ||
bundle exec rubocop | ||
``` | ||
|
||
## Contributing | ||
|
||
Bug reports and pull requests are welcome on GitHub at https://github.com/grooves/forkwell_cop. | ||
|
||
## License | ||
|
||
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# frozen_string_literal: true | ||
require 'bundler/gem_tasks' | ||
require 'rubocop/rake_task' | ||
|
||
RuboCop::RakeTask.new | ||
task default: :rubocop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
inherit_from: | ||
- enabled.yml | ||
- todo.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
AllCops: | ||
# .ruby-version の指定と合わせるため指定しない | ||
# TargetRubyVersion: ~ | ||
DisplayCopNames: true | ||
DisplayStyleGuide: true | ||
ExtraDetails: true | ||
Exclude: | ||
- 'tmp/**/*' | ||
- 'db/schema.rb' | ||
- 'node_modules/**/*' | ||
|
||
Rails: | ||
Enabled: true | ||
|
||
Metrics/ClassLength: | ||
CountComments: false | ||
Max: 450 | ||
|
||
Metrics/ModuleLength: | ||
CountComments: false | ||
Max: 130 | ||
|
||
Metrics/LineLength: | ||
Max: 250 | ||
AllowHeredoc: true | ||
AllowURI: true | ||
URISchemes: | ||
- http | ||
- https | ||
|
||
Metrics/MethodLength: | ||
Max: 130 | ||
|
||
Metrics/AbcSize: | ||
Max: 50 | ||
|
||
# # 宗教の違いを許容する | ||
# def some_method_with_parameters param1, param2 | ||
# # body omitted | ||
# end | ||
# | ||
# def some_method_with_parameters(param1, param2) | ||
# # body omitted | ||
# end | ||
Style/MethodDefParentheses: | ||
Enabled: false | ||
|
||
Style/AccessorMethodName: | ||
Exclude: | ||
# # action_args を使うため | ||
# before_action :set_user | ||
# | ||
# def set_user(id) | ||
# @user = User.find(id) | ||
# end | ||
- '*_controller.rb' | ||
|
||
# 日本語コメントを許容する | ||
Style/AsciiComments: | ||
Enabled: false | ||
|
||
Style/LambdaCall: | ||
Exclude: | ||
# # jbuilder の README の通りに書いても検出されるため | ||
# json.(@message, :created_at, :updated_at) | ||
- '**/*.jbuilder' | ||
|
||
# # consistent | ||
# hash = { | ||
# key: :value | ||
# } | ||
# and_in_a_method_call({ | ||
# no: :difference | ||
# }) | ||
Style/IndentHash: | ||
EnforcedStyle: consistent | ||
|
||
# ドキュメントの無い public クラスを許容する | ||
Style/Documentation: | ||
Enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# These are the cops before discussion in Forkwell team. | ||
|
||
Lint/EnsureReturn: | ||
Enabled: true | ||
|
||
Lint/Eval: | ||
Enabled: true | ||
|
||
Metrics/CyclomaticComplexity: | ||
Max: 12 | ||
|
||
Metrics/ParameterLists: | ||
Max: 8 | ||
|
||
Metrics/PerceivedComplexity: | ||
Max: 10 | ||
|
||
Rails/Date: | ||
Enabled: true | ||
|
||
Rails/FindEach: | ||
Enabled: true | ||
|
||
Rails/NotNullColumn: | ||
Enabled: true | ||
|
||
Rails/Output: | ||
Enabled: true | ||
|
||
Rails/OutputSafety: | ||
Enabled: true | ||
|
||
Rails/Validation: | ||
Enabled: false | ||
|
||
Style/Alias: | ||
Enabled: true | ||
|
||
Style/AlignHash: | ||
Enabled: true | ||
|
||
Style/AlignParameters: | ||
Enabled: true | ||
|
||
Style/BlockDelimiters: | ||
Enabled: false | ||
|
||
Style/BracesAroundHashParameters: | ||
Enabled: false | ||
|
||
Style/CaseEquality: | ||
Enabled: true | ||
|
||
Style/ClassAndModuleChildren: | ||
Enabled: false | ||
|
||
Style/ClassCheck: | ||
Enabled: true | ||
|
||
Style/ClassVars: | ||
Enabled: true | ||
|
||
Style/DoubleNegation: | ||
Enabled: true | ||
|
||
Style/FormatString: | ||
Enabled: true | ||
|
||
Style/HashSyntax: | ||
Enabled: false | ||
|
||
Style/IfInsideElse: | ||
Enabled: true | ||
|
||
Style/MultilineMethodCallIndentation: | ||
Enabled: false | ||
|
||
Style/PredicateName: | ||
Enabled: true | ||
|
||
Style/SafeNavigation: | ||
Enabled: true | ||
|
||
Style/SingleLineBlockParams: | ||
Enabled: true | ||
|
||
Style/VariableNumber: | ||
Enabled: false | ||
|
||
Style/GuardClause: | ||
Enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# coding: utf-8 | ||
# frozen_string_literal: true | ||
lib = File.expand_path('../lib', __FILE__) | ||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | ||
require 'forkwell_cop/version' | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = 'forkwell_cop' | ||
spec.version = ForkwellCop::VERSION | ||
spec.authors = ['grooves'] | ||
|
||
spec.summary = 'RuboCop configration in Forkwell' | ||
spec.description = 'RuboCop configration in Forkwell' | ||
spec.homepage = 'https://github.com/grooves/forkwell_cop' | ||
|
||
spec.files = `git ls-files -z`.split("\x0") | ||
spec.require_paths = ['lib'] | ||
|
||
spec.add_dependency 'rubocop', '~> 0.43.0' | ||
spec.add_development_dependency 'bundler', '~> 1.13' | ||
spec.add_development_dependency 'rake', '~> 10.0' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# frozen_string_literal: true | ||
require 'forkwell_cop/version' | ||
|
||
module ForkwellCop | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# frozen_string_literal: true | ||
module ForkwellCop | ||
VERSION = '0.1.0' | ||
end |