Skip to content

Releases: RamseyInHouse/ramsey-cop

Release 0.7.1

18 Jan 19:48
Compare
Choose a tag to compare

fc18a33

Add EnforcedStyle: mixed to Style/RegexpLiteral

Release 0.7.0

11 Jan 21:20
Compare
Choose a tag to compare

Style/RegexpLiteral

#37

Style/RegexpLiteral:
  AllowInnerSlashes: true

https://rubocop.readthedocs.io/en/latest/cops_style/#styleregexpliteral

# good
x =~ /home\//

Bump Rubocop dependency to 0.52.1

73b5d4f

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

28 Sep 20:07
Compare
Choose a tag to compare

Disable Style/FrozenStringLiteralComment cop

Release 0.6.0

25 Sep 21:41
Compare
Choose a tag to compare

Bump rubocop dependency to 0.50 to stay current with the community

Disable Style/Lambda Cop

Release 0.5.0

28 Aug 13:22
Compare
Choose a tag to compare

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

15 Aug 15:32
Compare
Choose a tag to compare
  • 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 to 120
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

08 Aug 13:21
Compare
Choose a tag to compare

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

28 Jul 13:52
Compare
Choose a tag to compare

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

26 Jul 15:47
Compare
Choose a tag to compare
RamseyCop 0.1.0.pre Pre-release
Pre-release

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.