tasks/integration.rake
Avoid the use of Perl-style backrefs. (https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers) Open
Open
rails_version = $1
- Read upRead up
- Exclude checks
This cop looks for uses of Perl-style regexp match backreferences like $1, $2, etc.
Example:
# bad
puts $1
# good
puts Regexp.last_match(1)
Add an empty line after magic comments. (https://github.com/bbatsov/ruby-style-guide#separate-magic-comments-from-code) Open
Open
desc "run integration specs"
- Read upRead up
- Exclude checks
Checks for a newline after the final magic comment.
Example:
# good
# frozen_string_literal: true
# Some documentation for Person
class Person
# Some code
end
# bad
# frozen_string_literal: true
# Some documentation for Person
class Person
# Some code
end
Line is too long. [185/120] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
Open
sh "RAILS_VERSION=#{rails_version} MOCK_DIR=#{mock_dir} MUTE_PROGRESS_BAR=true ERROR_VERBOSITY=#{error_verbosity} BUNDLE_GEMFILE=#{gemfile} bundle exec rake active_mocker:build"
- Exclude checks
end
at 10, 15 is not aligned with if
at 6, 32. Open
Open
end
- Read upRead up
- Exclude checks
This cop checks whether the end keywords are aligned properly.
Three modes are supported through the EnforcedStyleAlignWith
configuration parameter:
If it's set to keyword
(which is the default), the end
shall be aligned with the start of the keyword (if, class, etc.).
If it's set to variable
the end
shall be aligned with the
left-hand-side of the variable assignment, if there is one.
If it's set to start_of_line
, the end
shall be aligned with the
start of the line where the matching keyword appears.
Example: EnforcedStyleAlignWith: keyword (default)
# bad
variable = if true
end
# good
variable = if true
end
Example: EnforcedStyleAlignWith: variable
# bad
variable = if true
end
# good
variable = if true
end
Example: EnforcedStyleAlignWith: startofline
# bad
variable = if true
end
# good
puts(if true
end)