proselint.yml 1.8 KB

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