Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,33 @@ inherit_gem:
rubocop-jekyll: .rubocop.yml

AllCops:
TargetRubyVersion: 2.4
TargetRubyVersion: 2.5
SuggestExtensions: false
Exclude:
- vendor/**/*

Layout/LineEndStringConcatenationIndentation:
Enabled: true

Lint/EmptyInPattern:
Enabled: false

Naming/InclusiveLanguage:
Enabled: false
Naming/MemoizedInstanceVariableName:
Exclude:
- 'lib/jekyll-redirect-from/page_without_a_file.rb'

Performance/MapCompact:
Enabled: true
Performance/RedundantEqualityComparisonBlock:
Enabled: true
Performance/RedundantSplitRegexpArgument:
Enabled: true

Style/InPatternThen:
Enabled: false
Style/MultilineInPatternThen:
Enabled: false
Style/QuotedSymbols:
Enabled: true
37 changes: 12 additions & 25 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,27 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2018-12-06 11:51:19 +0100 using RuboCop version 0.61.1.
# on 2021-09-17 12:49:45 UTC using RuboCop version 1.18.4.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 12
# Configuration parameters: CountComments, Max, ExcludedMethods.
# ExcludedMethods: refine
Metrics/BlockLength:
Exclude:
- 'spec/integrations_spec.rb'
- 'spec/jekyll_redirect_from/generator_spec.rb'
- 'spec/jekyll_redirect_from/redirect_page_spec.rb'
- 'spec/jekyll_redirect_from/redirectable_spec.rb'
- 'spec/spec_helper.rb'

# Offense count: 3
# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Layout/LineLength:
Exclude:
- 'spec/jekyll_redirect_from/generator_spec.rb'
- 'spec/jekyll_redirect_from/redirect_page_spec.rb'
Max: 105

# Offense count: 1
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
# SupportedStylesForLeadingUnderscores: disallowed, required, optional
Naming/MemoizedInstanceVariableName:
# Offense count: 2
# Configuration parameters: AllowedMethods.
# AllowedMethods: enums
Lint/ConstantDefinitionInBlock:
Exclude:
- 'lib/jekyll-redirect-from/page_without_a_file.rb'
- 'spec/jekyll_redirect_from/generator_spec.rb'

# Offense count: 2
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
# AllowedNames: io, id, to, by, on, in, at, ip, db
Naming/MethodParameterName:
# Configuration parameters: AllowComments, AllowEmptyLambdas.
Lint/EmptyBlock:
Exclude:
- 'lib/jekyll-redirect-from/redirect_page.rb'
- 'spec/jekyll_redirect_from/generator_spec.rb'
4 changes: 2 additions & 2 deletions jekyll-redirect-from.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r!^(test|spec|features)/!)
spec.require_paths = ["lib"]

spec.required_ruby_version = ">= 2.4.0"
spec.required_ruby_version = ">= 2.5.0"

spec.add_runtime_dependency "jekyll", ">= 3.3", "< 5.0"

spec.add_development_dependency "bundler"
spec.add_development_dependency "jekyll-sitemap", "~> 1.0"
spec.add_development_dependency "rake", "~> 12.0"
spec.add_development_dependency "rspec", "~> 3.5"
spec.add_development_dependency "rubocop-jekyll", "~> 0.10"
spec.add_development_dependency "rubocop-jekyll", "~> 0.12.0"
end
2 changes: 1 addition & 1 deletion script/fmt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -e

echo "Rubocop $(bundle exec rubocop --version)"
echo "RuboCop $(bundle exec rubocop --version)"
bundle exec rubocop -D -E $@
success=$?
if ((success != 0)); then
Expand Down