Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/config/commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
// refer to https://commitlint.js.org/reference/rules-configuration.html#rules-configuration for rule configurations
rules: {
'subject-case': [0],
'body-max-line-length': [0],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we limit the maximum length for the subject: https://commitlint.js.org/reference/rules.html#subject-max-length? We probably shouldn't allow a PR subject to be larger than one line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's address in a followup, I'm not sure what the right value is here and don't want to guess low.

'footer-max-line-length': [0],
'type-enum': [2, 'always', [
'build', 'chore', 'ci', 'docs', 'feat', 'fix', 'perf', 'refactor', 'revert', 'style', 'test',
'opt', 'internal', 'tests'
]]
},
parserPreset: {
parserOpts: {
issuePrefixes: ['#']
}
},
ignores: [
(message) => message.includes('Co-authored-by:')
]
};
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,15 @@ jobs:
cat /tmp/typos.json
! grep -q '[^[:space:]]' /tmp/typos.json

commit-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
submodules: true
- uses: ahmadnassri/action-commit-lint@v2
with:
config: ./.github/config/commitlint.config.js
kani:
runs-on: ubuntu-latest
strategy:
Expand Down
Loading