Commit Graph

11 Commits

Author SHA1 Message Date
Rafael Mendonça França fe1f4b2ad5
Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
Igor Zubkov b16a0750db Set target ruby version for rubocop to 2.2 instead 2.3.
This change will help to catch ruby 2.3+ syntax in code base. Right now, minimal ruby version set to 2.2.2 in gemspecs.

Rubocop output before:

$ rubocop
Inspecting 2133 files
.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................CC.........................................................................................................................................................................................................................................................

Offenses:

activerecord/test/cases/schema_dumper_test.rb:454:32: C: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
    output = dump_table_schema('infinity_defaults')
                               ^^^^^^^^^^^^^^^^^^^
guides/bug_report_templates/active_record_migrations_gem.rb:65:4: C: Final newline missing.
end

guides/bug_report_templates/active_record_migrations_master.rb:64:4: C: Final newline missing.
end

2133 files inspected, 3 offenses detected
$

After:
$ rubocop
Inspecting 2133 files
.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................CC.........................................................................................................................................................................................................................................................

Offenses:

activerecord/test/cases/schema_dumper_test.rb:454:32: C: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
    output = dump_table_schema('infinity_defaults')
                               ^^^^^^^^^^^^^^^^^^^
guides/bug_report_templates/active_record_migrations_gem.rb:65:4: C: Final newline missing.
end

guides/bug_report_templates/active_record_migrations_master.rb:64:4: C: Final newline missing.
end

2133 files inspected, 3 offenses detected
$
2016-10-11 10:16:48 +03:00
Ryuta Kamizono 3464cd5c28 Fix broken comments indentation caused by rubocop auto-correct [ci skip]
All indentation was normalized by rubocop auto-correct at 80e66cc4d9.
But comments was still kept absolute position. This commit aligns
comments with method definitions for consistency.
2016-09-14 18:26:32 +09:00
Rafael Mendonça França 55f9b8129a
Add three new rubocop rules
Style/SpaceBeforeBlockBraces
Style/SpaceInsideBlockBraces
Style/SpaceInsideHashLiteralBraces

Fix all violations in the repository.
2016-08-16 04:30:11 -03:00
Vijay Dev 8f26f31934 Fix a typo 2016-08-07 16:36:51 +05:30
Ryuta Kamizono 762e3f05f3 Add `Style/EmptyLines` in `.rubocop.yml` and remove extra empty lines 2016-08-07 17:50:59 +09:00
Xavier Noria 77eb40dab6 adds a few cops and sorts 2016-08-06 18:10:50 +02:00
Xavier Noria 58283b5acd explain the meaning of some RuboCop config options [ci skip]
For consistency mainly.

Also, some have a name that could make the reader think they
enforce the opposite of what they do, because the default is
not visible there.
2016-07-21 13:52:30 +02:00
Rafael Mendonça França 0f96d01758
Add a new rule to rubocop 2016-07-20 00:35:11 -03:00
Rafael Mendonça França 2384317465
Enable a few more rubocop rules 2016-07-17 04:11:51 -03:00
Jon Moss 80e819586b
Move code style configuration files to root directory
I think these are meant to be in the root directory, not in
`/activerecord`? 😬

r? @sgrif

[ci skip]
2016-06-16 22:17:46 -04:00