proselint.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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: sudo apt-get install python3-proselint
  30. # config file help: https://github.com/amperser/proselint/
  31. - name: create proselint config
  32. run: |
  33. cat <<JSON > $HOME/.proselintrc
  34. {
  35. "checks": {
  36. "typography.diacritical_marks": false,
  37. "typography.symbols": false,
  38. "annotations.misc": false
  39. }
  40. }
  41. JSON
  42. - name: check prose
  43. run: a=`git ls-files '*.md' | grep -v docs/CHECKSRC.md` && proselint $a README
  44. # This is for CHECKSRC and files with aggressive exclamation mark needs
  45. - name: create second proselint config
  46. run: |
  47. cat <<JSON > $HOME/.proselintrc
  48. {
  49. "checks": {
  50. "typography.diacritical_marks": false,
  51. "typography.symbols": false,
  52. "typography.exclamation": false,
  53. "annotations.misc": false
  54. }
  55. }
  56. JSON
  57. - name: check special prose
  58. run: a=docs/CHECKSRC.md && proselint $a