BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
da5943fc
Commit
da5943fc
authored
May 23, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enabled multiple Rubocop cops that can be enabled
This enables multiple Rubocop cops that already conform to our codebase and do not require fixes.
parent
d3fd5857
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
34 deletions
+31
-34
.rubocop.yml
.rubocop.yml
+31
-34
No files found.
.rubocop.yml
View file @
da5943fc
...
...
@@ -755,19 +755,19 @@ Lint/BlockAlignment:
# Default values in optional keyword arguments and optional ordinal arguments
# should not refer back to the name of the argument.
Lint/CircularArgumentReference
:
Enabled
:
fals
e
Enabled
:
tru
e
# Checks for condition placed in a confusing position relative to the keyword.
Lint/ConditionPosition
:
Enabled
:
fals
e
Enabled
:
tru
e
# Check for debugger calls.
Lint/Debugger
:
Enabled
:
fals
e
Enabled
:
tru
e
# Align ends corresponding to defs correctly.
Lint/DefEndAlignment
:
Enabled
:
fals
e
Enabled
:
tru
e
# Check for deprecated class method calls.
Lint/DeprecatedClassMethods
:
...
...
@@ -783,15 +783,15 @@ Lint/DuplicatedKey:
# Check for immutable argument given to each_with_object.
Lint/EachWithObjectArgument
:
Enabled
:
fals
e
Enabled
:
tru
e
# Check for odd code arrangement in an else block.
Lint/ElseLayout
:
Enabled
:
fals
e
Enabled
:
tru
e
# Checks for empty ensure block.
Lint/EmptyEnsure
:
Enabled
:
fals
e
Enabled
:
tru
e
# Checks for empty string interpolation.
Lint/EmptyInterpolation
:
...
...
@@ -799,37 +799,36 @@ Lint/EmptyInterpolation:
# Align ends correctly.
Lint/EndAlignment
:
Enabled
:
fals
e
Enabled
:
tru
e
# END blocks should not be placed inside method definitions.
Lint/EndInMethod
:
Enabled
:
fals
e
Enabled
:
tru
e
# Do not use return in an ensure block.
Lint/EnsureReturn
:
Enabled
:
fals
e
Enabled
:
tru
e
# The use of eval represents a serious security risk.
Lint/Eval
:
Enabled
:
fals
e
Enabled
:
tru
e
# Catches floating-point literals too large or small for Ruby to represent.
Lint/FloatOutOfRange
:
Enabled
:
fals
e
Enabled
:
tru
e
# The number of parameters to format/sprint must match the fields.
Lint/FormatParameterMismatch
:
Enabled
:
fals
e
Enabled
:
tru
e
# Don't suppress exception.
Lint/HandleExceptions
:
Enabled
:
false
# TODO: Enable ImplicitStringConcatenation Cop.
# Checks for adjacent string literals on the same line, which could better be
# represented as a single string literal.
Lint/ImplicitStringConcatenation
:
Enabled
:
fals
e
Enabled
:
tru
e
# TODO: Enable IneffectiveAccessModifier Cop.
# Checks for attempts to use `private` or `protected` to set the visibility
...
...
@@ -840,7 +839,7 @@ Lint/IneffectiveAccessModifier:
# Checks for invalid character literals with a non-escaped whitespace
# character.
Lint/InvalidCharacterLiteral
:
Enabled
:
fals
e
Enabled
:
tru
e
# Checks of literals used in conditions.
Lint/LiteralInCondition
:
...
...
@@ -848,7 +847,7 @@ Lint/LiteralInCondition:
# Checks for literals used in interpolation.
Lint/LiteralInInterpolation
:
Enabled
:
fals
e
Enabled
:
tru
e
# Use Kernel#loop with break rather than begin/end/until or begin/end/while
# for post-loop tests.
...
...
@@ -857,11 +856,11 @@ Lint/Loop:
# Do not use nested method definitions.
Lint/NestedMethodDefinition
:
Enabled
:
fals
e
Enabled
:
tru
e
# Do not omit the accumulator when calling `next` in a `reduce`/`inject` block.
Lint/NextWithoutAccumulator
:
Enabled
:
fals
e
Enabled
:
tru
e
# Checks for method calls with a space before the opening parenthesis.
Lint/ParenthesesAsGroupedExpression
:
...
...
@@ -870,11 +869,11 @@ Lint/ParenthesesAsGroupedExpression:
# Checks for `rand(1)` calls. Such calls always return `0` and most likely
# a mistake.
Lint/RandOne
:
Enabled
:
fals
e
Enabled
:
tru
e
# Use parentheses in the method call to avoid confusion about precedence.
Lint/RequireParentheses
:
Enabled
:
fals
e
Enabled
:
tru
e
# Avoid rescuing the Exception class.
Lint/RescueException
:
...
...
@@ -909,7 +908,7 @@ Lint/UnusedMethodArgument:
# Unreachable code.
Lint/UnreachableCode
:
Enabled
:
fals
e
Enabled
:
tru
e
# Checks for useless access modifiers.
Lint/UselessAccessModifier
:
...
...
@@ -921,19 +920,19 @@ Lint/UselessAssignment:
# Checks for comparison of something with itself.
Lint/UselessComparison
:
Enabled
:
fals
e
Enabled
:
tru
e
# Checks for useless `else` in `begin..end` without `rescue`.
Lint/UselessElseWithoutRescue
:
Enabled
:
fals
e
Enabled
:
tru
e
# Checks for useless setter call to a local variable.
Lint/UselessSetterCall
:
Enabled
:
fals
e
Enabled
:
tru
e
# Possible use of operator/literal/variable in void context.
Lint/Void
:
Enabled
:
fals
e
Enabled
:
tru
e
##################### Performance ############################
...
...
@@ -942,11 +941,10 @@ Lint/Void:
Performance/Casecmp
:
Enabled
:
true
# TODO: Enable DoubleStartEndWith Cop.
# Use `str.{start,end}_with?(x, ..., y, ...)` instead of
# `str.{start,end}_with?(x, ...) || str.{start,end}_with?(y, ...)`.
Performance/DoubleStartEndWith
:
Enabled
:
fals
e
Enabled
:
tru
e
# TODO: Enable EndWith Cop.
# Use `end_with?` instead of a regex match anchored to the end of a string.
...
...
@@ -980,10 +978,9 @@ Performance/RedundantMerge:
MaxKeyValuePairs
:
2
Enabled
:
false
# TODO: Enable RedundantSortBy Cop.
# Use `sort` instead of `sort_by { |x| x }`.
Performance/RedundantSortBy
:
Enabled
:
fals
e
Enabled
:
tru
e
# Use `start_with?` instead of a regex match anchored to the beginning of a
# string.
...
...
@@ -1024,11 +1021,11 @@ Rails/Delegate:
# Prefer `find_by` over `where.first`.
Rails/FindBy
:
Enabled
:
fals
e
Enabled
:
tru
e
# Prefer `all.find_each` over `all.find`.
Rails/FindEach
:
Enabled
:
fals
e
Enabled
:
tru
e
# Prefer has_many :through to has_and_belongs_to_many.
Rails/HasAndBelongsToMany
:
...
...
@@ -1040,7 +1037,7 @@ Rails/Output:
# Checks for incorrect grammar when using methods like `3.day.ago`.
Rails/PluralizationGrammar
:
Enabled
:
fals
e
Enabled
:
tru
e
# Checks for `read_attribute(:attr)` and `write_attribute(:attr, val)`.
Rails/ReadWriteAttribute
:
...
...
@@ -1048,7 +1045,7 @@ Rails/ReadWriteAttribute:
# Checks the arguments of ActiveRecord scopes.
Rails/ScopeArgs
:
Enabled
:
fals
e
Enabled
:
tru
e
# Checks the correct usage of time zone aware methods.
# http://danilenko.org/2012/7/6/rails_timezones
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment