Skip to content

Commit 9663b5b

Browse files
feat(action): set max-line-length rules to warn
1 parent 8835732 commit 9663b5b

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

action.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,22 @@ runs:
3030
CONFIG=$(commitlint --print-config --no-color)
3131
3232
RULES_LENGTH=$(node <<EOF
33-
const config = $CONFIG;
34-
console.log(Object.keys(config.rules).length);
33+
const config = $CONFIG;
34+
console.log(Object.keys(config.rules).length);
3535
EOF
3636
)
3737
3838
if [[ $RULES_LENGTH == 0 ]]; then
3939
npm install --silent --no-save ${{ inputs.config }}
40-
echo '{"extends":["${{ inputs.config }}"],"rules":{"body-max-line-length":[0,"always",100]}}' > .commitlintrc.json
40+
cat <<'EOF' > .commitlintrc.json
41+
{
42+
"extends": ["${{ inputs.config }}"],
43+
"rules": {
44+
"body-max-line-length": [1, "always", 100],
45+
"footer-max-line-length": [1, "always", 100]
46+
}
47+
}
48+
EOF
4149
fi
4250
4351
- name: Run commitlint

0 commit comments

Comments
 (0)