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

Problem with Style/StringLiterals: #2834

Closed
coding-bunny opened this issue Feb 12, 2016 · 13 comments
Closed

Problem with Style/StringLiterals: #2834

coding-bunny opened this issue Feb 12, 2016 · 13 comments

Comments

@coding-bunny
Copy link

Hello,

I'm running into problems with Rubocop when activating this rule.
This is the autoput when running the command with -d:

rubocop -d app/business_objects/data_hub/adapters/bureau_van_dijk/query_string_builder.rb 

For /Users/olivar/RubymineProjects/riskmethods: configuration from /Users/olivar/RubymineProjects/riskmethods/.rubocop.yml
Inheriting configuration from /Users/olivar/RubymineProjects/riskmethods/.rubocop_todo.yml
Default configuration from /Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/config/default.yml
Inheriting configuration from /Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/config/enabled.yml
Inheriting configuration from /Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/config/disabled.yml
Inspecting 1 file
Scanning /Users/olivar/RubymineProjects/riskmethods/app/business_objects/data_hub/adapters/bureau_van_dijk/query_string_builder.rb
An error occurred while Style/StringLiterals cop was inspecting /Users/olivar/RubymineProjects/riskmethods/app/business_objects/data_hub/adapters/bureau_van_dijk/query_string_builder.rb.
undefined method `source' for nil:NilClass
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/style/string_literals.rb:24:in `block in on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/style/string_literals.rb:24:in `map'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/style/string_literals.rb:24:in `on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/commissioner.rb:39:in `block (2 levels) in on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/commissioner.rb:97:in `with_cop_error_handling'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/commissioner.rb:38:in `block in on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/commissioner.rb:37:in `each'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/commissioner.rb:37:in `on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/ast_node/traversal.rb:123:in `on_defs'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/commissioner.rb:43:in `on_defs'
(eval):2:in `block in on_begin'
(eval):2:in `each'
(eval):2:in `on_begin'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/commissioner.rb:43:in `on_begin'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/ast_node/traversal.rb:89:in `on_class'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/commissioner.rb:43:in `on_class'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/ast_node/traversal.rb:142:in `on_while'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/commissioner.rb:43:in `on_module'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/ast_node/traversal.rb:142:in `on_while'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/commissioner.rb:43:in `on_module'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/ast_node/traversal.rb:142:in `on_while'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/commissioner.rb:43:in `on_module'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/ast_node/traversal.rb:13:in `walk'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/commissioner.rb:56:in `investigate'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/team.rb:58:in `inspect_file'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/runner.rb:194:in `inspect_file'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/runner.rb:164:in `block in do_inspection_loop'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/runner.rb:158:in `loop'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/runner.rb:158:in `do_inspection_loop'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/runner.rb:87:in `process_file'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/runner.rb:59:in `block in inspect_files'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/runner.rb:57:in `each'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/runner.rb:57:in `inspect_files'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/runner.rb:35:in `run'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cli.rb:30:in `run'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/bin/rubocop:14:in `block in <top (required)>'
/Users/olivar/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/bin/rubocop:13:in `<top (required)>'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/bin/rubocop:23:in `load'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/bin/rubocop:23:in `<main>'
An error occurred while Style/StringLiterals cop was inspecting /Users/olivar/RubymineProjects/riskmethods/app/business_objects/data_hub/adapters/bureau_van_dijk/query_string_builder.rb.
undefined method `source' for nil:NilClass
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/style/string_literals.rb:24:in `block in on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/style/string_literals.rb:24:in `map'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/style/string_literals.rb:24:in `on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/commissioner.rb:39:in `block (2 levels) in on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/commissioner.rb:97:in `with_cop_error_handling'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/commissioner.rb:38:in `block in on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/commissioner.rb:37:in `each'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/commissioner.rb:37:in `on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/ast_node/traversal.rb:123:in `on_defs'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/commissioner.rb:43:in `on_defs'
(eval):2:in `block in on_begin'
(eval):2:in `each'
(eval):2:in `on_begin'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/commissioner.rb:43:in `on_begin'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/ast_node/traversal.rb:89:in `on_class'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/commissioner.rb:43:in `on_class'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/ast_node/traversal.rb:142:in `on_while'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/commissioner.rb:43:in `on_module'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/ast_node/traversal.rb:142:in `on_while'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/commissioner.rb:43:in `on_module'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/ast_node/traversal.rb:142:in `on_while'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/commissioner.rb:43:in `on_module'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/ast_node/traversal.rb:13:in `walk'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/commissioner.rb:56:in `investigate'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cop/team.rb:58:in `inspect_file'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/runner.rb:194:in `inspect_file'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/runner.rb:164:in `block in do_inspection_loop'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/runner.rb:158:in `loop'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/runner.rb:158:in `do_inspection_loop'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/runner.rb:87:in `process_file'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/runner.rb:59:in `block in inspect_files'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/runner.rb:57:in `each'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/runner.rb:57:in `inspect_files'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/runner.rb:35:in `run'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/lib/rubocop/cli.rb:30:in `run'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/bin/rubocop:14:in `block in <top (required)>'
/Users/olivar/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.0/bin/rubocop:13:in `<top (required)>'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/bin/rubocop:23:in `load'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/bin/rubocop:23:in `<main>'
.

1 file inspected, no offenses detected

2 errors occurred:
An error occurred while Style/StringLiterals cop was inspecting /Users/olivar/RubymineProjects/riskmethods/app/business_objects/data_hub/adapters/bureau_van_dijk/query_string_builder.rb.
An error occurred while Style/StringLiterals cop was inspecting /Users/olivar/RubymineProjects/riskmethods/app/business_objects/data_hub/adapters/bureau_van_dijk/query_string_builder.rb.
Errors are usually caused by RuboCop bugs.
Please, report your problems to RuboCop's issue tracker.
Mention the following information in the issue report:
0.37.0 (using Parser 2.3.0.3, running on ruby 2.2.3 x86_64-darwin14)
Finished in 0.3767494599997008 seconds

I cannot share the source, but the class is basically one class with 2 class methods that return very large strings to use in queries.
The strings are build up using:

def method
  <<-QUERY_STRING







  QUERY_STRING
end

and are roughly 20 lines long.

@coding-bunny
Copy link
Author

update : this happens with a lot of other files in our project. All seem to be related to multi line strings;
This is our config:

inherit_from: .rubocop_todo.yml
AllCops:
  Include:
    - Rakefile
    - config.ru
  Exclude:
    - db/schema.rb
  TargetRubyVersion: 2.3

# This rule checks whether the *end* keyword is always properly aligned with the variable
# it belongs to.
Lint/EndAlignment:
  AlignWith: variable

# This rule checks whether the alignment of hashes is following the correct configuration:
# All entries are aligned on keys, and no exceptions are allowed.
Style/AlignHash:
  EnforcedHashRocketStyle: key
  EnforcedColonStyle: key
  EnforcedLastArgumentHashStyle: always_inspect

# This rule checks whether all string literals in the source code follow the agreed rule.
# For Riskmethods, this is single quotes.
Style/StringLiterals:
  EnforcedStyle: single_quotes
  ConsistentQuotesInMultiline: true

# This rule checks whether string literals used inside interpolated strings are following the
# configured rule, which for Riskmethods is single quotes.
Style/StringLiteralsInInterpolation:
  EnforcedStyle: single_quotes

# This rule checks whether procs are properly written as symbol procs, unless the method in question
# is inside the ignore whitelist.
Style/SymbolProc:
  IgnoredMethods:
    - respond_to

# This rule checks whether trailing comma's are removed from string literals.
Style/TrailingCommaInLiteral:
  EnforcedStyleForMultiline: no_comma

# This rule enforces the removal of trivial accessors in the code, keeping the code base clean.
Style/TrivialAccessors:
  ExactNameMatch: true
  AllowPredicates: false
  AllowDSLWriters: false
  IgnoreClassMethods: false
  Whitelist:
    - to_ary
    - to_a
    - to_c
    - to_enum
    - to_h
    - to_hash
    - to_i
    - to_int
    - to_io
    - to_open
    - to_path
    - to_proc
    - to_r
    - to_regexp
    - to_str
    - to_s
    - to_sym

@bbatsov
Copy link
Collaborator

bbatsov commented Feb 12, 2016

Upgrade to 0.37.2.

@coding-bunny
Copy link
Author

will try it!

@coding-bunny
Copy link
Author

Sorry, still not working.
Updated the gem as requested, and reran the command:

➜  riskmethods git:(rubocop-string-literals) ✗ rubocop -d app/business_objects/data_hub/adapters/bureau_van_dijk/query_string_builder.rb 
For /Users/olivar/RubymineProjects/riskmethods: configuration from /Users/olivar/RubymineProjects/riskmethods/.rubocop.yml
Inheriting configuration from /Users/olivar/RubymineProjects/riskmethods/.rubocop_todo.yml
Default configuration from /Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/config/default.yml
Inheriting configuration from /Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/config/enabled.yml
Inheriting configuration from /Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/config/disabled.yml
Inspecting 1 file
Scanning /Users/olivar/RubymineProjects/riskmethods/app/business_objects/data_hub/adapters/bureau_van_dijk/query_string_builder.rb
An error occurred while Style/StringLiterals cop was inspecting /Users/olivar/RubymineProjects/riskmethods/app/business_objects/data_hub/adapters/bureau_van_dijk/query_string_builder.rb.
undefined method `source' for nil:NilClass
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/style/string_literals.rb:24:in `block in on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/style/string_literals.rb:24:in `map'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/style/string_literals.rb:24:in `on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:42:in `block (2 levels) in on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:97:in `with_cop_error_handling'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:41:in `block in on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:40:in `each'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:40:in `on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/ast_node/traversal.rb:123:in `on_defs'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:46:in `on_defs'
(eval):2:in `block in on_begin'
(eval):2:in `each'
(eval):2:in `on_begin'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:46:in `on_begin'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/ast_node/traversal.rb:89:in `on_class'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:46:in `on_class'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/ast_node/traversal.rb:142:in `on_while'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:46:in `on_module'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/ast_node/traversal.rb:142:in `on_while'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:46:in `on_module'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/ast_node/traversal.rb:142:in `on_while'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:46:in `on_module'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/ast_node/traversal.rb:13:in `walk'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:59:in `investigate'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/team.rb:65:in `inspect_file'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/runner.rb:194:in `inspect_file'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/runner.rb:164:in `block in do_inspection_loop'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/runner.rb:158:in `loop'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/runner.rb:158:in `do_inspection_loop'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/runner.rb:87:in `process_file'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/runner.rb:59:in `block in inspect_files'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/runner.rb:57:in `each'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/runner.rb:57:in `inspect_files'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/runner.rb:35:in `run'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cli.rb:30:in `run'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/bin/rubocop:14:in `block in <top (required)>'
/Users/olivar/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/bin/rubocop:13:in `<top (required)>'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/bin/rubocop:23:in `load'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/bin/rubocop:23:in `<main>'
An error occurred while Style/StringLiterals cop was inspecting /Users/olivar/RubymineProjects/riskmethods/app/business_objects/data_hub/adapters/bureau_van_dijk/query_string_builder.rb.
undefined method `source' for nil:NilClass
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/style/string_literals.rb:24:in `block in on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/style/string_literals.rb:24:in `map'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/style/string_literals.rb:24:in `on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:42:in `block (2 levels) in on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:97:in `with_cop_error_handling'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:41:in `block in on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:40:in `each'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:40:in `on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/ast_node/traversal.rb:123:in `on_defs'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:46:in `on_defs'
(eval):2:in `block in on_begin'
(eval):2:in `each'
(eval):2:in `on_begin'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:46:in `on_begin'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/ast_node/traversal.rb:89:in `on_class'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:46:in `on_class'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/ast_node/traversal.rb:142:in `on_while'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:46:in `on_module'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/ast_node/traversal.rb:142:in `on_while'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:46:in `on_module'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/ast_node/traversal.rb:142:in `on_while'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:46:in `on_module'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/ast_node/traversal.rb:13:in `walk'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:59:in `investigate'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cop/team.rb:65:in `inspect_file'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/runner.rb:194:in `inspect_file'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/runner.rb:164:in `block in do_inspection_loop'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/runner.rb:158:in `loop'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/runner.rb:158:in `do_inspection_loop'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/runner.rb:87:in `process_file'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/runner.rb:59:in `block in inspect_files'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/runner.rb:57:in `each'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/runner.rb:57:in `inspect_files'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/runner.rb:35:in `run'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/lib/rubocop/cli.rb:30:in `run'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/bin/rubocop:14:in `block in <top (required)>'
/Users/olivar/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/gems/rubocop-0.37.2/bin/rubocop:13:in `<top (required)>'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/bin/rubocop:23:in `load'
/Users/olivar/.rvm/gems/ruby-2.2.3@riskmethods/bin/rubocop:23:in `<main>'
.

1 file inspected, no offenses detected

2 errors occurred:
An error occurred while Style/StringLiterals cop was inspecting /Users/olivar/RubymineProjects/riskmethods/app/business_objects/data_hub/adapters/bureau_van_dijk/query_string_builder.rb.
An error occurred while Style/StringLiterals cop was inspecting /Users/olivar/RubymineProjects/riskmethods/app/business_objects/data_hub/adapters/bureau_van_dijk/query_string_builder.rb.
Errors are usually caused by RuboCop bugs.
Please, report your problems to RuboCop's issue tracker.
Mention the following information in the issue report:
0.37.2 (using Parser 2.3.0.5, running on ruby 2.2.3 x86_64-darwin14)
Finished in 0.34973935700327274 seconds

@alexdowad
Copy link
Contributor

This shouldn't be hard to fix, but you will need to boil the failing code down to an example which you can share.

Take a file which causes the error, and start deleting things from it. Delete as much as you can, as long as the file still triggers the error. When you get down to something which does not contain anything confidential, post it here.

@coding-bunny
Copy link
Author

will post an example tommorow from my work PC with cleaned code, after I have verified it to be reproducable:

@coding-bunny
Copy link
Author

As promised, here is a test file to reproduce the behaviour:

➜  my_project git:(rubocop-string-literals) ✗ rubocop query_string_builder_test.rb 
Inspecting 1 file
An error occurred while Style/StringLiterals cop was inspecting /Users/olivar/RubymineProjects/my_project/query_string_builder_test.rb.
To see the complete backtrace run rubocop -d.
An error occurred while Style/StringLiterals cop was inspecting /Users/olivar/RubymineProjects/my_project/query_string_builder_test.rb.
To see the complete backtrace run rubocop -d.
.

1 file inspected, no offenses detected

2 errors occurred:
An error occurred while Style/StringLiterals cop was inspecting /Users/olivar/RubymineProjects/my_project/query_string_builder_test.rb.
An error occurred while Style/StringLiterals cop was inspecting /Users/olivar/RubymineProjects/my_project/query_string_builder_test.rb.
Errors are usually caused by RuboCop bugs.
Please, report your problems to RuboCop's issue tracker.
Mention the following information in the issue report:
0.37.2 (using Parser 2.3.0.5, running on ruby 2.2.3 x86_64-darwin14)

Running the same with -d:

➜  my_project git:(rubocop-string-literals) ✗ rubocop -d query_string_builder_test.rb
For /Users/olivar/RubymineProjects/my_project: configuration from /Users/olivar/RubymineProjects/my_project/.rubocop.yml
Inheriting configuration from /Users/olivar/RubymineProjects/my_project/.rubocop_todo.yml
Default configuration from /Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/config/default.yml
Inheriting configuration from /Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/config/enabled.yml
Inheriting configuration from /Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/config/disabled.yml
Inspecting 1 file
Scanning /Users/olivar/RubymineProjects/my_project/query_string_builder_test.rb
An error occurred while Style/StringLiterals cop was inspecting /Users/olivar/RubymineProjects/my_project/query_string_builder_test.rb.
undefined method `source' for nil:NilClass
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/style/string_literals.rb:24:in `block in on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/style/string_literals.rb:24:in `map'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/style/string_literals.rb:24:in `on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:42:in `block (2 levels) in on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:97:in `with_cop_error_handling'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:41:in `block in on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:40:in `each'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:40:in `on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/ast_node/traversal.rb:123:in `on_defs'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:46:in `on_defs'
(eval):2:in `block in on_begin'
(eval):2:in `each'
(eval):2:in `on_begin'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:46:in `on_begin'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/ast_node/traversal.rb:89:in `on_class'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:46:in `on_class'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/ast_node/traversal.rb:142:in `on_while'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:46:in `on_module'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/ast_node/traversal.rb:142:in `on_while'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:46:in `on_module'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/ast_node/traversal.rb:142:in `on_while'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:46:in `on_module'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/ast_node/traversal.rb:13:in `walk'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:59:in `investigate'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/team.rb:65:in `inspect_file'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/runner.rb:194:in `inspect_file'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/runner.rb:164:in `block in do_inspection_loop'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/runner.rb:158:in `loop'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/runner.rb:158:in `do_inspection_loop'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/runner.rb:87:in `process_file'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/runner.rb:59:in `block in inspect_files'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/runner.rb:57:in `each'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/runner.rb:57:in `inspect_files'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/runner.rb:35:in `run'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cli.rb:30:in `run'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/bin/rubocop:14:in `block in <top (required)>'
/Users/olivar/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/bin/rubocop:13:in `<top (required)>'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/bin/rubocop:23:in `load'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/bin/rubocop:23:in `<main>'
An error occurred while Style/StringLiterals cop was inspecting /Users/olivar/RubymineProjects/my_project/query_string_builder_test.rb.
undefined method `source' for nil:NilClass
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/style/string_literals.rb:24:in `block in on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/style/string_literals.rb:24:in `map'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/style/string_literals.rb:24:in `on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:42:in `block (2 levels) in on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:97:in `with_cop_error_handling'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:41:in `block in on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:40:in `each'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:40:in `on_dstr'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/ast_node/traversal.rb:123:in `on_defs'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:46:in `on_defs'
(eval):2:in `block in on_begin'
(eval):2:in `each'
(eval):2:in `on_begin'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:46:in `on_begin'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/ast_node/traversal.rb:89:in `on_class'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:46:in `on_class'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/ast_node/traversal.rb:142:in `on_while'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:46:in `on_module'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/ast_node/traversal.rb:142:in `on_while'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:46:in `on_module'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/ast_node/traversal.rb:142:in `on_while'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:46:in `on_module'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/ast_node/traversal.rb:13:in `walk'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/commissioner.rb:59:in `investigate'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cop/team.rb:65:in `inspect_file'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/runner.rb:194:in `inspect_file'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/runner.rb:164:in `block in do_inspection_loop'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/runner.rb:158:in `loop'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/runner.rb:158:in `do_inspection_loop'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/runner.rb:87:in `process_file'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/runner.rb:59:in `block in inspect_files'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/runner.rb:57:in `each'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/runner.rb:57:in `inspect_files'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/runner.rb:35:in `run'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/lib/rubocop/cli.rb:30:in `run'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/bin/rubocop:14:in `block in <top (required)>'
/Users/olivar/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/gems/rubocop-0.37.2/bin/rubocop:13:in `<top (required)>'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/bin/rubocop:23:in `load'
/Users/olivar/.rvm/gems/ruby-2.2.3@my_project/bin/rubocop:23:in `<main>'
.

1 file inspected, no offenses detected

2 errors occurred:
An error occurred while Style/StringLiterals cop was inspecting /Users/olivar/RubymineProjects/my_project/query_string_builder_test.rb.
An error occurred while Style/StringLiterals cop was inspecting /Users/olivar/RubymineProjects/my_project/query_string_builder_test.rb.
Errors are usually caused by RuboCop bugs.
Please, report your problems to RuboCop's issue tracker.
Mention the following information in the issue report:
0.37.2 (using Parser 2.3.0.5, running on ruby 2.2.3 x86_64-darwin14)
Finished in 0.268927253000129 seconds

And the file in question:

# frozen_string_literal: true
module Module1
  module Module2
    module Module3
      class QueryStringBuilder
        def self.data_query_without_snippet
          <<-QUERY_STRING
            DEFINE
              P1 AS [SuperLongQueryString;Value1=3;ArrayValue=[12345|1234|1234|!234|2345];excludeOptions1|2|#|4;],
              P2 AS [SuperLongQueryString;Value1=3;ArrayValue=[12345|1234|1234|!234|2345];excludeOptions1|2|#|4;],
              P3 AS [SuperLongQueryString;Value1=3;ArrayValue=[12345|1234|1234|!234|2345];excludeOptions1|2|#|4;],
              P4 AS [SuperLongQueryString;Value1=3;ArrayValue=[12345|1234|1234|!234|2345];excludeOptions1|2|#|4;],
              P5 AS [SuperLongQueryString;Value1=3;ArrayValue=[12345|1234|1234|!234|2345];excludeOptions1|2|#|4;],
              P6 AS [SuperLongQueryString;Value1=3;ArrayValue=[12345|1234|1234|!234|2345];excludeOptions1|2|#|4;];

            SELECT
              SOMETHING GENERAL_INFO.NAME AS NAME,
              SOMETHING ACCOUNTS_HEADER.ORIG_COOKIE USING P1 AS COOKIE,
              SOMETHING STATUS_ACC_INFO.LASTYEAR AS A,
              MODEL [Unified]SOMETHING REPORT_PROFILE.OPREV USING P2 AS B,
              MODEL [Unified]SOMETHING REPORT_PROFILE.OPREV USING P3 AS C,
              MODEL [Unified]SOMETHING REPORT_PROFILE.500 USING P4 AS D,
              MODEL [Unified]SOMETHING REPORT_PROFILE.508 USING P4 AS E,
              MODEL [C]SOMETHING RATIOS.513 USING P4 AS F,
              MODEL [C]SOMETHING RATIOS.514 USING P4 AS G,
              SOMETHING SUMMARY.MORRAT USING P5 AS H,
              SOMETHING SUMMARY.MORCREDLIMIT USING P6 AS I
            FROM RemoteAccess.A
          QUERY_STRING
        end

        def self.data_query_with_snippet
          <<-QUERY_STRING
            DEFINE
              F1 AS [SuperLongQueryString;Value1=3;ArrayValue=[12345|1234|1234|!234|2345];excludeOptions1|2|#|4;],
              F2 AS [SuperLongQueryString;Value1=3;ArrayValue=[12345|1234|1234|!234|2345];excludeOptions1|2|#|4;],
              F3 AS [SuperLongQueryString;Value1=3;ArrayValue=[12345|1234|1234|!234|2345];excludeOptions1|2|#|4;],
              F4 AS [SuperLongQueryString;Value1=3;ArrayValue=[12345|1234|1234|!234|2345];excludeOptions1|2|#|4;],
              P1 AS [SuperLongQueryString;Value1=3;ArrayValue=[12345|1234|1234|!234|2345];excludeOptions1|2|#|4;],
              P2 AS [SuperLongQueryString;Value1=3;ArrayValue=[12345|1234|1234|!234|2345];excludeOptions1|2|#|4;],
              P3 AS [SuperLongQueryString;Value1=3;ArrayValue=[12345|1234|1234|!234|2345];excludeOptions1|2|#|4;],
              P4 AS [SuperLongQueryString;Value1=3;ArrayValue=[12345|1234|1234|!234|2345];excludeOptions1|2|#|4;],
              P5 AS [DimSelName=SomeRatings;SomeRatings.Index=0;],
              P6 AS [Parameters.Currency=X;Units=0;],
              P7 AS [SuperLongQueryString;Value1=3;ArrayValue=[12345|1234|1234|!234|2345];excludeOptions1|2|#|4;],
              P8 AS [SuperLongQueryString;Value1=3;ArrayValue=[12345|1234|1234|!234|2345];excludeOptions1|2|#|4;],

              SELECT
                SOMETHING GENERAL_INFO.NAME AS NAME,
                SOMETHING ACCOUNTS_HEADER.ORIG_COOKIE USING P1 AS COOKIE,
                SOMETHING STATUS_ACC_INFO.LASTYEAR AS A,
                MODEL [Unified]SOMETHING REPORT_PROFILE.OPREV USING P2 AS B,
                MODEL [Unified]SOMETHING REPORT_PROFILE.OPREV USING P3 AS C,
                MODEL [Unified]SOMETHING REPORT_PROFILE.500 USING P4 AS D,
                MODEL [Unified]SOMETHING REPORT_PROFILE.508 USING P4 AS E,
                MODEL [C]SOMETHING RATIOS.513 USING P4 AS F,
                MODEL [C]SOMETHING RATIOS.514 USING P4 AS G,
                SOMETHING SUMMARY.MORRAT USING P5 AS H,
                SOMETHING SUMMARY.MORCREDLIMIT USING P6 AS I,
                SOMETHING DMC_CONTACTS.CPYCONTACTS_HEADER_Type FILTER F1 USING P7 AS J,
                SOMETHING DMC_CONTACTS.CPYCONTACTS_HEADER_BareTitle FILTER F2 USING P7 AS K,
                SOMETHING DMC_CONTACTS.CPYCONTACTS_HEADER_PrefixSalutation FILTER F2 USING P7 AS L,
                SOMETHING DMC_CONTACTS.CPYCONTACTS_HEADER_FirstNameOriginalLanguagePreferred FILTER F2 USING P7 AS M,
                SOMETHING DMC_CONTACTS.CPYCONTACTS_HEADER_MiddleNameOriginalLanguagePreferred FILTER F2 USING P7 AS N,
                SOMETHING DMC_CONTACTS.CPYCONTACTS_HEADER_LastNameOriginalLanguagePreferred FILTER F2 USING P7 AS O,
                SOMETHING DMC_CONTACTS.CPYCONTACTS_MEMBERSHIP_WorkFullAddress FILTER F3 USING P7 AS P,
                SOMETHING DMC_CONTACTS.CPYCONTACTS_HEADER_CountryLabel FILTER F3 USING P7 AS Q,
                SOMETHING SHAREHOLDERS.-9015 FILTER F4 USING P8 AS R,
                SOMETHING SHAREHOLDERS.SHAREHOLDERS_SALUTATION FILTER F4 USING P8 AS S,
                SOMETHING SHAREHOLDERS.SHAREHOLDERS_FIRSTNAME FILTER F4 USING P8 AS T,
                SOMETHING SHAREHOLDERS.SHAREHOLDERS_LASTNAME FILTER F4 USING P8 AS U,
                SOMETHING SHAREHOLDERS.-9007 FILTER F4 USING P8 AS V,
                SOMETHING SHAREHOLDERS.-32051 FILTER F4 USING P8 AS W,
                SOMETHING SHAREHOLDERS.-9003 FILTER F4 USING P8 AS X
              FROM RemoteAccess.A
          QUERY_STRING
        end
      end
    end
  end
end

Question : This is not caused by running in ruby 2.2.3 with target code for 2.3 right?
Cause we are using Rubocop to find errors so we can properly upgrade.

@coding-bunny
Copy link
Author

nvm the previous question, changing the target version produces the same error.

@alexdowad
Copy link
Contributor

Hmm. Trying to repro, haven't succeeded yet.

@alexdowad
Copy link
Contributor

Haven't been able to reproduce on RC v0.37.2, with both Ruby 2.3.0 and 2.2.2.

@alexdowad
Copy link
Contributor

OK, with your .rubocop.yml, I can reproduce.

@coding-bunny
Copy link
Author

awesome :)
If you need anything else from my side, just let me know.

@alexdowad
Copy link
Contributor

Just pushed a fix to my open PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants