Skip to content

Instantly share code, notes, and snippets.

@urbanautomaton
Created April 24, 2015 11:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save urbanautomaton/7746e91e0ed42cdea878 to your computer and use it in GitHub Desktop.
Save urbanautomaton/7746e91e0ed42cdea878 to your computer and use it in GitHub Desktop.
Top Cops
302 Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
72 Extra empty line detected at block body end.
71 Extra empty line detected at block body beginning.
52 Extra empty line detected at class body beginning.
47 Final newline missing.
45 Extra empty line detected at class body end.
40 Align the operands of an expression in an assignment spanning multiple lines.
35 Extra blank line detected.
22 Trailing whitespace detected.
22 Tab detected.
21 Use 2 (not 0) spaces for indenting an expression spanning multiple lines.
18 Extra empty line detected at module body end.
16 Extra empty line detected at module body beginning.
15 Use the new Ruby 1.9 hash syntax.
13 Use %w or %W for array of words.
12 Inconsistent indentation detected.
11 1 trailing blank lines detected.
9 Redundant return detected.
7 Use 2 (not 1) spaces for indentation.
7 Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||.
7 Avoid chaining a method call on a do...end block.
6 Use 2 (not 3) spaces for indentation.
5 Use 2 (not 4) spaces for indentation.
5 Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||.
4 Use empty lines between defs.
4 Surrounding space missing for operator =>.
4 Space inside square brackets detected.
4 Space inside parentheses detected.
3 Pass &
3 Assignment Branch Condition size for create is too high. [15.07/15]
3 Align ) with (.
2 Use snake_case for variable names.
2 Use 2 (not 0) spaces for indentation.
2 Redundant else-clause.
2 Avoid multi-line chains of blocks.
2 Align the operands of a condition in an if statement spanning multiple lines.
1 Use attr_writer to define trivial writer methods.
1 Use 2 (not -21) spaces for indentation.
1 Use 2 (not -15) spaces for indentation.
1 Replace class var @@renderer with a class instance var.
1 Replace class var @@customisation_attributes with a class instance var.
1 Perceived complexity for set_user_language is too high. [8/7]
1 Perceived complexity for run_spec_test is too high. [11/7]
1 Perceived complexity for concat is too high. [10/7]
1 Indent ) the same as the start of the line where ( is.
1 Extra empty line detected at method body end.
1 Assignment Branch Condition size for zone_row is too high. [19.1/15]
1 Assignment Branch Condition size for user_sign_in_url is too high. [19.24/15]
1 Assignment Branch Condition size for url_for_current_with_locale is too high. [20.2/15]
1 Assignment Branch Condition size for upload! is too high. [31.29/15]
1 Assignment Branch Condition size for upload is too high. [21.93/15]
1 Assignment Branch Condition size for update_process_time is too high. [30.25/15]
1 Assignment Branch Condition size for update is too high. [19.26/15]
1 Assignment Branch Condition size for update is too high. [15.03/15]
1 Assignment Branch Condition size for up is too high. [364/15]
1 Assignment Branch Condition size for up is too high. [27.29/15]
1 Assignment Branch Condition size for up is too high. [27.02/15]
1 Assignment Branch Condition size for up is too high. [23.02/15]
1 Assignment Branch Condition size for up is too high. [18.28/15]
1 Assignment Branch Condition size for up is too high. [15.03/15]
1 Assignment Branch Condition size for sync! is too high. [15.39/15]
1 Assignment Branch Condition size for stub_customisations is too high. [20/15]
1 Assignment Branch Condition size for sign_in is too high. [25.02/15]
1 Assignment Branch Condition size for show is too high. [33.91/15]
1 Assignment Branch Condition size for set_user_language is too high. [47.69/15]
1 Assignment Branch Condition size for set_password is too high. [20.2/15]
1 Assignment Branch Condition size for set_expected_delivery_date! is too high. [16.31/15]
1 Assignment Branch Condition size for set is too high. [22.11/15]
1 Assignment Branch Condition size for seed is too high. [241.5/15]
1 Assignment Branch Condition size for save_permalink is too high. [17.49/15]
1 Assignment Branch Condition size for run_spec_test is too high. [36.89/15]
1 Assignment Branch Condition size for run is too high. [18.47/15]
1 Assignment Branch Condition size for retry_request is too high. [15.17/15]
1 Assignment Branch Condition size for render is too high. [27.8/15]
1 Assignment Branch Condition size for render is too high. [20.9/15]
1 Assignment Branch Condition size for push_item is too high. [16.88/15]
1 Assignment Branch Condition size for push is too high. [23.37/15]
1 Assignment Branch Condition size for product_option_type_price is too high. [15.78/15]
1 Assignment Branch Condition size for print is too high. [19.95/15]
1 Assignment Branch Condition size for present is too high. [252/15]
1 Assignment Branch Condition size for prepare_address is too high. [42.72/15]
1 Assignment Branch Condition size for parse is too high. [42.05/15]
1 Assignment Branch Condition size for parse is too high. [29.03/15]
1 Assignment Branch Condition size for parse is too high. [15.33/15]
1 Assignment Branch Condition size for override_address_country is too high. [15.13/15]
1 Assignment Branch Condition size for order_analytics is too high. [20/15]
1 Assignment Branch Condition size for meta_data is too high. [20.71/15]
1 Assignment Branch Condition size for locale_buttons is too high. [17.49/15]
1 Assignment Branch Condition size for list_of_referrees is too high. [15.07/15]
1 Assignment Branch Condition size for link_to_cart is too high. [18.28/15]
1 Assignment Branch Condition size for link_to_account is too high. [22.09/15]
1 Assignment Branch Condition size for issue_reprints is too high. [21.02/15]
1 Assignment Branch Condition size for inject_yeti_meta_tags is too high. [15.43/15]
1 Assignment Branch Condition size for index is too high. [35.57/15]
1 Assignment Branch Condition size for index is too high. [22.47/15]
1 Assignment Branch Condition size for import! is too high. [72.15/15]
1 Assignment Branch Condition size for import! is too high. [28.23/15]
1 Assignment Branch Condition size for image_srcset is too high. [23.04/15]
1 Assignment Branch Condition size for handle_stripe_errors is too high. [16.28/15]
1 Assignment Branch Condition size for given_i_am_signed_in is too high. [18.03/15]
1 Assignment Branch Condition size for generate is too high. [74.09/15]
1 Assignment Branch Condition size for full_name is too high. [19.24/15]
1 Assignment Branch Condition size for find_referrer_and_track_referral_count is too high. [16.79/15]
1 Assignment Branch Condition size for find_or_create_user is too high. [26.17/15]
1 Assignment Branch Condition size for filters is too high. [26.19/15]
1 Assignment Branch Condition size for filters is too high. [20.64/15]
1 Assignment Branch Condition size for estimate is too high. [15.33/15]
1 Assignment Branch Condition size for entry_for is too high. [41.06/15]
1 Assignment Branch Condition size for edit_or_sign_in_to_edit_link is too high. [20.47/15]
1 Assignment Branch Condition size for duplicate_order is too high. [28.16/15]
1 Assignment Branch Condition size for deliver! is too high. [18.11/15]
1 Assignment Branch Condition size for csv_string is too high. [15.17/15]
1 Assignment Branch Condition size for csv_row is too high. [19.03/15]
1 Assignment Branch Condition size for csv_body is too high. [19.24/15]
1 Assignment Branch Condition size for create_user is too high. [20.12/15]
1 Assignment Branch Condition size for create_prices! is too high. [16.79/15]
1 Assignment Branch Condition size for create is too high. [38.33/15]
1 Assignment Branch Condition size for create is too high. [25.26/15]
1 Assignment Branch Condition size for create is too high. [24.04/15]
1 Assignment Branch Condition size for convert is too high. [19.34/15]
1 Assignment Branch Condition size for concat is too high. [22.23/15]
1 Assignment Branch Condition size for compute is too high. [18.92/15]
1 Assignment Branch Condition size for checkout_progress is too high. [32.53/15]
1 Assignment Branch Condition size for change is too high. [62/15]
1 Assignment Branch Condition size for change is too high. [29/15]
1 Assignment Branch Condition size for change is too high. [27.09/15]
1 Assignment Branch Condition size for change is too high. [25.18/15]
1 Assignment Branch Condition size for change is too high. [25.08/15]
1 Assignment Branch Condition size for change is too high. [17.03/15]
1 Assignment Branch Condition size for change is too high. [15.26/15]
1 Assignment Branch Condition size for capture_customer_name is too high. [15.13/15]
1 Assignment Branch Condition size for best_promotion_adjustments_for_order is too high. [16.06/15]
1 Assignment Branch Condition size for available_countries_fast is too high. [20.49/15]
1 Assignment Branch Condition size for apply! is too high. [28.04/15]
1 Assignment Branch Condition size for angel_promo_create is too high. [25.81/15]
1 Assignment Branch Condition size for after_sign_in_path_for is too high. [16.52/15]
1 Assignment Branch Condition size for _get_cases is too high. [15.56/15]
1 Align the elements of an array literal if they span more than one line.
1 Align else with if.
1 2 trailing blank lines detected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment