Skip to content
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

Setup Rubocop #1537

Merged
merged 67 commits into from
Jul 31, 2022
Merged
Changes from 1 commit
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
2a7907e
Initialize rubocop
304 May 5, 2019
d67131a
Style/StringLiterals: prefer single quotes
304 May 5, 2019
954eab7
Style/AndOr: use `&&` and `||`, instead of `and` and `or`
304 May 5, 2019
eb97eea
Style/HashSyntax: use new hash syntax
304 May 5, 2019
cf7075c
Layout/EmptyLineAfterGuardClause: add empty lines after guard clause
304 May 5, 2019
4b43650
Style/SingleLineMethods: temporary disable
304 May 5, 2019
1db9891
Style/Proc: prefer `proc` vs `Proc.new`
304 May 5, 2019
99fdaee
Disable Lint/AmbiguousBlockAssociation
304 May 5, 2019
58dd6c6
Disable Style/CaseEquality
304 May 5, 2019
1b4cc87
Lint/UnusedBlockArgument: put underscore in front of it
304 May 5, 2019
ae150c7
Style/Alias: prefer alias vs alias_method in a class body
304 May 5, 2019
eea68bb
Layout/EmptyLineBetweenDefs: add empty lines between defs
304 May 5, 2019
a90f8ee
Style/ParallelAssignment: don't use parallel assigment
304 May 5, 2019
44b1c4e
Style/RegexpLiteral: prefer %r for regular expressions
304 May 5, 2019
0f54bab
Naming/UncommunicativeMethodParamName: fix abbrevs
304 May 5, 2019
653de37
Style/PerlBackrefs: disable cop
304 May 5, 2019
75fdfc3
Layout/SpaceAfterComma: add missing spaces
304 May 5, 2019
89b6b2d
Style/Documentation: disable cop
304 May 5, 2019
6d3bb45
Style/FrozenStringLiteralComment: add frozen_string_literal
304 May 5, 2019
2215bd9
Layout/AlignHash: align hash
304 May 5, 2019
a6fd7c6
Layout/ExtraSpacing: allow for alignment
304 May 5, 2019
ad23bb2
Layout/SpaceAroundOperators: add missing spaces
304 May 5, 2019
42e3995
Style/Not: prefer `!` instead of `not`
304 May 5, 2019
9edd5be
Style/GuardClause: add guard conditions
304 May 5, 2019
00cc7bb
Style/MutableConstant: freeze contants
304 May 5, 2019
52a1fde
Lint/IneffectiveAccessModifier: disable cop
304 May 5, 2019
235eab4
Lint/RescueException: disable cop
304 May 5, 2019
36bbb32
Style/SpecialGlobalVars: disable cop
304 May 5, 2019
55fd397
Layout/DotPosition: fix position of dot for multiline method chains
304 May 5, 2019
9932d87
Layout/SpaceInsideArrayLiteralBrackets: don't use spaces inside arrays
304 May 5, 2019
aba5c15
Layout/SpaceInsideBlockBraces: add space for blocks
304 May 5, 2019
8b41f2e
Layout/SpaceInsideHashLiteralBraces: add spaces for hashes
304 May 5, 2019
a1e2e4b
Style/FormatString: use format string syntax
304 May 5, 2019
a30412b
Style/StderrPuts: `warn` is preferable to `$stderr.puts`
304 May 5, 2019
7a1f6c7
Bundler/DuplicatedGem: disable cop
304 May 5, 2019
794a9ef
Layout/AlignArray: fix warning
304 May 5, 2019
3d15cc5
Lint/AssignmentInCondition: remove assignments from conditions
304 May 5, 2019
b960e1e
Layout/IndentHeredoc: disable cop
304 May 5, 2019
302f6dd
Layout/SpaceInsideParens: remove extra spaces
304 May 5, 2019
b5f97c6
Lint/UnusedMethodArgument: put underscore in front of unused arg
304 May 5, 2019
f4a7e8e
Naming/RescuedExceptionsVariableName: use `e` for exceptions
304 May 5, 2019
6d64740
Style/CommentedKeyword: put comments before the method
304 May 5, 2019
de2bc4f
Style/FormatStringToken: disable cop
304 May 5, 2019
06a1a18
Style/MultilineIfModifier: move condition before the method
304 May 5, 2019
ba5beb0
Style/SignalException: prefer `raise` to `fail`
304 May 5, 2019
e2202bc
Style/SymbolArray: prefer %i for array of symbols
304 May 5, 2019
8836aab
Gemspec/OrderedDependencies: Use alphabetical order for dependencies
304 May 5, 2019
766d021
Lint/UselessAccessModifier: disable cop
304 May 5, 2019
63b91e2
Naming/HeredocDelimiterNaming: change delimiter's name
304 May 5, 2019
de9d130
Style/ClassCheck: prefer `is_a?` to `kind_of?`
304 May 5, 2019
0df8bac
Style/ClassVars: disable cop
304 May 5, 2019
84e58a7
Style/Encoding: remove coding comment
304 May 5, 2019
1358252
Style/RedundantParentheses: remove extra parentheses
304 May 5, 2019
c53cca0
Style/StringLiteralsInInterpolation: prefer singl quotes
304 May 5, 2019
080aff5
Layout/AlignArguments: fix alignment
304 May 5, 2019
b07feca
Layout/ClosingHeredocIndentation: align heredoc
304 May 5, 2019
eaa850a
Layout/EmptyLineAfterMagicComment: add empty line
304 May 5, 2019
cf8f2c5
Set RubyVersion for rubocop
304 May 5, 2019
4a74b07
Lint/UselessAssignment: disable cop
304 May 5, 2019
c429d84
Style/EmptyLiteral: disable cop
304 May 5, 2019
ee1dbcd
Minor code-style fixes with --safe-auto-correct option
304 May 5, 2019
aae8e46
Disable the rest of the cops that cause warnings
304 May 5, 2019
56680da
Add rubocop check to the default Rake task
304 May 5, 2019
faed6e4
Update to rubocop 1.32.0
jkowens Jul 28, 2022
586ea3a
Rubocop updates for rack-protection and sinatra-contrib
jkowens Jul 29, 2022
d21a76e
Disable Style/SlicingWithRange cop
jkowens Jul 29, 2022
bba6346
Make suggested updates
jkowens Jul 31, 2022
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
Prev Previous commit
Next Next commit
Disable the rest of the cops that cause warnings
It would be easier to re-enable them in separate PRs
  • Loading branch information
304 authored and jkowens committed Jul 28, 2022
commit aae8e4604e2eaecfb3916162dc6bcab7120d6b37
70 changes: 65 additions & 5 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ AllCops:
- 'rack-protection/**/*'
- 'sinatra-contrib/**/*'

# Temporary allow single line methods
Layout/ExtraSpacing:
AllowForAlignment: true
AllowBeforeTrailingComments: true

# Temporary disable cops because warnings are fixed
Style/SingleLineMethods:
Enabled: false

Expand All @@ -31,10 +35,6 @@ Style/PerlBackrefs:
Style/Documentation:
Enabled: false

Layout/ExtraSpacing:
AllowForAlignment: true
AllowBeforeTrailingComments: true

Lint/IneffectiveAccessModifier:
Enabled: false

Expand Down Expand Up @@ -64,3 +64,63 @@ Lint/UselessAssignment:

Style/EmptyLiteral:
Enabled: false

Metrics/LineLength:
Enabled: false

Metrics/MethodLength:
Enabled: false

Metrics/AbcSize:
Enabled: false

Metrics/CyclomaticComplexity:
Enabled: false

Metrics/PerceivedComplexity:
Enabled: false

Lint/HandleExceptions:
Enabled: false

Metrics/ClassLength:
Enabled: false

Metrics/BlockLength:
Enabled: false

Metrics/ModuleLength:
Enabled: false

Lint/AmbiguousRegexpLiteral:
Enabled: false

Style/AccessModifierDeclarations:
Enabled: false

Style/ClassAndModuleChildren:
Enabled: false

Style/EvalWithLocation:
Enabled: false

Style/MethodMissingSuper:
Enabled: false

Style/MissingRespondToMissing:
Enabled: false

Style/MixinUsage:
Enabled: false

Style/MultilineTernaryOperator:
Enabled: false

Style/StructInheritance:
Enabled: false

Style/SymbolProc:
Enabled: false

Style/IfUnlessModifier:
Enabled: false