Releases: RamseyInHouse/ramsey-cop
Release 0.7.1
Add EnforcedStyle: mixed
to Style/RegexpLiteral
Release 0.7.0
Style/RegexpLiteral
Style/RegexpLiteral:
AllowInnerSlashes: true
https://rubocop.readthedocs.io/en/latest/cops_style/#styleregexpliteral
# good
x =~ /home\//
Bump Rubocop dependency to 0.52.1
https://github.com/bbatsov/rubocop/releases/tag/v0.51.0
https://github.com/bbatsov/rubocop/releases/tag/v0.52.0
and
https://github.com/bbatsov/rubocop/releases/tag/v0.52.1
A couple of changes that looked interesting.
Layout/ClassStructure - disabled by default
rubocop/rubocop/pull/5065
Style/StringHashKeys
rubocop/rubocop#4650
Release 0.6.1
Disable Style/FrozenStringLiteralComment cop
- Discussion #29
- Definition https://rubocop.readthedocs.io/en/latest/cops_style/#stylefrozenstringliteralcomment
Release 0.6.0
Bump rubocop dependency to 0.50
to stay current with the community
- rubocop
0.50
release notes https://github.com/bbatsov/rubocop/releases/tag/v0.50.0
Disable Style/Lambda
Cop
- Discussion #27
- Definition https://rubocop.readthedocs.io/en/latest/cops_style/#stylelambda
Release 0.5.0
Disable Style/NumericLiterals
Style/NumericLiterals:
Enabled: false
Drops the requirement to use underscores to improve readability of large numeric literals
1000000
versus 1_000_000
Style/AndOr:
EnforcedStyle: conditionals
Enables check only in conditionals for uses of and
and or
, and suggests using &&
and ||
instead.
# EnforcedStyle: conditionals
# good
foo.save && return
foo.save and return
if foo && bar
# bad
if foo and bar
Exclude specific cops from test directories
Metrics/AbcSize:
Exclude:
- spec/**/*
- test/**/*
Disables check that the ABC size of methods is not higher than the configured maximum for tests.
Metrics/BlockLength:
Exclude:
- spec/**/*
- test/**/*
Disables check on tests that the length of a block exceeds our maximum value.
Metrics/BlockNesting:
Exclude:
- spec/**/*
- test/**/*
Disables check in tests for excessive nesting of conditional and looping constructs.
Metrics/CyclomaticComplexity:
Exclude:
- spec/**/*
- test/**/*
Disables check in tests for high Cyclomatic Complexity
Metrics/MethodLength:
Exclude:
- spec/**/*
- test/**/*
Disables check in tests that the length of a method exceeds our maximum value.
Miscellaneous
- Add recommendation to use
--auto-correct
when adding RamseyCop to an existing repo. - Update PR process document
Release 0.4.0
- Prefer
alias_method
alias_method :new_name, :old_name
# vs
alias new_name old_name
Style/Alias:
EnforcedStyle: prefer_alias_method
- Change max line length from
100
to120
Metrics/LineLength:
Max: 120
- Update generator so that
.rubocop.yml
is created in the project root rather than/config
- Add a documentation directory
Release 0.3.0
Now use a generator to create the appropriate .rubocop.yml
when adding RamseyCop
to a new project.
rails generate ramsey_cop
Creates a .rubocop.yml
in the root of your project with the following details
inherit_gem:
ramsey_cop:
- default.yml
Release 0.2.0
Suppressing Missing top-level class documentation warning.
Documentation:
Enabled: false
Prefer parentheses to brackets or curly brackets for percent literals.
Style/PercentLiteralDelimiters:
PreferredDelimiters:
'%i': ()
'%I': ()
'%q': ()
'%Q': ()
'%r': '{}'
'%s': ()
'%w': ()
'%W': ()
'%x': ()
Prefer that access modifiers (private
and protected
) be outdented (at the same level as class
)
Layout/AccessModifierIndentation:
EnforcedStyle: outdent
RamseyCop 0.1.0.pre
The goal of RamseyCop is to provide a standard version of Rubocop and a standard default Rubocop config that adheres to our dev-standards.
0.1.0.pre only has two overrides defined in default.yml and we need your help.
We need a few people to pull this gem into their project, remove all existing Rubocop overrides, and update the RamseyCop default.yml
where appropriate. See CONTRIBUTING for more details.
We will use the pull request flow to check the overrides against our dev-standards and update accordingly.