sendgrid/smtpapi-ruby

rubocop issues on build

Closed this issue · 1 comments

Issue Summary

examples/example.rb:7:1: C: Missing space after #.
#header.add_to(['test1@example.com', 'test2@example.com'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
examples/example.rb:10:1: C: Missing space after #.
#header.set_tos(['you@youremail.com', 'other@otheremail.com']) # to => ['you@youremail.com', 'other@otheremail.com']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
examples/example.rb:10:81: C: Line is too long. [116/80]
#header.set_tos(['you@youremail.com', 'other@otheremail.com']) # to => ['you@youremail.com', 'other@otheremail.com']
                                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
examples/example.rb:14:34: C: Use %w or %W for array of words.
header.add_substitution('other', ['one', 'two'])   # sub = {keep: ['secret'], other: ['one', 'two']}
                                 ^^^^^^^^^^^^^^
examples/example.rb:14:81: C: Line is too long. [100/80]
header.add_substitution('other', ['one', 'two'])   # sub = {keep: ['secret'], other: ['one', 'two']}
                                                                                ^^^^^^^^^^^^^^^^^^^^
examples/example.rb:19:1: C: Extra blank line detected.
examples/example.rb:23:1: C: Extra blank line detected.
examples/example.rb:25:1: C: Missing space after #.
#header.set_unique_args({'cow' => 'chicken'})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
examples/example.rb:26:1: C: Missing space after #.
#header.set_unique_args({'dad' => 'proud'})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
examples/example.rb:33:1: C: Missing space after #.
#header.set_categories(['tactics', 'advanced']) # category = ['tactics', 'advanced']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
examples/example.rb:33:81: C: Line is too long. [84/80]
#header.set_categories(['tactics', 'advanced']) # category = ['tactics', 'advanced']
                                                                                ^^^^
examples/example.rb:35:1: C: Extra blank line detected.
examples/example.rb:41:1: C: Missing space after #.
#header.set_sections({'-charge-' => 'This ship is useless.'})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
examples/example.rb:43:1: C: Extra blank line detected.
examples/example.rb:49:1: C: Do not use block comments.
=begin
^^^^^^
examples/example.rb:66:1: C: Do not use block comments.
=begin
^^^^^^
examples/example.rb:74:108: C: Line is too long. [124/80]
# This is to specify an [ASM Group](https://sendgrid.com/docs/User_Guide/advanced_suppression_manager.html) for the message.
                                                                                                           ^^^^^^^^^^^^^^^^^
examples/example.rb:79:20: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
header.set_ip_pool("test_pool")
                   ^^^^^^^^^^^
examples/example.rb:81:21: C: Final newline missing.
print header.to_json
                    
test/test.rb:206:81: C: Line is too long. [96/80]
    license_end_year = IO.read('LICENSE.txt').match(/Copyright \(c\) \d{4}-(\d{4}) SendGrid/)[1]
                                                                                ^^^^^^^^^^^^^^^^

Steps to Reproduce

  1. Go to a current PR and look at the Travis build notes
  2. Search for rubocop

You are done when...

  1. Make the changes
  2. Make a PR
  3. Wait for Travis to build
  4. Check the Travis logs for "rubocop"
  5. You shouldn't see any issues

I can do this one!