summaryrefslogtreecommitdiff
path: root/rubocop/rubocop.rb
Commit message (Collapse)AuthorAgeFilesLines
* Added Cop to blacklist polymorphic associationsYorick Peterse2017-06-071-0/+1
| | | | | | | | 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/+1
| | | | explicitly set 'status' in 'destroy' actions of controllers
* Added Cop to blacklist the use of serializedocument-not-using-serializeYorick Peterse2017-05-311-0/+1
| | | | | 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/+1
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Add AddColumnWithDefaultToLargeTable copRobert Speicher2017-04-281-0/+1
|
* Rename AddColumnWithDefault to ReversibleAddColumnWithDefaultRobert Speicher2017-04-281-1/+1
| | | | | 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-061-0/+2
|
* Add cop to ensure reversibility of add_concurrent_indexDouwe Maan2017-03-071-0/+1
|
* Enable and autocorrect the CustomErrorClass copSean McGivern2017-03-011-0/+1
|
* Enforce use of add_concurrent_foreign_keyconcurrent-foreign-keysYorick Peterse2017-02-101-0/+1
| | | | | | | 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-2/+2
|
* Explicitly require rubocop migration_helpersdm-add-column-with-default-copDouwe Maan2017-02-081-1/+0
|
* Add cop that checks if add_column_with_default is used with up/down methodsDouwe Maan2017-02-081-1/+2
|
* cop for gem fetched from a git sourceAdam Pahlevi2017-01-311-0/+1
| | | | | | code fix for aesthetic & conventions remove unused proc
* Added RuboCop cops for checking DB migrationsmigration-copsYorick Peterse2016-06-291-0/+3
There are currently two cops for this: * Migration/AddIndex: checks if indexes are added concurrently * Migration/ColumnWithDefault: checks if columns with default values are added in a concurrent manner Both cops are fairly simple and make no attempt at correcting the code as this is quite hard to do (e.g. modifications may need to be applied in various places in the same file). They however should provide enough to catch people ignoring the comments in generated migrations telling them to use add_concurrent_index or add_column_with_default.