From d567a1b8548370550ee9547f86a10db3b35d5418 Mon Sep 17 00:00:00 2001 From: Baptiste DROUET Date: Tue, 9 Jul 2024 12:22:38 +0200 Subject: [PATCH 1/5] ci(rubocop): change method and class maximum length --- .rubocop.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index 2700e771..30d97f96 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -16,6 +16,7 @@ Layout/FirstArrayElementIndentation: Metrics/ClassLength: Enabled: true + Max: 200 Exclude: - test/**/* @@ -31,7 +32,7 @@ Minitest/EmptyLineBeforeAssertionMethods: Enabled: false Metrics/MethodLength: - Max: 15 + Max: 20 Metrics/AbcSize: Max: 20 From 9b5d13af4f93fcaef2510de7fbb692c54efb0077 Mon Sep 17 00:00:00 2001 From: Baptiste DROUET Date: Tue, 9 Jul 2024 14:25:30 +0200 Subject: [PATCH 2/5] ci(overcommit): add message format warning and remove capitalization --- .overcommit.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.overcommit.yml b/.overcommit.yml index 5b45b57f..802b614e 100644 --- a/.overcommit.yml +++ b/.overcommit.yml @@ -43,6 +43,18 @@ PreCommit: # exclude: # - '**/db/structure.sql' # Ignore trailing whitespace in generated files +CommitMsg: + CapitalizedSubject: + enabled: false + + MessageFormat: + enabled: true + description: 'Ensure commit message follows commit style' + on_fail: warn + pattern: '^(build|ci|docs|feat|fix|perf|refactor|style|test)(\(.+\))?: .{1,50}' + expected_pattern_message: '(): ' + sample_message: 'ci(rubocop): increase class length limit' + PrePush: Brakeman: enabled: true From beb94b2df5474115e7b5d6db71a4db32a70fc3a5 Mon Sep 17 00:00:00 2001 From: Baptiste DROUET Date: Tue, 9 Jul 2024 14:55:07 +0200 Subject: [PATCH 3/5] style(overcommit): fix excpected_pattern_message content --- .overcommit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.overcommit.yml b/.overcommit.yml index 802b614e..3041a7c3 100644 --- a/.overcommit.yml +++ b/.overcommit.yml @@ -52,7 +52,7 @@ CommitMsg: description: 'Ensure commit message follows commit style' on_fail: warn pattern: '^(build|ci|docs|feat|fix|perf|refactor|style|test)(\(.+\))?: .{1,50}' - expected_pattern_message: '(): ' + expected_pattern_message: '(): ' sample_message: 'ci(rubocop): increase class length limit' PrePush: From af5c711b162d059b10fd840ace47de99b55af5b4 Mon Sep 17 00:00:00 2001 From: Baptiste DROUET Date: Tue, 9 Jul 2024 14:57:08 +0200 Subject: [PATCH 4/5] ci(overcommit): increase max subject width to 80 chars --- .overcommit.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.overcommit.yml b/.overcommit.yml index 3041a7c3..507a3434 100644 --- a/.overcommit.yml +++ b/.overcommit.yml @@ -55,6 +55,9 @@ CommitMsg: expected_pattern_message: '(): ' sample_message: 'ci(rubocop): increase class length limit' + TextWidth: + max_subject_width: 80 + PrePush: Brakeman: enabled: true From a3eea9688184a7c659ffe48af18c3a1f253135a6 Mon Sep 17 00:00:00 2001 From: Baptiste DROUET Date: Tue, 9 Jul 2024 14:58:14 +0200 Subject: [PATCH 5/5] fix(overcommit): add explicitly enabled to TextWidth rule --- .overcommit.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.overcommit.yml b/.overcommit.yml index 507a3434..97c02ac3 100644 --- a/.overcommit.yml +++ b/.overcommit.yml @@ -56,6 +56,7 @@ CommitMsg: sample_message: 'ci(rubocop): increase class length limit' TextWidth: + enabled: true max_subject_width: 80 PrePush: