Skip to content

Commit

Permalink
update rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Korobkov committed May 24, 2017
1 parent f44058c commit 6654443
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 30 deletions.
30 changes: 15 additions & 15 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,21 @@ AllCops:
- 'lib/generators/**/templates/**/*'
- 'vendor/bundle/**/*'

Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space

Lint/UnusedMethodArgument:
Enabled: false

Metrics/ClassLength:
Max: 500

Metrics/ModuleLength:
Max: 600

Performance/RedundantMerge:
MaxKeyValuePairs: 1

Rails:
Enabled: true

Expand All @@ -27,18 +42,3 @@ Style/SingleLineBlockParams:
Style/SingleLineMethods:
Exclude:
- 'test/**/*'

Style/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space

Lint/UnusedMethodArgument:
Enabled: false

Metrics/ClassLength:
Max: 500

Metrics/ModuleLength:
Max: 600

Performance/RedundantMerge:
MaxKeyValuePairs: 1
61 changes: 47 additions & 14 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2017-05-17 17:42:33 +0400 using RuboCop version 0.48.1.
# on 2017-05-24 19:36:54 +0400 using RuboCop version 0.49.0.
# 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
Expand All @@ -13,12 +13,17 @@ Bundler/DuplicatedGem:
Exclude:
- 'Gemfile'

# Offense count: 19
# Offense count: 1
# Cop supports --auto-correct.
Layout/ElseAlignment:
Exclude:
- 'lib/active_scaffold/actions/field_search.rb'

# Offense count: 18
Lint/AmbiguousBlockAssociation:
Exclude:
- 'lib/active_scaffold/helpers/action_link_helpers.rb'
- 'lib/active_scaffold/helpers/search_column_helpers.rb'
- 'lib/active_scaffold/marked_model.rb'
- 'test/bridges/paperclip_test.rb'
- 'test/data_structures/action_columns_test.rb'
- 'test/data_structures/columns_test.rb'
Expand Down Expand Up @@ -76,7 +81,7 @@ Lint/UselessAssignment:

# Offense count: 256
Metrics/AbcSize:
Max: 125
Max: 122

# Offense count: 2
# Configuration parameters: CountComments, ExcludedMethods.
Expand All @@ -92,7 +97,7 @@ Metrics/BlockNesting:
Metrics/CyclomaticComplexity:
Max: 27

# Offense count: 1853
# Offense count: 1851
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength:
Expand All @@ -101,7 +106,7 @@ Metrics/LineLength:
# Offense count: 193
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 65
Max: 63

# Offense count: 2
# Configuration parameters: CountKeywordArgs.
Expand All @@ -112,6 +117,25 @@ Metrics/ParameterLists:
Metrics/PerceivedComplexity:
Max: 29

# Offense count: 14
# Cop supports --auto-correct.
Rails/ApplicationRecord:
Exclude:
- 'lib/active_scaffold/tableless.rb'
- 'test/company.rb'
- 'test/misc/active_record_permissions_test.rb'
- 'test/misc/constraints_test.rb'
- 'test/misc/convert_numbers_format_test.rb'
- 'test/misc/parse_datetime_test.rb'
- 'test/mock_app/app/models/address.rb'
- 'test/mock_app/app/models/building.rb'
- 'test/mock_app/app/models/car.rb'
- 'test/mock_app/app/models/contact.rb'
- 'test/mock_app/app/models/floor.rb'
- 'test/mock_app/app/models/person.rb'
- 'test/mock_app/app/models/role.rb'
- 'test/model_stub.rb'

# Offense count: 5
# Cop supports --auto-correct.
# Configuration parameters: Whitelist.
Expand All @@ -122,7 +146,7 @@ Rails/DynamicFindBy:
- 'lib/active_scaffold/tableless.rb'
- 'test/data_structures/columns_test.rb'

# Offense count: 19
# Offense count: 20
Rails/OutputSafety:
Exclude:
- 'lib/active_scaffold/bridges/carrierwave/list_ui.rb'
Expand Down Expand Up @@ -166,7 +190,7 @@ Style/CaseEquality:
Exclude:
- 'lib/active_scaffold/core.rb'

# Offense count: 85
# Offense count: 84
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: nested, compact
Style/ClassAndModuleChildren:
Expand All @@ -189,12 +213,6 @@ Style/ConditionalAssignment:
Style/Documentation:
Enabled: false

# Offense count: 1
# Cop supports --auto-correct.
Style/ElseAlignment:
Exclude:
- 'lib/active_scaffold/actions/field_search.rb'

# Offense count: 1
# Cop supports --auto-correct.
Style/EmptyCaseCondition:
Expand All @@ -211,12 +229,19 @@ Style/FileName:
- 'test/mock_app/Rakefile'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: format, sprintf, percent
Style/FormatString:
Exclude:
- 'lib/active_scaffold/finder.rb'

# Offense count: 26
# Configuration parameters: SupportedStyles.
# SupportedStyles: annotated, template
Style/FormatStringToken:
EnforcedStyle: template

# Offense count: 19
# Configuration parameters: MinBodyLength.
Style/GuardClause:
Expand Down Expand Up @@ -332,3 +357,11 @@ Style/TernaryParentheses:
- 'lib/active_scaffold/data_structures/column.rb'
- 'lib/active_scaffold/finder.rb'
- 'lib/active_scaffold/helpers/search_column_helpers.rb'

# Offense count: 3
# Cop supports --auto-correct.
Style/YodaCondition:
Exclude:
- 'lib/active_scaffold/core.rb'
- 'lib/active_scaffold/helpers/view_helpers.rb'
- 'lib/active_scaffold/tableless.rb'
4 changes: 3 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ GEM
nokogiri (1.7.2)
mini_portile2 (~> 2.1.0)
nokogiri (1.7.2-java)
parallel (1.11.2)
parser (2.4.0.0)
ast (~> 2.2)
powerpack (0.1.1)
Expand Down Expand Up @@ -142,7 +143,8 @@ GEM
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rubocop (0.48.1)
rubocop (0.49.0)
parallel (~> 1.10)
parser (>= 2.3.3.1, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
Expand Down

0 comments on commit 6654443

Please sign in to comment.