New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump rubocop to use v0.50.x
#6368
Changes from all commits
b16ec49
deae2c7
076c9b8
6e77120
e57c09e
36178e9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ Layout/EmptyLinesAroundAccessModifier: | |
Layout/EmptyLinesAroundModuleBody: | ||
Enabled: false | ||
Layout/EndOfLine: | ||
EnforcedStyle: lf | ||
EnforcedStyle: native | ||
Layout/ExtraSpacing: | ||
AllowForAlignment: true | ||
Layout/FirstParameterIndentation: | ||
|
@@ -44,10 +44,14 @@ Layout/SpaceInsideBrackets: | |
Enabled: false | ||
Lint/EndAlignment: | ||
Severity: error | ||
Lint/RescueWithoutErrorClass: | ||
Enabled: false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oooo we should enable this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wasn't sure about it though, since unnamed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, but it's always better to rescue explicitly what you want to rescue instead of everything. We can do this in a subsequent pass. |
||
Lint/UnreachableCode: | ||
Severity: error | ||
Lint/UselessAccessModifier: | ||
Enabled: false | ||
Lint/Void: | ||
Enabled: false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What even is this? 😂 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This cop checks for the use of a return with a value in a context where it will be ignored. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh we must return some value and it doesn't like that! We can enable it in a subsequent pass. |
||
Metrics/AbcSize: | ||
Max: 21 | ||
Metrics/BlockLength: | ||
|
@@ -82,6 +86,10 @@ Metrics/ParameterLists: | |
Max: 4 | ||
Metrics/PerceivedComplexity: | ||
Max: 8 | ||
Naming/FileName: | ||
Enabled: false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What fails for this one? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From their docs,
and flags us for the following: which IMO is a bug because this cop existed as an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah... that looks like a bug. Weird. |
||
Naming/HeredocDelimiterNaming: | ||
Enabled: false | ||
Security/MarshalLoad: | ||
Exclude: | ||
- !ruby/regexp /test\/.*.rb$/ | ||
|
@@ -109,8 +117,8 @@ Style/Documentation: | |
- !ruby/regexp /features\/.*.rb$/ | ||
Style/DoubleNegation: | ||
Enabled: false | ||
Style/FileName: | ||
Enabled: false | ||
Style/Encoding: | ||
EnforcedStyle: when_needed | ||
Style/GuardClause: | ||
Enabled: false | ||
Style/HashSyntax: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# coding: utf-8 | ||
# frozen_string_literal: true | ||
|
||
lib = File.expand_path("lib", __dir__) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,7 +86,7 @@ def fsnotify_buggy?(_site) | |
def urls_only_differ_by_case(site) | ||
urls_only_differ_by_case = false | ||
urls = case_insensitive_urls(site.pages + site.docs_to_write, site.dest) | ||
urls.each do |_case_insensitive_url, real_urls| | ||
urls.each_value do |real_urls| | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cool! |
||
next unless real_urls.uniq.size > 1 | ||
urls_only_differ_by_case = true | ||
Jekyll.logger.warn "Warning:", "The following URLs only differ" \ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: UTF-8 | ||
# frozen_string_literal: true | ||
|
||
module Jekyll | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,12 +42,14 @@ def convert(content) | |
end | ||
|
||
private | ||
# rubocop:disable Performance/HashEachMethods | ||
def make_accessible(hash = @config) | ||
hash.keys.each do |key| | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we use each_key here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
hash[key.to_sym] = hash[key] | ||
make_accessible(hash[key]) if hash[key].is_a?(Hash) | ||
end | ||
end | ||
# rubocop:enable Performance/HashEachMethods | ||
|
||
# config[kramdown][syntax_higlighter] > | ||
# config[kramdown][enable_coderay] > | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: UTF-8 | ||
# frozen_string_literal: true | ||
|
||
require "set" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: UTF-8 | ||
# frozen_string_literal: true | ||
|
||
module Jekyll | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: UTF-8 | ||
# frozen_string_literal: true | ||
|
||
module Jekyll | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: UTF-8 | ||
# frozen_string_literal: true | ||
|
||
module Jekyll | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: UTF-8 | ||
# frozen_string_literal: true | ||
|
||
module Jekyll | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: UTF-8 | ||
# frozen_string_literal: true | ||
|
||
module Jekyll | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: UTF-8 | ||
# frozen_string_literal: true | ||
|
||
module Jekyll | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: UTF-8 | ||
# frozen_string_literal: true | ||
|
||
module Jekyll | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: UTF-8 | ||
# frozen_string_literal: true | ||
|
||
module Jekyll | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: UTF-8 | ||
# frozen_string_literal: true | ||
|
||
module Jekyll | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: UTF-8 | ||
# frozen_string_literal: true | ||
|
||
module Jekyll | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# encoding: utf-8 | ||
# frozen_string_literal: true | ||
|
||
require "helper" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done we want lf here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically, we do.. but if a developer on Windows were to run
script/fmt
they'd unnecessarily get taxed by Rubocop. In my own experience, it has been irritating..A properly configured Git on Windows automatically indexes files compatible for cross-platform use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍