summaryrefslogtreecommitdiff
path: root/.rubocop.yml
Commit message (Collapse)AuthorAgeFilesLines
* Change target Ruby version for Rubocop to 2.1.change-rubocop-to-2-1Adam Niedzielski2016-10-201-1/+1
| | | | | | | We have to use the lowest common denominator to check the supported syntax and in our case it is Ruby 2.1. Please note that it will not help with unsupported syntax in HAML files because they are not checked by Rubocop.
* Update RuboCop to 0.43.0 and update configurationrs-update-rubocopRobert Speicher2016-10-041-0/+4
| | | | | `Style/VariableNumber` is explicitly disabled because I don't think we care if we name a variable `var_1` or `var1`.
* Enable Lint/StringConversionInInterpolation cop and autocorrect offensesrs-string-conversion-in-interpolationRobert Speicher2016-10-031-0/+4
|
* Revert "Merge branch 'rs-update-rubocop-rspec' into 'master'"rs-revert-rubocop-rspec-1-7Robert Speicher2016-09-211-67/+10
| | | | | This reverts commit 70faf5fdfbfa0e427b12d4181a9302394974c3cf, reversing changes made to 2307eb84dcd1748cc231719017551111310d1bf9.
* Update `.rubocop.yml` for rubocop-rspec 1.7.0rs-update-rubocop-rspecRobert Speicher2016-09-151-10/+67
|
* Rubocop syntax 2.3Z.J. van de Weg2016-09-011-2/+5
|
* Merge branch 'rubocop/enable-more-cops-for-empty-lines' into 'master' Robert Speicher2016-08-081-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable some Rubocop cops related to new lines ## What does this MR do? This MR enabled two additional Rubocop cops: Keeps track of empty lines around block bodies. `Style/EmptyLinesAroundBlockBody` Keeps track of empty lines around method bodies. ` Style/EmptyLinesAroundMethodBody` See merge request !5637
| * Enable some Rubocop cops related to new linesGrzegorz Bizon2016-08-031-2/+2
| |
* | Merge branch 'rubocop/EmptyLinesAroundModuleBody' into 'master' Douwe Maan2016-08-081-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable Style/EmptyLinesAround Module/Class Body cop ## What does this MR do? Enable a new rubocop cops as discussed here: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/1877/diffs#note_13021078 ## Are there points in the code the reviewer needs to double check? May be a good idea to send a message to people to prevent `master` red because of the new cop. ## Why was this MR needed? We want to improve code style and not waste endbosses time checking style manually ## What are the relevant issue numbers? ## Screenshots (if relevant) ## Does this MR meet the acceptance criteria? - [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [ ] API support added - Tests - [ ] Added for this feature/bug - [ ] All builds are passing - [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if you do - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5692
| * | Enable Style/EmptyLinesAroundClassBody coprubocop/EmptyLinesAroundModuleBodyGabriel Mazetto2016-08-061-1/+1
| | |
| * | Enable Style/EmptyLinesAroundModuleBody copGabriel Mazetto2016-08-061-1/+1
| |/
* | Enable Style/SpaceAroundEqualsInParameterDefault coprubocop/SpaceAroundEqualsInParameterDefaultGabriel Mazetto2016-08-061-0/+4
|/
* Merge branch 'rubocop/enable-access-modifiers-cops' into 'master' Robert Speicher2016-07-291-0/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable Rubocop cops that check access modifiers ## What does this MR do? This MR enables Rubocop cops that detect methods that should be restricted but are the part of public API because of access modifiers used improperly. This also fixes existing offenses. ## Why was this MR needed? Some method in our codebase are public instead of being private because it is sometimes difficult to get it right without static analysis. ## What are the relevant issue numbers? See #17478 Closes #17372 See merge request !5014
| * Enable Rubocop cops for invalid access modifiersrubocop/enable-access-modifiers-copsGrzegorz Bizon2016-07-191-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enables following cops: Check for useless access modifiers Lint/UselessAccessModifier Checks for attempts to use `private` or `protected` to set the visibility of a class method, which does not work. Lint/IneffectiveAccessModifier This also disables two false possitives in concerns.
* | Enable Style/MultilineTernaryOperator rubocop coprubocop/enable-multiline-ternary-operator-copGrzegorz Bizon2016-07-201-0/+4
|/ | | | | | Avoid multi-line ?: (the ternary operator). Use if/unless instead. See #17478
* Disable two cops as recommended.Connor Shea2016-07-131-0/+8
|
* Remove some disabled cops.Connor Shea2016-07-131-361/+2
|
* Update rubocop to 0.41.2Z.J. van de Weg2016-07-131-4/+2
| | | | https://github.com/bbatsov/rubocop/blob/v0.41.2/CHANGELOG.md
* Enable Style/IdenticalConditionalBranches Rubocop copGrzegorz Bizon2016-07-081-1/+1
|
* Enable Style/EmptyLines cop, remove redundant onesrubocop/enable-cops-for-empty-linesGrzegorz Bizon2016-07-011-1/+1
|
* Enable Style/UnneededCapitalW Rubocop coprubocop/enable-unneeded-capital-w-copGrzegorz Bizon2016-06-301-1/+1
|
* Merge branch 'rubocop/enable-space-after-cops' into 'master' Robert Speicher2016-06-291-2/+2
|\ | | | | | | | | | | | | Enable Style/SpaceAfterComma and Colon Rubocop cops See #17478 See merge request !4991
| * Enable Style/SpaceAfterComma Rubocop coprubocop/enable-space-after-copsGrzegorz Bizon2016-06-291-1/+1
| |
| * Enable Style/SpaceAfterColon Rubocop copsGrzegorz Bizon2016-06-291-1/+1
| |
* | Added RuboCop cops for checking DB migrationsmigration-copsYorick Peterse2016-06-291-1/+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.
* Merge branch 'style/enable-multiline-block-chain-rubocop-cop' into 'master' Robert Speicher2016-06-131-1/+1
|\ | | | | | | | | | | | | | | | | Enable Style/MultilineBlockChain rubocop style cop Avoid multi-line chains of blocks. See #17478. See merge request !4349
| * Enable Style/MultilineBlockChain rubocop style copstyle/enable-multiline-block-chain-rubocop-copGrzegorz Bizon2016-06-101-1/+1
| | | | | | | | See #17478
* | Enable RuboCop for migrationsenable-rubocop-for-migrationsSean McGivern2016-06-091-1/+2
|/ | | | | | | Migrations shouldn't fail RuboCop checks - especially lint checks, such as the nested method check. To avoid changing code in existing migrations, add the magic comment to the top of each of them to skip that file.
* Merge branch 'rubocop/disable-uniq-before-pluck-cop' into 'master' Robert Speicher2016-06-081-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | Disable Rails/UniqBeforePluck rubocop cop Rails/UniqBeforePluck seems to have some bugs * https://github.com/bbatsov/rubocop/issues/3122 * https://github.com/bbatsov/rubocop/issues/3148 and we had some problems in EE with that https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/425#note_12245005 See merge request !4477
| * Disable Rails/UniqBeforePluck rubocop coprubocop/disable-uniq-before-pluck-copGrzegorz Bizon2016-06-041-0/+3
| |
* | Merge branch 'rubocop/enable-ambiguous-operator-rubocop-lint' into 'master' Robert Speicher2016-06-051-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | Enable Lint/AmbiguousOperator rubocop cop Enforce using parentheses if ambiguous operators are detected, like `header *some_method` or `array.select &:even?`. See #17478 See merge request !4454
| * Enable Lint/AmbiguousOperator rubocop coprubocop/enable-ambiguous-operator-rubocop-lintGrzegorz Bizon2016-06-031-1/+1
| | | | | | | | See #17478
* | Enable Style/EmptyLinesAroundAccessModifier rubocop coprubocop/enable-empty-lines-around-access-modifier-copGrzegorz Bizon2016-06-031-1/+1
|/ | | | See #17478
* Merge branch 'style/enable-semicolon-rubocop-cop' into 'master' Robert Speicher2016-06-011-1/+1
|\ | | | | | | | | | | | | | | | | Enable Style/Semicolon rubocop style cop Don't use semicolons to terminate expressions. See #17478. See merge request !4351
| * Enable Style/Semicolon rubocop style copstyle/enable-semicolon-rubocop-copGrzegorz Bizon2016-06-011-1/+1
| | | | | | | | See #17478
* | Merge branch 'rubocop/enable-style-for-cop' into 'master' Robert Speicher2016-06-011-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Enable Style/For rubocop cop > Do not use `for`, unless you know exactly why. Most of the time iterators should be used instead. `for` is implemented in terms of `each` (so you're adding a level of indirection), but with a twist - `for` doesn't introduce a new scope (unlike `each`) and variables defined in its block will be visible outside it. See #17478 See merge request !4397
| * | Enable Style/For rubocop coprubocop/enable-style-for-copGrzegorz Bizon2016-06-011-1/+1
| |/ | | | | | | | | | | Do not use for, unless you know exactly why. See #17478
* | Merge branch 'issue_15557' into 'master' Rémy Coutable2016-06-011-1/+1
|\ \ | |/ |/| | | | | | | | | Fix error 500 when sorting issues by milestone due date and filtering by labels fixes #15557 See merge request !4327
| * Add leading comment space copissue_15557Felipe Artur2016-05-311-1/+1
| |
* | Merge branch 'rubocop/enable-space-before-comma-cop' into 'master' Robert Speicher2016-05-301-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Enable Style/SpaceBeforeComma rubocop cop No spaces before commas. See #17478 See merge request !4360
| * | Enable Style/SpaceBeforeComma rubocop coprubocop/enable-space-before-comma-copGrzegorz Bizon2016-05-301-1/+1
| |/ | | | | | | | | | | No spaces before commas. See #17478
* | Merge branch 'rubocop/enable-performance-times-map-cop' into 'master' Robert Speicher2016-05-301-2/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Enable Performance/TimesMap Rubocop cop Use Array.new with a block instead of `.times.collect` / `.times.map`. See #17478 See merge request !4357
| * | Enable Performance/TimesMap Rubocop coprubocop/enable-performance-times-map-copGrzegorz Bizon2016-05-301-2/+1
| |/ | | | | | | | | | | Use Array.new with a block instead of `.times.collect` / `.times.map`. See #17478
* | Merge branch 'rubocop/enable-negatedif-style-cop' into 'master' Robert Speicher2016-05-301-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable Style/NegatedIf Rubocop cop Favor `unless` over `if` for negative conditions (or control flow ||). ```ruby # bad do_something if !some_condition # bad do_something if not some_condition # good do_something unless some_condition # good some_condition || do_something ``` See #17478 See merge request !4355
| * | Enable Style/NegatedIf Rubocop coprubocop/enable-negatedif-style-copGrzegorz Bizon2016-05-301-1/+1
| |/ | | | | | | | | | | | | Favor `unless` over `if` for negative conditions (or control flow ||). See #17478
* | Merge branch 'rubocop/enable-literal-in-condition-cop' into 'master' Robert Speicher2016-05-301-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Enable Lint/LiteralInCondition rubocop cop Detects literals used in conditions. See #17478 See merge request !4354
| * | Enable Lint/LiteralInCondition rubocop coprubocop/enable-literal-in-condition-copGrzegorz Bizon2016-05-301-1/+1
| |/ | | | | | | | | | | Checks of literals used in conditions. See #17478
* | Merge branch 'style/enable-multiline-if-then-rubocop-cop' into 'master' Robert Speicher2016-05-301-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Enable Style/MultilineIfThen rubocop cop Do not use then for multi-line if. See #7478. See merge request !4353
| * | Enable Style/MultilineIfThen rubocop copstyle/enable-multiline-if-then-rubocop-copGrzegorz Bizon2016-05-301-1/+1
| |/ | | | | | | | | | | Do not use then for multi-line if. See #7478.
* | Merge branch 'style/enable-method-def-parentheses-rubocop-cop' into 'master' Robert Speicher2016-05-301-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Enable Style/MethodDefParentheses rubocop cop Use def with parentheses when there are parameters. See #17478 See merge request !4352