-
Notifications
You must be signed in to change notification settings - Fork 247
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
Issue #504: try merging invoca .rubocop.yml #508
Merged
ColinDKelley
merged 29 commits into
guard:master
from
Invoca:issue-504/try-merging-invoca-.rubocop.yml
Nov 27, 2020
Merged
Changes from 28 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
2307dcf
issue #504: bump robocop to v0.91.0 and update cop names to match
ColinDKelley 09b0b34
issue #504: try Invoca's .rubocop.yml; disable a few more cops that d…
ColinDKelley 89c7b77
issue #504: rubocop -a
ColinDKelley 55c3929
issue #504: rubocop -A
ColinDKelley 9573077
issue #504: in .hound.yml, pin rubocop to v0.91.0
ColinDKelley ab870f5
issue #504: stub warn instead of puts
ColinDKelley 870e8f0
issue #504: address many rubocop offenses
ColinDKelley a6b6b5d
issue #504: TargetRubyVersion: 2.7
ColinDKelley e9d888a
issue #504: spell out exception; # rubocop:disable Lint/RescueException
ColinDKelley a871455
issue #504: rubocop -a
ColinDKelley f6f144e
issue #504: merge in vendor/hound/config/style_guides/ruby.yml
ColinDKelley 395fdd5
issue #504: move . back to previous line
ColinDKelley e2b0066
issue #504: sort .rubocop.yml
ColinDKelley e422472
issue #504: shorten change_fs
ColinDKelley cfacb88
issue #504: drop some disabled cops; tune MethodLength to 15 with a f…
ColinDKelley 2da3b5e
issue #504: shorten long methods/disable MethodLength cop
ColinDKelley 12df4c4
issue #504: add method_defined?
ColinDKelley 7aa0320
issue #504: add inline rubocop:disable
ColinDKelley 2645262
issue #504: fix cop violations: respond_to_missing?; open
ColinDKelley 5860ed7
issue #504: add newer cops
ColinDKelley 46aa56a
issue #504: rubocop -a -A
ColinDKelley 5b6948b
issue #504: fix keyword arg
ColinDKelley cd980a7
issue #504: rubocop:disable Lint/MissingSuper
ColinDKelley c6fe53b
issue #504: remove early returns and private attr_readers
ColinDKelley ff8450d
issue #504: remove more early returns
ColinDKelley b2fbfaf
issue #504: fix stubbing to use @_remember_time_of_first_unprocessed_…
ColinDKelley 01cc75b
issue #504: fix *[] refactor bug
ColinDKelley 745d0e3
issue #504: indent if from left; add parens
ColinDKelley e1045d2
issue #504: set Layout/EndAlignment: EnforcedStyleAlignWith: variable…
ColinDKelley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
ruby: | ||
enabled: true | ||
version: 0.91.0 | ||
config_file: .rubocop.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 |
---|---|---|
@@ -1,19 +1,279 @@ | ||
inherit_from: | ||
- vendor/hound/config/style_guides/ruby.yml | ||
|
||
# Rails cops | ||
AllCops: | ||
RunRailsCops: false | ||
|
||
# Files you want to exclude | ||
AllCops: | ||
TargetRubyVersion: 2.3 | ||
TargetRubyVersion: 2.7 | ||
Exclude: | ||
- db/schema.rb | ||
- Gemfile | ||
- Guardfile | ||
- Rakefile | ||
- vendor/**/* | ||
UseCache: false | ||
|
||
# TODO: put your overrides here: | ||
Layout/AccessModifierIndentation: | ||
IndentationWidth: 2 | ||
Layout/BeginEndAlignment: | ||
Enabled: true | ||
Layout/DotPosition: | ||
Enabled: true | ||
EnforcedStyle: trailing | ||
Layout/EmptyLineAfterGuardClause: | ||
Enabled: false | ||
Layout/EmptyLinesAroundAttributeAccessor: | ||
Enabled: true | ||
Layout/HashAlignment: | ||
Enabled: false | ||
Layout/HeredocIndentation: | ||
Enabled: true | ||
Layout/MultilineMethodCallBraceLayout: | ||
Enabled: false | ||
Layout/MultilineMethodCallIndentation: | ||
EnforcedStyle: indented | ||
Layout/SpaceAroundMethodCallOperator: | ||
Enabled: true | ||
Layout/SpaceInsideBlockBraces: | ||
EnforcedStyleForEmptyBraces: space | ||
Lint/AmbiguousBlockAssociation: | ||
Enabled: false | ||
Lint/AmbiguousRegexpLiteral: | ||
Enabled: false | ||
Lint/AssignmentInCondition: | ||
Enabled: true | ||
AllowSafeAssignment: true | ||
Lint/BinaryOperatorWithIdenticalOperands: | ||
Enabled: true | ||
Lint/ConstantDefinitionInBlock: | ||
Enabled: true | ||
Exclude: | ||
- "**/*_spec.rb" | ||
Lint/DeprecatedOpenSSLConstant: | ||
Enabled: true | ||
Lint/DuplicateElsifCondition: | ||
Enabled: true | ||
Lint/DuplicateRequire: | ||
Enabled: true | ||
Lint/DuplicateRescueException: | ||
Enabled: true | ||
Lint/EmptyConditionalBody: | ||
Enabled: true | ||
Lint/EmptyFile: | ||
Enabled: true | ||
Lint/EmptyWhen: | ||
Enabled: false | ||
Lint/FloatComparison: | ||
Enabled: true | ||
Lint/IdentityComparison: | ||
Enabled: true | ||
Lint/LiteralInInterpolation: | ||
Enabled: false | ||
Lint/MissingSuper: | ||
Enabled: true | ||
Lint/MixedRegexpCaptureTypes: | ||
Enabled: false | ||
Lint/OutOfRangeRegexpRef: | ||
Enabled: true | ||
Lint/RaiseException: | ||
Enabled: true | ||
Lint/RedundantRequireStatement: | ||
Enabled: false | ||
Lint/SelfAssignment: | ||
Enabled: true | ||
Lint/StructNewOverride: | ||
Enabled: true | ||
Lint/SuppressedException: | ||
Enabled: false | ||
Lint/TopLevelReturnWithArgument: | ||
Enabled: true | ||
Lint/TrailingCommaInAttributeDeclaration: | ||
Enabled: true | ||
Lint/UnreachableLoop: | ||
Enabled: true | ||
Lint/UselessMethodDefinition: | ||
Enabled: true | ||
Lint/UselessTimes: | ||
Enabled: true | ||
Metrics/AbcSize: | ||
Enabled: false | ||
Metrics/BlockLength: | ||
Exclude: | ||
- Rakefile | ||
- "**/*.rake" | ||
- "**/*_test.rb" | ||
- "**/*_spec.rb" | ||
Metrics/CyclomaticComplexity: | ||
Max: 10 | ||
Metrics/LineLength: | ||
Max: 150 | ||
Metrics/MethodLength: | ||
Max: 15 | ||
Metrics/ModuleLength: | ||
CountComments: false | ||
Max: 200 | ||
Enabled: true | ||
Metrics/ParameterLists: | ||
Enabled: true | ||
Max: 6 | ||
Metrics/PerceivedComplexity: | ||
Max: 10 | ||
Naming/AccessorMethodName: | ||
Enabled: false | ||
Naming/FileName: | ||
Enabled: false | ||
Exclude: [] | ||
Naming/HeredocDelimiterNaming: | ||
Enabled: false | ||
Naming/PredicateName: | ||
Enabled: true | ||
NamePrefix: | ||
- is_ | ||
- has_ | ||
- have_ | ||
ForbiddenPrefixes: | ||
- is_ | ||
Exclude: | ||
- spec/**/* | ||
Naming/RescuedExceptionsVariableName: | ||
Enabled: false | ||
Naming/VariableNumber: | ||
Enabled: false | ||
Style/AccessorGrouping: | ||
Enabled: true | ||
Style/Alias: | ||
Enabled: false | ||
Style/AndOr: | ||
EnforcedStyle: conditionals | ||
Style/ArrayCoercion: | ||
Enabled: true | ||
Style/BisectedAttrAccessor: | ||
Enabled: true | ||
Style/CaseLikeIf: | ||
Enabled: true | ||
Style/ClassAndModuleChildren: | ||
Enabled: true | ||
Style/CollectionMethods: | ||
Enabled: true | ||
PreferredMethods: | ||
collect: map | ||
collect!: map! | ||
inject: reduce | ||
detect: find | ||
find_all: select | ||
length: size | ||
Style/CombinableLoops: | ||
Enabled: true | ||
Style/CommentedKeyword: | ||
Enabled: false | ||
Style/Documentation: | ||
Enabled: false | ||
Style/DoubleNegation: | ||
Enabled: false | ||
Style/EachWithObject: | ||
Enabled: false | ||
Style/EmptyMethod: | ||
Enabled: false | ||
Style/ExplicitBlockArgument: | ||
Enabled: true | ||
Style/ExponentialNotation: | ||
Enabled: true | ||
Style/FormatStringToken: | ||
Enabled: false | ||
Style/GlobalStdStream: | ||
Enabled: false | ||
Style/GuardClause: | ||
Enabled: false | ||
Style/HashAsLastArrayItem: | ||
Enabled: true | ||
Style/HashEachMethods: | ||
Enabled: true | ||
Style/HashLikeCase: | ||
Enabled: true | ||
Style/HashSyntax: | ||
EnforcedStyle: ruby19_no_mixed_keys | ||
Style/HashTransformKeys: | ||
Enabled: true | ||
Style/HashTransformValues: | ||
Enabled: true | ||
Style/IfUnlessModifier: | ||
Enabled: false | ||
Style/InlineComment: | ||
Enabled: false | ||
Style/KeywordParametersOrder: | ||
Enabled: true | ||
Style/Lambda: | ||
Enabled: false | ||
Style/ModuleFunction: | ||
Enabled: false | ||
Style/NegatedIf: | ||
Enabled: false | ||
Style/Next: | ||
Enabled: false | ||
Style/NumericLiteralPrefix: | ||
Enabled: false | ||
Style/NumericLiterals: | ||
MinDigits: 9 | ||
Style/NumericPredicate: | ||
Enabled: false | ||
Style/OneLineConditional: | ||
Enabled: false | ||
Style/OptionalBooleanParameter: | ||
Enabled: true | ||
Style/ParallelAssignment: | ||
Enabled: false | ||
Style/PercentLiteralDelimiters: | ||
Enabled: false | ||
Style/PreferredHashMethods: | ||
Enabled: false | ||
Style/RaiseArgs: | ||
Enabled: false | ||
EnforcedStyle: exploded | ||
Style/RedundantAssignment: | ||
Enabled: true | ||
Style/RedundantFetchBlock: | ||
Enabled: true | ||
Style/RedundantFileExtensionInRequire: | ||
Enabled: true | ||
Style/RedundantRegexpCharacterClass: | ||
Enabled: true | ||
Style/RedundantRegexpEscape: | ||
Enabled: true | ||
Style/RedundantSelfAssignment: | ||
Enabled: true | ||
Style/RegexpLiteral: | ||
Enabled: false | ||
Style/RescueStandardError: | ||
Enabled: false | ||
Style/Send: | ||
Enabled: false | ||
Style/SignalException: | ||
Enabled: false | ||
Style/SingleArgumentDig: | ||
Enabled: true | ||
Style/SingleLineBlockParams: | ||
Enabled: false | ||
Style/SingleLineMethods: | ||
Enabled: false | ||
AllowIfMethodIsEmpty: true | ||
Style/SlicingWithRange: | ||
Enabled: true | ||
Style/SoleNestedConditional: | ||
Enabled: true | ||
Style/StringConcatenation: | ||
Enabled: true | ||
Style/StringLiterals: | ||
Enabled: false | ||
Style/StringLiteralsInInterpolation: | ||
Enabled: true | ||
EnforcedStyle: single_quotes | ||
Style/SymbolArray: | ||
Enabled: false | ||
Style/TrailingCommaInArguments: | ||
Enabled: false | ||
Style/TrailingCommaInArrayLiteral: | ||
Enabled: false | ||
Style/TrailingCommaInHashLiteral: | ||
Enabled: false | ||
Style/TrailingUnderscoreVariable: | ||
Enabled: false | ||
Style/VariableInterpolation: | ||
Enabled: false | ||
Style/WhenThen: | ||
Enabled: false | ||
Style/WordArray: | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
#!/usr/bin/env ruby | ||
# frozen_string_literal: true | ||
|
||
require 'listen' | ||
require 'listen/cli' | ||
|
||
unless defined?(JRUBY_VERSION) | ||
if Signal.list.keys.include?('INT') | ||
Signal.trap('INT') { Thread.new { Listen.stop } } | ||
end | ||
if !defined?(JRUBY_VERSION) && Signal.list.keys.include?('INT') | ||
Signal.trap('INT') { Thread.new { Listen.stop } } | ||
end | ||
|
||
Listen::CLI.start |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We can update to
1.2.0
, I think there will be not much changes as I have checked in my local machine.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.
Currently, the highest supported by hound is 0.91.0.
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.
We can use something else than hound in that case? Github actions like lint-action.
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.
@KapilSachdev That sounds reasonable. So that we don't bog this Issue down, can you file a separate issue for that?
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.
The time i commented about
lint-action
, i was unaware of one issue that they have i.e. annotations don't work when PR is created from a fork. Which is where most PRs come from. Though there is a newpull_request_target
event for that, but it still isn't working (from what i had tried).shoulda-matcher
gem also recently reverted fromlint-action
(which initially uses hound) and has fallen back to non-annotation basedrubocop
linting (like what rails uses).I will create a issue for
rubocop
linting based on github actions.