1. 12 Jan, 2018 1 commit
  2. 11 Jan, 2018 1 commit
  3. 22 Dec, 2017 1 commit
  4. 13 Dec, 2017 1 commit
  5. 11 Dec, 2017 1 commit
    • Sean McGivern's avatar
      Add cop for use of remove_column · 1f17bdef3a64
      Sean McGivern authored
      remove_column should only be used in the up (or change) step of a migration if
      it's a post-deployment migration. Otherwise there will be downtime due to the
      ActiveRecord column cache, which we can avoid by using the IgnorableColumn
      concern in combination with a post-deployment migration.
      1f17bdef3a64
  6. 22 Nov, 2017 1 commit
  7. 21 Nov, 2017 1 commit
  8. 17 Nov, 2017 2 commits
    • Lin Jen-Shin's avatar
      Allow initialize method and single ivar · 9edc4181c881
      Lin Jen-Shin authored
      9edc4181c881
    • Sean McGivern's avatar
      Prevent update_column_in_batches on large tables · c4bf67b6300e
      Sean McGivern authored
      add_column_with_default is implemented in terms of update_column_in_batches, but
      update_column_in_batches can be used independently. Neither of these should be
      used on the specified large tables, because they will cause issues on large
      instances like GitLab.com.
      
      This also ignores the cop for all existing migrations, renaming
      AddColumnWithDefaultToLargeTable where appropriate.
      c4bf67b6300e
  9. 16 Nov, 2017 1 commit
  10. 21 Oct, 2017 1 commit
  11. 18 Oct, 2017 1 commit
  12. 10 Oct, 2017 1 commit
  13. 07 Oct, 2017 1 commit
    • Jacopo's avatar
      Replaces `tag: true` into `:tag` in the specs · f4ef7328afe4
      Jacopo authored
      Replaces all the explicit include metadata syntax in the specs (tag:
      true) into the implicit one (:tag).
      Added a cop to prevent future errors and handle autocorrection.
      f4ef7328afe4
  14. 18 Sep, 2017 2 commits
  15. 14 Aug, 2017 1 commit
  16. 14 Jul, 2017 1 commit
  17. 07 Jul, 2017 2 commits
    • Yorick Peterse's avatar
      Added EachBatch for iterating tables in batches · 843dd6ceff61
      Yorick Peterse authored
      This module provides a class method called `each_batch` that can be used
      to iterate tables in batches in a more efficient way compared to Rails'
      `in_batches` method. This commit also includes a RuboCop cop to
      blacklist the use of `in_batches` in favour of this new method.
      843dd6ceff61
    • Yorick Peterse's avatar
      Added EachBatch for iterating tables in batches · 6ab91e2c0aae
      Yorick Peterse authored
      This module provides a class method called `each_batch` that can be used
      to iterate tables in batches in a more efficient way compared to Rails'
      `in_batches` method. This commit also includes a RuboCop cop to
      blacklist the use of `in_batches` in favour of this new method.
      6ab91e2c0aae
  18. 06 Jul, 2017 3 commits
    • Douwe Maan's avatar
      Add ProjectPathHelper cop · 181380437044
      Douwe Maan authored
      181380437044
    • Yorick Peterse's avatar
      Rename ActiverecordSerialize cop · 7ad2610c921d
      Yorick Peterse authored
      This cop has been renamed to ActiveRecordSerialize to match the way
      "ActiveRecord" is usually written.
      7ad2610c921d
    • Yorick Peterse's avatar
      Added Cop to blacklist the use of `dependent:` · ccb23d8870a8
      Yorick Peterse authored
      This is allowed for existing instances so we don't end up 76 offenses
      right away, but for new code one should _only_ use this if they _have_
      to remove non database data. Even then it's usually better to do this in
      a service class as this gives you more control over how to remove the
      data (e.g. in bulk).
      ccb23d8870a8
  19. 05 Jul, 2017 1 commit
  20. 21 Jun, 2017 1 commit
  21. 14 Jun, 2017 2 commits
  22. 13 Jun, 2017 1 commit
  23. 07 Jun, 2017 1 commit
  24. 06 Jun, 2017 1 commit
  25. 31 May, 2017 1 commit
  26. 29 May, 2017 1 commit
  27. 28 Apr, 2017 2 commits
  28. 05 Apr, 2017 1 commit
  29. 07 Mar, 2017 1 commit
  30. 01 Mar, 2017 1 commit
    • Sean McGivern's avatar
      Add RuboCop cop for custom error classes · c8efec8d1471
      Sean McGivern authored
      From the Ruby style guide:
      
          # bad
          class FooError < StandardError
          end
      
          # okish
          class FooError < StandardError; end
      
          # good
          FooError = Class.new(StandardError)
      
      This cop does that, but only for error classes (classes where the
      superclass ends in 'Error'). We have empty controllers and models, which
      are perfectly valid empty classes.
      c8efec8d1471
  31. 10 Feb, 2017 1 commit
    • Yorick Peterse's avatar
      Enforce use of add_concurrent_foreign_key · fa4928eb97ca
      Yorick Peterse authored
      This adds a Rubocop rule to enforce the use of
      add_concurrent_foreign_key instead of the regular add_foreign_key
      method. This cop has been disabled for existing migrations so we don't
      need to change those.
      fa4928eb97ca
  32. 09 Feb, 2017 1 commit
  33. 08 Feb, 2017 1 commit