From 6a7d25591b58858a83f297e2e8679b20e4d5012a Mon Sep 17 00:00:00 2001 From: evazion Date: Mon, 15 Jun 2020 15:57:54 -0500 Subject: [PATCH] ci: use more permissive rubocop / codeclimate settings. --- .codeclimate.yml | 18 +++++++++++++----- .rubocop.yml | 15 ++++++++++++--- test/.rubocop.yml | 5 +++++ 3 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 test/.rubocop.yml diff --git a/.codeclimate.yml b/.codeclimate.yml index dbb000b8a..646bfcd16 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -1,17 +1,25 @@ version: 2 checks: argument-count: + enabled: false + complex-logic: config: - threshold: 4 + threshold: 8 file-lines: config: - threshold: 500 + threshold: 1000 + method-complexity: + config: + threshold: 15 method-count: - config: - threshold: 40 + enabled: false method-lines: + enabled: false + nested-control-flow: config: - threshold: 100 + threshold: 4 + return-statements: + enabled: false plugins: eslint: enabled: true diff --git a/.rubocop.yml b/.rubocop.yml index 001265032..932920c18 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,8 +1,9 @@ +# some of these settings are overriden in also test/.rubocop.yml + require: - rubocop-rails AllCops: - TargetRubyVersion: 2.7.0 NewCops: enable Exclude: - "bin/*" @@ -41,14 +42,22 @@ Layout/SpaceInsideHashLiteralBraces: Metrics/AbcSize: Enabled: false +Metrics/BlockLength: + Max: 50 + ExcludedMethods: + - concerning + - context + - should + Metrics/BlockNesting: + CountBlocks: false Max: 4 Metrics/ClassLength: Max: 500 Metrics/CyclomaticComplexity: - Max: 10 + Enabled: false Metrics/MethodLength: Max: 100 @@ -60,7 +69,7 @@ Metrics/ParameterLists: Max: 4 Metrics/PerceivedComplexity: - Enabled: false + Max: 20 Lint/InheritException: EnforcedStyle: standard_error diff --git a/test/.rubocop.yml b/test/.rubocop.yml new file mode 100644 index 000000000..f278ac69f --- /dev/null +++ b/test/.rubocop.yml @@ -0,0 +1,5 @@ +inherit_from: + - ../.rubocop.yml + +Metrics/ClassLength: + Enabled: false