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

Rebase rubocop branch #1156

Closed
wants to merge 54 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
3afbd8b
Add rubocop
Evan-M Mar 23, 2018
ee29d0a
Exclude some paths from rubocop analysis, at least for now.
Evan-M Mar 23, 2018
4557afd
Adding `.erb` extension to template.
Evan-M Mar 23, 2018
7419927
Fix `Layout/EmptyLines`
Evan-M Mar 24, 2018
c23c759
Fix `Style/StringLiterals`
Evan-M Mar 24, 2018
ab89dba
Move `Style/FrozenStringLiteralComment` from todos to main config.
Evan-M Mar 24, 2018
bfc0ede
Move `Style/ClassAndModuleChildren` from todos to main config.
Evan-M Mar 24, 2018
deb1be2
Fix `Style/HashSyntax`
Evan-M Mar 24, 2018
022e832
Fix `Style/SymbolArray`
Evan-M Mar 24, 2018
88b9e47
Update `Style/Documentation` todo to specify files with Cop violations.
Evan-M Mar 24, 2018
00672ad
Update offense counts in rubocop todo list.
Evan-M Mar 24, 2018
3edb53b
Fix Style/PreferredHashMethods
dks17 Mar 25, 2018
7e3dffc
Fix Style/NegatedIf
dks17 Mar 25, 2018
185245f
Fix Layout/SpaceInsideHashLiteralBraces
dks17 Mar 25, 2018
7c0bd98
Fix Layout/SpaceInsideStringInterpolation
dks17 Mar 25, 2018
e055c89
Fix Layout/CommentIndentation
dks17 Mar 25, 2018
7418df4
Update `parser` gem.
Evan-M Mar 26, 2018
1035908
Fix Style/TrailingCommaInHashLiteral
dks17 Mar 25, 2018
2c4cd08
Update rubocop todo list and exclusions.
Evan-M Mar 27, 2018
1afb2b2
Partially (mostly) fix Metrics/BlockLength.
Evan-M Mar 29, 2018
e4a4c7b
Fix Style/ExpandPathArguments
Evan-M Mar 29, 2018
67cff72
Fix Layout/IndentHash
Evan-M Mar 29, 2018
be62644
Fix Layout/SpaceInsideBlockBraces
Evan-M Mar 29, 2018
98f6b03
Fix Layout/EmptyLinesAroundClassBody
Evan-M Mar 29, 2018
0250c27
Fix Layout/SpaceAroundEqualsInParameterDefault
Evan-M Mar 29, 2018
db7dcf0
Fix Style/BracesAroundHashParameters
Evan-M Mar 29, 2018
c3d093e
Fix Layout/AlignParameters
Evan-M Mar 30, 2018
408d6c9
Fix Style/WordArray
Evan-M Mar 30, 2018
06ca1be
Fix Style/BlockDelimiters
Evan-M Mar 30, 2018
4b30adb
Fix Style/IfUnlessModifier
Evan-M Mar 30, 2018
6b55414
Fix Style/PercentLiteralDelimiters
Evan-M Mar 30, 2018
740c970
Fix Style/MutableConstant
Evan-M Mar 30, 2018
323a438
Fix Style/AndOr
Evan-M Mar 30, 2018
cbb6def
Fix Style/RedundantSelf
Evan-M Mar 30, 2018
c6b2fda
Fix Style/RaiseArgs
Evan-M Mar 30, 2018
f980353
Fix Style/LineEndConcatenation
Evan-M Mar 30, 2018
bb57a6a
Fix Layout/BlockAlignment
dks17 Apr 2, 2018
ede2ff9
Fix Style/UnneededInterpolation
dks17 Apr 2, 2018
5aaccab
Fix Style/UnlessElse
dks17 Apr 2, 2018
7f77c34
Fix Style/RedundantReturn
dks17 Apr 2, 2018
c470e2b
Partially fix Metrics/LineLength.
Evan-M Mar 28, 2018
424bef0
Update rubocop todo list.
Evan-M Apr 10, 2018
a35e4c7
Fix Layout/MultilineOperationIndentation.
Evan-M Apr 10, 2018
1e3b2ff
Update Layout/MultilineMethodCallIndentation to enforce `indents_rela…
Evan-M Apr 10, 2018
08652f8
Setup appraisal for Rails 4.2
krzysiek1507 Apr 4, 2018
e534e0d
Polyfill Rails 5 versioned migrations
krzysiek1507 Apr 5, 2018
24b9208
Fallback http helpers for Rails 4 in tests
krzysiek1507 Apr 11, 2018
b982db4
Fix tests on Rails 4
krzysiek1507 Apr 11, 2018
6f41e18
rebase
dks17 Apr 27, 2018
a2a67f0
update rubocop
dks17 Apr 27, 2018
5c96cb8
update todo list
dks17 Apr 27, 2018
61c582b
Fix Style/StringLiterals
dks17 Apr 27, 2018
8f46f25
Fix wrong resolves of conflict
dks17 Apr 27, 2018
4be88a1
Add rubocop gem into rails_version_gemfiles
dks17 Apr 27, 2018
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
130 changes: 130 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
inherit_from: .rubocop_todo.yml

AllCops:
Exclude:
- 'coverage/**/*'
- 'test/dummy/tmp/**/*'
- 'test/dummy/log/**/*'

# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: aligned, indented, indented_relative_to_receiver
#
# Description from Rubocop Manual:
# This cop checks the indentation of the method name part in method calls
# that span more than one line.
#
# https://rubocop.readthedocs.io/en/latest/cops_layout/#layoutmultilinemethodcallindentation
Layout/MultilineMethodCallIndentation:
Enabled: true
EnforcedStyle: indented_relative_to_receiver

# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods.
# SupportedStyles: line_count_based, semantic, braces_for_chaining
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
# FunctionalMethods: let, let!, subject, watch
# IgnoredMethods: lambda, proc, it
Style/BlockDelimiters:
IgnoredMethods:
- assert_output
- assert_raises
- assert_silent
- assert_throws
- refute_output
- refute_raises
- refute_silent
- refute_throws

# Offense count: 130
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: when_needed, always, never
#
# Description from Rubocop Manual:
# This cop is designed to help upgrade to Ruby 3.0. It will add the comment
# `# frozen_string_literal: true` to the top of files to enable frozen string
# literals. Frozen string literals may be default in Ruby 3.0. The comment
# will be added below a shebang and encoding comment. The frozen string
# literal comment is only valid in Ruby 2.3+.
#
# https://rubocop.readthedocs.io/en/latest/cops_style/#stylefrozenstringliteralcomment
Style/FrozenStringLiteralComment:
Enabled: false

# Offense count: 34
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, EnforcedStyle.
# SupportedStyles: nested, compact
#
# Description from Rubocop Manual:
# https://rubocop.readthedocs.io/en/latest/cops_style/#styleclassandmodulechildren
Style/ClassAndModuleChildren:
Enabled: false

# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues,
# PreferHashRocketsForNonAlnumEndingSymbols.
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
#
# Description from Rubocop Manual:
# This cop checks hash literal syntax
#
# https://rubocop.readthedocs.io/en/latest/cops_style/#stylehashsyntax
Style/HashSyntax:
Enabled: true
EnforcedStyle: ruby19

# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, MinSize.
# SupportedStyles: percent, brackets
#
# Description from Rubocop Manual:
# Check for array literals made up of symbols that are not using
# the `%i()` syntax.
#
# https://rubocop.readthedocs.io/en/latest/cops_style/#stylesymbolarray
Style/SymbolArray:
Enabled: true
EnforcedStyle: percent
MinSize: 3

# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, MinSize, WordRegex.
# SupportedStyles: percent, brackets
Style/WordArray:
Enabled: true
EnforcedStyle: percent
MinSize: 3

# Configuration parameters: CountComments, ExcludedMethods.
Metrics/BlockLength:
inherit_mode:
merge:
- Exclude
- ExcludedMethod
Exclude:
- 'lib/devise_token_auth/engine.rb'
- 'test/dummy/config/**/*'
- 'test/dummy/db/**/*'
ExcludedMethods:
- describe
- draw
- namespace
- devise_scope
- unnest_namespace
Max: 25

# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength:
inherit_mode:
merge:
- Exclude
Exclude:
- 'test/**/*'
- 'Guardfile'
- 'devise_token_auth.gemspec'
IgnoredPatterns:
- '(\A|\s)#'
Max: 80
Loading