Skip to content

Commit

Permalink
Update RuboCop config and make the code offence-free
Browse files Browse the repository at this point in the history
  • Loading branch information
chastell committed Sep 26, 2015
1 parent bbb991c commit e340b23
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
6 changes: 1 addition & 5 deletions .rubocop.yml
Expand Up @@ -29,7 +29,7 @@ Style/AsciiComments:
Enabled: false

# Allow using braces for value-returning blocks
Style/Blocks:
Style/BlockDelimiters:
Enabled: false

# Documentation checked by Inch CI
Expand All @@ -53,10 +53,6 @@ Style/OpMethod:
Exclude:
- lib/rom/command_registry.rb

# Even a single escaped slash can be confusing
Style/RegexpLiteral:
MaxSlashes: 0

# Don’t introduce semantic fail/raise distinction
Style/SignalException:
EnforcedStyle: only_raise
Expand Down
18 changes: 12 additions & 6 deletions .rubocop_todo.yml
@@ -1,15 +1,21 @@
# This configuration was generated by `rubocop --auto-gen-config`
# on 2015-03-01 15:08:21 +0100 using RuboCop version 0.29.1.
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2015-09-26 18:14:52 +0200 using RuboCop version 0.34.2.
# 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
# versions of RuboCop, may require this file to be generated again.

# Offense count: 1
Lint/HandleExceptions:
Enabled: false
Metrics/AbcSize:
Max: 19

# Offense count: 1
# Offense count: 4
# Configuration parameters: AllowURI, URISchemes.
Metrics/LineLength:
Max: 81
Max: 83

# Offense count: 1
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 11
2 changes: 1 addition & 1 deletion lib/rom/yesql/gateway.rb
Expand Up @@ -29,7 +29,7 @@ class Gateway < ROM::Gateway

option :path, reader: true
option :queries, type: Hash, default: EMPTY_HASH
option :query_proc, reader: true, default: proc { |gateway|
option :query_proc, reader: true, default: proc { |_gateway|
proc do |_name, query, opts|
query % opts
end
Expand Down
2 changes: 1 addition & 1 deletion rakelib/rubocop.rake
Expand Up @@ -14,5 +14,5 @@ begin
end
end

rescue LoadError
rescue LoadError # rubocop:disable Lint/HandleExceptions
end
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Expand Up @@ -16,7 +16,7 @@

begin
require 'byebug'
rescue LoadError
rescue LoadError # rubocop:disable Lint/HandleExceptions
end

LOGGER = Logger.new(File.open('./log/test.log', 'a'))
Expand Down

0 comments on commit e340b23

Please sign in to comment.