Skip to content

Commit efaad45

Browse files
committed
Fix some RuboCop violations
Fixed all remaining violations except for those related to length and complexity. Those types of violations will be taken care of during the big refactor that is soon to happen.
1 parent 01266a0 commit efaad45

File tree

3 files changed

+3
-57
lines changed

3 files changed

+3
-57
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -49,57 +49,3 @@ Metrics/ModuleLength:
4949
# Offense count: 1
5050
Metrics/PerceivedComplexity:
5151
Max: 10
52-
53-
# Offense count: 1
54-
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
55-
# NamePrefix: is_, has_, have_
56-
# NamePrefixBlacklist: is_, has_, have_
57-
# NameWhitelist: is_a?
58-
Naming/PredicateName:
59-
Exclude:
60-
- 'spec/**/*'
61-
62-
# Offense count: 23
63-
# Configuration parameters: EnforcedStyle, SupportedStyles.
64-
# SupportedStyles: snake_case, normalcase, non_integer
65-
Naming/VariableNumber:
66-
Exclude:
67-
- 'testing/rspec/spec/cql_spec.rb'
68-
- 'testing/rspec/spec/predefined_filters_spec.rb'
69-
- 'testing/rspec/spec/repository_spec.rb'
70-
71-
72-
# Offense count: 19
73-
# Cop supports --auto-correct.
74-
# Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
75-
# SupportedStyles: line_count_based, semantic, braces_for_chaining
76-
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
77-
# FunctionalMethods: let, let!, subject, watch
78-
# IgnoredMethods: lambda, proc, it
79-
Style/BlockDelimiters:
80-
Exclude:
81-
- 'testing/rspec/spec/cql_spec.rb'
82-
- 'testing/rspec/spec/line_filterable_specs.rb'
83-
- 'testing/rspec/spec/name_filterable_specs.rb'
84-
- 'testing/rspec/spec/queriable_specs.rb'
85-
86-
# Offense count: 9
87-
Style/Documentation:
88-
Exclude:
89-
- 'spec/**/*'
90-
- 'test/**/*'
91-
92-
93-
# Offense count: 1
94-
Style/MethodMissing:
95-
Exclude:
96-
- 'lib/cql/dsl.rb'
97-
98-
99-
# Offense count: 3
100-
# Cop supports --auto-correct.
101-
# Configuration parameters: AutoCorrect, EnforcedStyle, SupportedStyles.
102-
# SupportedStyles: predicate, comparison
103-
Style/NumericPredicate:
104-
Exclude:
105-
- 'spec/**/*'

lib/cql/dsl.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module Dsl
55

66

77
# Any undefined method is assumed to mean its String equivalent, thus allowing a more convenient query syntax.
8-
def method_missing(method_name)
8+
def method_missing(method_name) # rubocop:disable Style/MethodMissing - All it does is make a string. No real risk.
99
method_name.to_s
1010
end
1111

testing/rspec/spec/queriable_specs.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@
2828
it 'complains if a query is attempted without a query root being set' do
2929
object.query_root = nil
3030

31-
expect {
31+
expect do
3232

3333
object.query do
3434
select :model
3535
from :all
3636
end
3737

38-
}.to raise_error(ArgumentError, 'Query cannot be run. No query root has been set.')
38+
end.to raise_error(ArgumentError, 'Query cannot be run. No query root has been set.')
3939
end
4040

4141
it 'starts with a query root' do

0 commit comments

Comments
 (0)