summaryrefslogtreecommitdiff
path: root/spec/rubocop
Commit message (Collapse)AuthorAgeFilesLines
* Add database helpers 'add_timestamps_with_timezone' and ↵32054-rails-should-use-timestamptz-database-type-for-postgresqlblackst0ne2017-06-133-0/+279
| | | | 'timestamps_with_timezone'
* Added Cop to blacklist polymorphic associationsYorick Peterse2017-06-072-2/+35
| | | | | | | | One should really use a separate table instead of using polymorphic associations. See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11168 for more information.
* Add a rubocop rule to check if a method 'redirect_to' is used without ↵31840-add-a-rubocop-that-forbids-redirect_to-inside-a-controller-destroy-action-without-an-explicit-statusblackst0ne2017-06-071-0/+86
| | | | explicitly set 'status' in 'destroy' actions of controllers
* Added Cop to blacklist the use of serializedocument-not-using-serializeYorick Peterse2017-05-311-0/+33
| | | | | This Cop blacklists the use of ActiveRecord's "serialize" method, except for cases where we already use this.
* New Migration/UpdateColumnInBatches copRémy Coutable2017-05-291-0/+94
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Add AddColumnWithDefaultToLargeTable copRobert Speicher2017-04-281-0/+44
|
* Rename AddColumnWithDefault to ReversibleAddColumnWithDefaultRobert Speicher2017-04-281-2/+2
| | | | | We're going to add another cop that deals with another aspect of `add_column_with_default`, so we need to separate them.
* Add remove_concurrent_index to database helperblackst0ne2017-04-062-0/+76
|
* Add cop to ensure reversibility of add_concurrent_indexDouwe Maan2017-03-071-0/+41
|
* Add RuboCop cop for custom error classesSean McGivern2017-03-011-0/+111
| | | | | | | | | | | | | | | | | | 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.
* Enforce use of add_concurrent_foreign_keyconcurrent-foreign-keysYorick Peterse2017-02-101-0/+33
| | | | | | | 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.
* Add a spec for our custom GemFetcher coprs-gemfetcher-cop-specRobert Speicher2017-02-091-0/+46
|
* Add cop that checks if add_column_with_default is used with up/down methodsDouwe Maan2017-02-081-0/+41