Skip to content

Commit

Permalink
Add cop configuration based on issue voting
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnbleeker committed Jan 20, 2020
1 parent 5c1b1f3 commit 8ab1fc7
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .rubocop-rails.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@ require: rubocop-rails
Rails:
Enabled: true

Rails/ApplicationController:
Enabled: true

Rails/ApplicationJob:
Enabled: false

Rails/ApplicationMailer:
Enabled: true

Rails/ApplicationRecord:
Enabled: false

Expand All @@ -15,6 +21,9 @@ Rails/BelongsTo:
Rails/Date:
EnforcedStyle: flexible

Rails/EnumHash:
Enabled: true

Rails/HasAndBelongsToMany:
Enabled: false

Expand All @@ -33,6 +42,12 @@ Rails/LinkToBlank:
Rails/OutputSafety:
Enabled: false

Rails/RakeEnvironment:
Enabled: false

Rails/SafeNavigationWithBlank:
Enabled: true

Rails/SkipsModelValidations:
Enabled: false

Expand Down
19 changes: 19 additions & 0 deletions .rubocop-rspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ FactoryBot/CreateList:
Enabled: true
EnforcedStyle: create_list

FactoryBot/FactoryClassName:
Enabled: true

Rails/HttpStatus:
Enabled: true
EnforcedStyle: symbolic
Expand All @@ -38,6 +41,9 @@ RSpec/BeEql:
RSpec/BeforeAfterAll:
Enabled: true

RSpec/ContextMethod:
Enabled: true

RSpec/ContextWording:
Enabled: true

Expand All @@ -54,6 +60,13 @@ RSpec/DescribedClass:
RSpec/DescribeMethod:
Enabled: true

RSpec/Dialect:
Enabled: false

RSpec/EmptyLineAfterExample:
Enabled: true
AllowConsecutiveOneLiners: true

RSpec/EmptyExampleGroup:
Enabled: true

Expand Down Expand Up @@ -107,6 +120,9 @@ RSpec/HookArgument:
RSpec/HooksBeforeExamples:
Enabled: true

RSpec/ImplicitBlockExpectation:
Enabled: true

RSpec/ImplicitExpect:
Enabled: true
EnforcedStyle: is_expected
Expand Down Expand Up @@ -135,6 +151,9 @@ RSpec/IteratedExpectation:
RSpec/LeadingSubject:
Enabled: true

RSpec/LeakyConstantDeclaration:
Enabled: true

RSpec/LetBeforeExamples:
Enabled: true

Expand Down
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,35 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [0.6.0] - 20 January 2020

- Updated rubocop gem to `0.77.0`
- Updated rubocop-performance gem to `1.5.1`
- Added rubocop-rails gem version `2.4.0`

- Added Rails/ApplicationController
- Added Rails/ApplicationMailer
- Added Rails/EnumHash
- Added Rails/SafeNavigationWithBlank
- Added FactoryBot/FactoryClassNam
- Added RSpec/ContextMethod
- Added RSpec/EmptyLineAfterExample: with AllowConsecutiveOneLiners: true
- Added RSpec/ImplicitBlockExpectation
- Added RSpec/LeakyConstantDeclaration
- Added Style/FloatDivision: with EnforcedStyle: single_coerce
- Added Style/MultilineWhenThen
- Added Lint/SendWithMixinArgument
- Added Gemspec/RubyVersionGlobalsUsage

- Disabled Rails/RakeEnvironment
- Disabled RSpec/Dialect

- Renamed Layout/AlignHash to Layout/HashAlignment
- Renamed Layout/AlignParameters to Layout/ParameterAlignment
- Renamed Layout/IndentFirstParameter to Layout/FirstParameterIndentation

---

## [0.5.1] - 30 July 2019

### Disabled
Expand Down
13 changes: 13 additions & 0 deletions default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ Bundler/OrderedGems:
Style/EmptyMethod:
Enabled: false

Style/FloatDivision:
Enabled: true
EnforcedStyle: single_coerce

Style/IpAddresses:
Enabled: true

Expand All @@ -151,6 +155,9 @@ Style/ModuleFunction:
Style/MultilineMethodSignature:
Enabled: true

Style/MultilineWhenThen:
Enabled: true

Style/NegatedUnless:
Enabled: true
EnforcedStyle: both
Expand All @@ -170,5 +177,11 @@ Lint/HeredocMethodCallPosition:
Lint/SafeNavigationWithEmpty:
Enabled: true

Lint/SendWithMixinArgument:
Enabled: true

Lint/ToJSON:
Enabled: true

Gemspec/RubyVersionGlobalsUsage:
Enabled: true
2 changes: 1 addition & 1 deletion lib/rubocopital/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Rubocopital
VERSION = "0.5.3"
VERSION = "0.6.0"
end

0 comments on commit 8ab1fc7

Please sign in to comment.