1# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 2# 3# SPDX-License-Identifier: curl 4 5name: proselint 6 7on: 8 push: 9 branches: 10 - master 11 - '*/ci' 12 paths: 13 - '.github/workflows/proselint.yml' 14 - '**.md' 15 pull_request: 16 branches: 17 - master 18 paths: 19 - '.github/workflows/proselint.yml' 20 - '**.md' 21 22concurrency: 23 group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} 24 cancel-in-progress: true 25 26permissions: {} 27 28jobs: 29 check: 30 runs-on: ubuntu-latest 31 steps: 32 - uses: actions/checkout@v4 33 34 - name: install prereqs 35 run: | 36 sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list 37 sudo apt-get install python3-proselint 38 39 # config file help: https://github.com/amperser/proselint/ 40 - name: create proselint config 41 run: | 42 cat <<JSON > $HOME/.proselintrc 43 { 44 "checks": { 45 "typography.diacritical_marks": false, 46 "typography.symbols": false, 47 "annotations.misc": false, 48 "security.password": false 49 } 50 } 51 JSON 52 53 - name: check prose 54 run: a=`git ls-files '*.md' | grep -Ev '(docs/CHECKSRC.md|docs/DISTROS.md)'` && proselint $a README 55 56 # This is for CHECKSRC and files with aggressive exclamation mark needs 57 - name: create second proselint config 58 run: | 59 cat <<JSON > $HOME/.proselintrc 60 { 61 "checks": { 62 "typography.diacritical_marks": false, 63 "typography.symbols": false, 64 "typography.exclamation": false, 65 "annotations.misc": false 66 } 67 } 68 JSON 69 70 - name: check special prose 71 run: a=docs/CHECKSRC.md && proselint $a 72