Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-05-25Remove unneeded indentation from RuboCop configRobert Speicher
[ci skip]
2016-05-25Enable multiple compatible Rubocop copsGrzegorz Bizon
Closes #17406
2016-05-23Add descriptive comments for rubocop-rspec copsRobert Speicher
[ci skip]
2016-05-23Add rubocop-rspecRobert Speicher
Almost all cops are starting as disabled until we can fix their violations.
2016-05-23Merge branch 'complexity/enable-multiple-rubocop-cops' into 'master' Robert Speicher
Enable multiple Rubocop cops that can be enabled See https://gitlab.com/gitlab-org/gitlab-ce/issues/17406 This enabled following cops: ```text Lint/CircularArgumentReference: Description: Default values in optional keyword arguments and optional ordinal arguments ---------------- Lint/ConditionPosition: Description: Checks for condition placed in a confusing position relative to the keyword. StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition ---------------- Lint/Debugger: Description: Check for debugger calls. ---------------- Lint/DefEndAlignment: Description: Align ends corresponding to defs correctly. ---------------- Lint/DuplicateMethods: Description: Check for duplicate method definitions. ---------------- Lint/DuplicatedKey: Description: Check for duplicate keys in hash literals. ---------------- Lint/EachWithObjectArgument: Description: Check for immutable argument given to each_with_object. ---------------- Lint/ElseLayout: Description: Check for odd code arrangement in an else block. ---------------- Lint/EmptyEnsure: Description: Checks for empty ensure block. ---------------- Lint/EmptyInterpolation: Description: Checks for empty string interpolation. ---------------- Lint/EndAlignment: Description: Align ends correctly. ---------------- Lint/EndInMethod: Description: END blocks should not be placed inside method definitions. ---------------- Lint/EnsureReturn: Description: Do not use return in an ensure block. StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-return-ensure ---------------- Lint/Eval: Description: The use of eval represents a serious security risk. ---------------- Lint/FloatOutOfRange: Description: Catches floating-point literals too large or small for Ruby to represent. ---------------- Lint/FormatParameterMismatch: Description: The number of parameters to format/sprint must match the fields. ---------------- Lint/ImplicitStringConcatenation: Description: Checks for adjacent string literals on the same line, which could better be represented as a single string literal. ---------------- Lint/InvalidCharacterLiteral: Description: Checks for invalid character literals with a non-escaped whitespace character. ---------------- Lint/LiteralInInterpolation: Description: Checks for literals used in interpolation. ---------------- Lint/NestedMethodDefinition: Description: Do not use nested method definitions. StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-methods ---------------- Lint/NextWithoutAccumulator: Description: Do not omit the accumulator when calling `next` in a `reduce`/`inject` block. ---------------- Lint/RandOne: Description: Checks for `rand(1)` calls. Such calls always return `0` and most likely a mistake. ---------------- Lint/RequireParentheses: Description: Use parentheses in the method call to avoid confusion about precedence. ---------------- Lint/UnreachableCode: Description: Unreachable code. ---------------- Lint/UselessComparison: Description: Checks for comparison of something with itself. ---------------- Lint/UselessElseWithoutRescue: Description: Checks for useless `else` in `begin..end` without `rescue`. ---------------- Lint/UselessSetterCall: Description: Checks for useless setter call to a local variable. ---------------- Lint/Void: Description: Possible use of operator/literal/variable in void context. ---------------- Performance/DoubleStartEndWith: Description: Use `str.{start,end}_with?(x, ..., y, ...)` instead of `str.{start,end}_with?(x, ...) || str.{start,end}_with?(y, ...)`. ---------------- Performance/RedundantSortBy: Description: Use `sort` instead of `sort_by { |x| x }`. ---------------- Rails/FindBy: Description: Prefer find_by over where.first. Include: - app/models/**/*.rb ---------------- Rails/FindEach: Description: Prefer all.find_each over all.find. Include: - app/models/**/*.rb ---------------- Rails/PluralizationGrammar: Description: Checks for incorrect grammar when using methods like `3.day.ago`. ---------------- Rails/ScopeArgs: Description: Checks the arguments of ActiveRecord scopes. Include: - app/models/**/*.rb ``` See merge request !4261
2016-05-23Merge branch 'rs-space-around-keyword' into 'master' Robert Speicher
Enable Style/SpaceAroundKeyword cop and fix offenses Ref: https://gitlab.com/gitlab-org/gitlab-ce/issues/17478 See merge request !4259
2016-05-23Merge branch 'rs-update-rubocop' into 'master' Robert Speicher
Update rubocop to 0.40.0 See merge request !4258
2016-05-23Merge branch 'complexity/rubocop-style-loop' into 'master' Robert Speicher
Enable Style/InfiniteLoop Rubocop cop This MR enabled Style/InfiniteLoop Rubocop cop, and fixes offenses. See https://gitlab.com/gitlab-org/gitlab-ce/issues/17478 See merge request !4257
2016-05-23Enabled multiple Rubocop cops that can be enabledGrzegorz Bizon
This enables multiple Rubocop cops that already conform to our codebase and do not require fixes.
2016-05-23Merge branch 'rs-range-include' into 'master' Robert Speicher
Enable Performance/RangeInclude cop and fix single offense Ref: https://gitlab.com/gitlab-org/gitlab-ce/issues/17478 See merge request !4255
2016-05-23Enable Style/SpaceAroundKeyword cop and fix offensesRobert Speicher
2016-05-23Merge branch 'rs-start-with' into 'master' Robert Speicher
Enable Performance/StartWith cop and fix offenses Ref: https://gitlab.com/gitlab-org/gitlab-ce/issues/17478 See merge request !4256
2016-05-23Update rubocop to 0.40.0Robert Speicher
2016-05-23Enable Style/InfiniteLoop Rubocop copGrzegorz Bizon
2016-05-23Enable Performance/StartWith cop and fix offensesRobert Speicher
2016-05-23Enable Performance/RangeInclude cop and fix single offenseRobert Speicher
2016-05-23Enable Style/DefWithParentheses cop and fix single offenseRobert Speicher
2016-05-19Updated Rubocop for generator_templates/Yorick Peterse
2016-05-19Merge branch 'migration-helpers' into 'master' Robert Speicher
Added helper methods for database migrations These helpers can ultimately be used to write migrations that don't require downtime. See #15464 for more information. See merge request !3860
2016-05-13Require space around operatorsGabriel Mazetto
2016-05-13Merge branch 'deprecated-class-methods-cop' into 'master' Robert Speicher
Enable the Rubocop DeprecatedClassMethods cop This reports uses of `File.exists?` and `Dir.exists?`, which were both deprecated in Ruby and will eventually be removed in favor of `.exist?`. Also fixes all existing uses of the deprecated methods. See merge request !4087
2016-05-12Tell Rubocop to ignore lib/templatesYorick Peterse
2016-05-11Merge branch 'casecmp-cop' into 'master' Rémy Coutable
Enable Rubocop Casecmp Performance Cop. Also fixes the errors caused by enabling the cop. `casecmp` is more performant than `.downcase` and `==`. See also: https://github.com/bbatsov/rubocop/blob/master/lib/rubocop/cop/performance/casecmp.rb See merge request !3957
2016-05-11Enable the StringReplacement cop.Connor Shea
Also fix one use of `gsub` that would be faster as `delete`. Use `tr` instead of `gsub` when you are replacing the same number of characters. Use `delete` instead of `gsub` when you are deleting characters.
2016-05-11Enable Rubocop Casecmp Performance Cop.Connor Shea
Also fixes the errors caused by enabling the cop. casecmp is more performant than `.downcase` and `==`.
2016-05-09Enable the Rubocop DeprecatedClassMethods copConnor Shea
This reports uses of `File.exists?` and `Dir.exists?`, which were both deprecated in Ruby and will eventually be removed in favor of `.exist?`. Also fixes all existing uses of the deprecated methods.
2016-04-28Enable LstripRstrip copConnor Shea
This requires no code changes since it doesn't actually change anything in the codebase, just preventative.
2016-04-20Backport select_helper from EEValery Sizov
2016-04-11Decrease threshold for ABC Size metric in RubocopGrzegorz Bizon
To 60.
2016-03-21Update Rubocop from 0.35.1 to 0.38.0.connorshea
Discussed in #14233. See [their releases](https://github.com/bbatsov/rubocop/releases) for more info. Changes: - Enable DisplayCopNames for lint output. - Default behavior for `Alias` changed, set to enforce `prefer_alias_method`. - Enabling Rails cops changed to new syntax. - Remove StyleGuides and move Descriptions to comments. - Add missing cops. - Add TODOs for cops that should be enabled in the future. - Set TargetRubyVersion to 2.1.
2015-12-15Disabled Rails/Date copGabriel Mazetto
2015-12-15Updated .rubocop.yml to match 0.35.x changesGabriel Mazetto
2015-12-08Bump cyclomatic and perceived complexity threshold by oneGrzegorz Bizon
2015-12-08Enable rubocop metricsGrzegorz Bizon
This enables rubocop metrics like CyclomaticComplexity and ABCSize. Initial threshold values are high, should be probably decreased.
2015-11-25Enable the Lint/RescueException copRobert Speicher
2015-10-03Enable "UselessAssignment" rubocop lintGuilherme Garnier
2015-09-16fix rubocopValery Sizov
2015-09-15fix specs. Stage 5Valery Sizov
2015-06-22Enable rubocop for tests tooDmitriy Zaporozhets
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-04-20Fixed the Rails/ActionFilter copJeroen van Baarsen
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-04-15No tabs in code!Dmitriy Zaporozhets
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-03-25Style/RedundantReturn enabledDmitriy Zaporozhets
2015-03-25Enable more rubocop style checksDmitriy Zaporozhets
2015-03-03Enable ParenthesesAsGroupedExpression ruleDmitriy Zaporozhets
2015-02-03Rubocop: indentation fixes Yay!!!Dmitriy Zaporozhets
2015-02-03Rubocop: no trailing newlinesDmitriy Zaporozhets
2015-02-03Rubocop: Dont allow puts or print to stdoutDmitriy Zaporozhets
2015-02-03Rubocop: Style/ElseAlignment enabledDmitriy Zaporozhets
2015-02-03Rubocop: comment indentationDmitriy Zaporozhets
2015-02-03More rubocop rules enableDmitriy Zaporozhets