зеркало из
https://github.com/rs-pro/activeadmin-quill_editor.git
synced 2026-08-28 15:36:17 +03:00
Add Rubocop
Этот коммит содержится в:
1
.gitignore
поставляемый
1
.gitignore
поставляемый
@@ -2,6 +2,7 @@
|
||||
*.orig
|
||||
|
||||
/.rspec_failures
|
||||
/.rubocop-*
|
||||
/Gemfile.lock
|
||||
|
||||
/_misc/
|
||||
|
||||
74
.rubocop.yml
74
.rubocop.yml
@@ -1,73 +1,27 @@
|
||||
require:
|
||||
- rubocop-rspec
|
||||
|
||||
Rails:
|
||||
Enabled: true
|
||||
inherit_from:
|
||||
- https://relaxed.ruby.style/rubocop.yml
|
||||
|
||||
AllCops:
|
||||
TargetRubyVersion: 2.3.8
|
||||
TargetRailsVersion: 5.2
|
||||
Exclude:
|
||||
- db/schema.rb
|
||||
- bin/*
|
||||
- node_modules/**/*
|
||||
# Temporary files
|
||||
- tmp/**/*
|
||||
- spec/dummy/**/*
|
||||
NewCops: enable
|
||||
|
||||
Rails/InverseOf:
|
||||
Gemspec/RequiredRubyVersion:
|
||||
Enabled: false
|
||||
|
||||
Style/Documentation:
|
||||
Naming/FileName:
|
||||
Enabled: false
|
||||
|
||||
Metrics/ClassLength:
|
||||
# Default value is 100
|
||||
Max: 150
|
||||
|
||||
Metrics/LineLength:
|
||||
# Default is 80
|
||||
Layout/LineLength:
|
||||
Enabled: true
|
||||
Max: 120
|
||||
|
||||
Metrics/ModuleLength:
|
||||
# Default is 100
|
||||
Max: 150
|
||||
Style/HashEachMethods:
|
||||
Enabled: true
|
||||
|
||||
Metrics/ParameterLists:
|
||||
# Default is 5
|
||||
Max: 6
|
||||
Style/HashTransformKeys:
|
||||
Enabled: true
|
||||
|
||||
RSpec/ExampleLength:
|
||||
# Default is 10
|
||||
Max: 20
|
||||
|
||||
Style/FrozenStringLiteralComment:
|
||||
# Deface DOES edit strings in place
|
||||
Exclude:
|
||||
- 'app/overrides/**/*'
|
||||
|
||||
RSpec/MultipleExpectations:
|
||||
# Default is 3
|
||||
Max: 5
|
||||
|
||||
RSpec/NestedGroups:
|
||||
# Default is 3
|
||||
Max: 6
|
||||
|
||||
Metrics/AbcSize:
|
||||
Max: 25
|
||||
|
||||
Metrics/BlockLength:
|
||||
# This value double the rubocop default
|
||||
Max: 50
|
||||
|
||||
Metrics/CyclomaticComplexity:
|
||||
# This value double the rubocop default
|
||||
Max: 12
|
||||
|
||||
Metrics/MethodLength:
|
||||
# This value double the rubocop default
|
||||
Max: 20
|
||||
|
||||
Metrics/PerceivedComplexity:
|
||||
# Default is 7
|
||||
Max: 10
|
||||
Style/HashTransformValues:
|
||||
Enabled: true
|
||||
|
||||
2
Gemfile
2
Gemfile
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
source 'https://rubygems.org'
|
||||
|
||||
gemspec
|
||||
|
||||
@@ -25,6 +25,7 @@ Gem::Specification.new do |spec|
|
||||
spec.add_development_dependency 'puma', '~> 4.3.5'
|
||||
spec.add_development_dependency 'rspec_junit_formatter', '~> 0.4.1'
|
||||
spec.add_development_dependency 'rspec-rails', '~> 4.0.1'
|
||||
spec.add_development_dependency 'rubocop', '~> 0.90.0'
|
||||
spec.add_development_dependency 'selenium-webdriver', '~> 3.142.7'
|
||||
spec.add_development_dependency 'sqlite3', '~> 1.4.2'
|
||||
end
|
||||
|
||||
29
bin/rubocop
Исполняемый файл
29
bin/rubocop
Исполняемый файл
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
#
|
||||
# This file was generated by Bundler.
|
||||
#
|
||||
# The application 'rubocop' is installed as part of a gem, and
|
||||
# this file is here to facilitate running it.
|
||||
#
|
||||
|
||||
require "pathname"
|
||||
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
||||
Pathname.new(__FILE__).realpath)
|
||||
|
||||
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
||||
|
||||
if File.file?(bundle_binstub)
|
||||
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
||||
load(bundle_binstub)
|
||||
else
|
||||
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
||||
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
||||
end
|
||||
end
|
||||
|
||||
require "rubygems"
|
||||
require "bundler/setup"
|
||||
|
||||
load Gem.bin_path("rubocop", "rubocop")
|
||||
Ссылка в новой задаче
Block a user