forked from glebm/i18n-tasks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Add rubocop to dev dependencies. 2. Fix most errors. 3. Add .rubocop.yml for the rest.
- Loading branch information
Showing
98 changed files
with
1,253 additions
and
1,118 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 @@ | ||
-D |
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,54 @@ | ||
AllCops: | ||
TargetRubyVersion: 2.3 | ||
Exclude: | ||
- 'tmp/**/*' | ||
- 'spec/fixtures/**/*' | ||
|
||
Metrics/AbcSize: | ||
Max: 28 | ||
|
||
Metrics/ClassLength: | ||
Max: 125 | ||
Exclude: | ||
- 'lib/i18n/tasks/cli.rb' | ||
|
||
Metrics/CyclomaticComplexity: | ||
Max: 10 | ||
|
||
Metrics/BlockLength: | ||
Max: 30 | ||
|
||
Metrics/LineLength: | ||
Max: 120 | ||
|
||
Metrics/MethodLength: | ||
Max: 25 | ||
|
||
Metrics/PerceivedComplexity: | ||
Max: 9 | ||
|
||
Style/Documentation: | ||
Enabled: false | ||
|
||
Style/ClassAndModuleChildren: | ||
Enabled: false | ||
|
||
Style/GuardClause: | ||
Enabled: false | ||
|
||
Style/MultilineBlockChain: | ||
Enabled: false | ||
|
||
Style/SafeNavigation: | ||
# TODO(glebm): Remove this when we update the minimum Ruby version to 2.3+. | ||
Enabled: false | ||
|
||
Style/SpecialGlobalVars: | ||
Enabled: false | ||
|
||
Style/SignalException: | ||
EnforcedStyle: semantic | ||
|
||
|
||
Style/SingleLineBlockParams: | ||
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
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
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
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 |
---|---|---|
@@ -1,14 +1,15 @@ | ||
# frozen_string_literal: true | ||
lib = File.expand_path('../lib', __FILE__) | ||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | ||
require 'i18n/tasks/version' | ||
|
||
Gem::Specification.new do |s| | ||
Gem::Specification.new do |s| # rubocop:disable Metrics/BlockLength | ||
s.name = 'i18n-tasks' | ||
s.version = I18n::Tasks::VERSION | ||
s.authors = ['glebm'] | ||
s.email = ['[email protected]'] | ||
s.license = 'MIT' | ||
s.summary = %q{Manage localization and translation with the awesome power of static analysis} | ||
s.summary = 'Manage localization and translation with the awesome power of static analysis' | ||
s.description = <<-TEXT | ||
i18n-tasks helps you find and manage missing and unused translations. | ||
|
@@ -21,16 +22,14 @@ cp $(i18n-tasks gem-path)/templates/config/i18n-tasks.yml config/ | |
# Add an RSpec for missing and unused keys: | ||
cp $(i18n-tasks gem-path)/templates/rspec/i18n_spec.rb spec/ | ||
TEXT | ||
s.homepage = 'https://github.com/glebm/i18n-tasks' | ||
s.homepage = 'https://github.com/glebm/i18n-tasks' | ||
if s.respond_to?(:metadata=) | ||
s.metadata = { 'issue_tracker' => 'https://github.com/glebm/i18n-tasks' } | ||
end | ||
if s.respond_to?(:required_ruby_version=) | ||
s.required_ruby_version = '~> 2.1' | ||
end | ||
s.required_ruby_version = '~> 2.1' if s.respond_to?(:required_ruby_version=) | ||
|
||
s.files = `git ls-files`.split($/) | ||
s.files -= s.files.grep(%r{^(doc/|\.|spec/)}) + %w(CHANGES.md config/i18n-tasks.yml Gemfile) | ||
s.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR) | ||
s.files -= s.files.grep(%r{^(doc/|\.|spec/)}) + %w(CHANGES.md config/i18n-tasks.yml Gemfile) | ||
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) } - %w(i18n-tasks.cmd) | ||
s.test_files = s.files.grep(%r{^(test|spec|features)/}) | ||
s.require_paths = ['lib'] | ||
|
@@ -48,5 +47,6 @@ TEXT | |
s.add_development_dependency 'bundler', '~> 1.3' | ||
s.add_development_dependency 'rake' | ||
s.add_development_dependency 'rspec', '~> 3.3' | ||
s.add_development_dependency 'rubocop' | ||
s.add_development_dependency 'yard' | ||
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
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
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
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
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
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
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
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
Oops, something went wrong.