From 8ab1fc79f1b5fa3ddf6127ad0228ddd5f33c7bf8 Mon Sep 17 00:00:00 2001 From: Martijn Bleeker Date: Mon, 20 Jan 2020 13:38:31 +0100 Subject: [PATCH] Add cop configuration based on issue voting --- .rubocop-rails.yml | 15 +++++++++++++++ .rubocop-rspec.yml | 19 +++++++++++++++++++ CHANGELOG.md | 29 +++++++++++++++++++++++++++++ default.yml | 13 +++++++++++++ lib/rubocopital/version.rb | 2 +- 5 files changed, 77 insertions(+), 1 deletion(-) diff --git a/.rubocop-rails.yml b/.rubocop-rails.yml index 9c4b84d..5f90361 100644 --- a/.rubocop-rails.yml +++ b/.rubocop-rails.yml @@ -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 @@ -15,6 +21,9 @@ Rails/BelongsTo: Rails/Date: EnforcedStyle: flexible +Rails/EnumHash: + Enabled: true + Rails/HasAndBelongsToMany: Enabled: false @@ -33,6 +42,12 @@ Rails/LinkToBlank: Rails/OutputSafety: Enabled: false +Rails/RakeEnvironment: + Enabled: false + +Rails/SafeNavigationWithBlank: + Enabled: true + Rails/SkipsModelValidations: Enabled: false diff --git a/.rubocop-rspec.yml b/.rubocop-rspec.yml index 46e0d56..40813bb 100644 --- a/.rubocop-rspec.yml +++ b/.rubocop-rspec.yml @@ -13,6 +13,9 @@ FactoryBot/CreateList: Enabled: true EnforcedStyle: create_list +FactoryBot/FactoryClassName: + Enabled: true + Rails/HttpStatus: Enabled: true EnforcedStyle: symbolic @@ -38,6 +41,9 @@ RSpec/BeEql: RSpec/BeforeAfterAll: Enabled: true +RSpec/ContextMethod: + Enabled: true + RSpec/ContextWording: Enabled: true @@ -54,6 +60,13 @@ RSpec/DescribedClass: RSpec/DescribeMethod: Enabled: true +RSpec/Dialect: + Enabled: false + +RSpec/EmptyLineAfterExample: + Enabled: true + AllowConsecutiveOneLiners: true + RSpec/EmptyExampleGroup: Enabled: true @@ -107,6 +120,9 @@ RSpec/HookArgument: RSpec/HooksBeforeExamples: Enabled: true +RSpec/ImplicitBlockExpectation: + Enabled: true + RSpec/ImplicitExpect: Enabled: true EnforcedStyle: is_expected @@ -135,6 +151,9 @@ RSpec/IteratedExpectation: RSpec/LeadingSubject: Enabled: true +RSpec/LeakyConstantDeclaration: + Enabled: true + RSpec/LetBeforeExamples: Enabled: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 076ea2d..dab5ef4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/default.yml b/default.yml index 1820f4f..2981203 100644 --- a/default.yml +++ b/default.yml @@ -142,6 +142,10 @@ Bundler/OrderedGems: Style/EmptyMethod: Enabled: false +Style/FloatDivision: + Enabled: true + EnforcedStyle: single_coerce + Style/IpAddresses: Enabled: true @@ -151,6 +155,9 @@ Style/ModuleFunction: Style/MultilineMethodSignature: Enabled: true +Style/MultilineWhenThen: + Enabled: true + Style/NegatedUnless: Enabled: true EnforcedStyle: both @@ -170,5 +177,11 @@ Lint/HeredocMethodCallPosition: Lint/SafeNavigationWithEmpty: Enabled: true +Lint/SendWithMixinArgument: + Enabled: true + Lint/ToJSON: Enabled: true + +Gemspec/RubyVersionGlobalsUsage: + Enabled: true diff --git a/lib/rubocopital/version.rb b/lib/rubocopital/version.rb index 14ca9b5..bfe78c9 100644 --- a/lib/rubocopital/version.rb +++ b/lib/rubocopital/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Rubocopital - VERSION = "0.5.3" + VERSION = "0.6.0" end