2023-01-02 20:51:48 +08:00
|
|
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
2022-09-19 23:30:05 +08:00
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: curl
|
|
|
|
|
|
|
|
name: proselint
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- '*/ci'
|
|
|
|
paths:
|
|
|
|
- '.github/workflows/proselint.yml'
|
|
|
|
- '**.md'
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
paths:
|
|
|
|
- '.github/workflows/proselint.yml'
|
|
|
|
- '**.md'
|
|
|
|
|
2022-09-18 05:45:32 +08:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2022-11-16 22:55:33 +08:00
|
|
|
permissions: {}
|
|
|
|
|
2022-09-19 23:30:05 +08:00
|
|
|
jobs:
|
|
|
|
check:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-30 23:34:53 +08:00
|
|
|
- uses: actions/checkout@v4
|
2022-09-19 23:30:05 +08:00
|
|
|
|
|
|
|
- name: install prereqs
|
|
|
|
run: sudo apt-get install python3-proselint
|
|
|
|
|
|
|
|
# config file help: https://github.com/amperser/proselint/
|
|
|
|
- name: create proselint config
|
|
|
|
run: |
|
|
|
|
cat <<JSON > $HOME/.proselintrc
|
|
|
|
{
|
|
|
|
"checks": {
|
|
|
|
"typography.diacritical_marks": false,
|
|
|
|
"typography.symbols": false,
|
|
|
|
"annotations.misc": false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
JSON
|
|
|
|
|
|
|
|
- name: check prose
|
|
|
|
run: a=`git ls-files '*.md' | grep -v docs/CHECKSRC.md` && proselint $a README
|
|
|
|
|
|
|
|
# This is for CHECKSRC and files with aggressive exclamation mark needs
|
|
|
|
- name: create second proselint config
|
|
|
|
run: |
|
|
|
|
cat <<JSON > $HOME/.proselintrc
|
|
|
|
{
|
|
|
|
"checks": {
|
|
|
|
"typography.diacritical_marks": false,
|
|
|
|
"typography.symbols": false,
|
|
|
|
"typography.exclamation": false,
|
|
|
|
"annotations.misc": false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
JSON
|
|
|
|
|
|
|
|
- name: check special prose
|
|
|
|
run: a=docs/CHECKSRC.md && proselint $a
|