Skip to content

Commit

Permalink
Merge pull request #57 from Shopify/ryanb-no-autocorrect-migrations
Browse files Browse the repository at this point in the history
Exclude files in `db/migrate` from `ForbidSuperclassConstLiteral`
  • Loading branch information
RyanBrushett authored Mar 16, 2021
2 parents 74b3e86 + c108e74 commit d53345e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 4 additions & 2 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ Sorbet/ForbidSuperclassConstLiteral:
Description: 'Forbid superclasses which are non-literal constants.'
Enabled: false
VersionAdded: 0.2.0
VersionChanged: 0.5.0
VersionChanged: 0.6.1
Exclude:
- db/migrate/*.rb

Sorbet/ForbidUntypedStructProps:
Description: >-
Expand Down Expand Up @@ -99,7 +101,7 @@ Sorbet/KeywordArgumentOrdering:
Enabled: true
VersionAdded: 0.2.0

Sorbet/OnedAncestorPerLine:
Sorbet/OneAncestorPerLine:
Description: 'Enforces one ancestor per call to requires_ancestor'
Enabled: false
VersionAdded: '0.6.0'
Expand Down
10 changes: 8 additions & 2 deletions manual/cops_sorbet.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,16 @@ No documentation

Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged
--- | --- | --- | --- | ---
Disabled | Yes | No | 0.2.0 | 0.5.0
Disabled | Yes | No | 0.2.0 | 0.6.1

No documentation

### Configurable attributes

Name | Default value | Configurable values
--- | --- | ---
Exclude | `db/migrate/*.rb` | Array

## Sorbet/ForbidUntypedStructProps

Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged
Expand Down Expand Up @@ -296,7 +302,7 @@ def foo(b:, a: 1); end
Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged
--- | --- | --- | --- | ---
Enabled | Yes | Yes | - | -
Disabled | Yes | Yes | 0.6.0 | -
This cop ensures one ancestor per requires_ancestor line
rather than chaining them as a comma-separated list.
Expand Down

0 comments on commit d53345e

Please sign in to comment.