Skip to content

Commit

Permalink
ci: update the CI rules (#469)
Browse files Browse the repository at this point in the history
* ci(rubocop): change method and class maximum length

* ci(overcommit): add message format warning and remove capitalization

* style(overcommit): fix excpected_pattern_message content

* ci(overcommit): increase max subject width to 80 chars

* fix(overcommit): add explicitly enabled to TextWidth rule
  • Loading branch information
DioFun authored Jul 10, 2024
1 parent 01e1374 commit f5516c8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .overcommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,22 @@ 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: '<build|ci|docs|feat|fix|perf|refactor|style|test>(<scope>): <message>'
sample_message: 'ci(rubocop): increase class length limit'

TextWidth:
enabled: true
max_subject_width: 80

PrePush:
Brakeman:
enabled: true
Expand Down
3 changes: 2 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Layout/FirstArrayElementIndentation:

Metrics/ClassLength:
Enabled: true
Max: 200
Exclude:
- test/**/*

Expand All @@ -31,7 +32,7 @@ Minitest/EmptyLineBeforeAssertionMethods:
Enabled: false

Metrics/MethodLength:
Max: 15
Max: 20

Metrics/AbcSize:
Max: 20
Expand Down

0 comments on commit f5516c8

Please sign in to comment.