2
0

proselint.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Copyright (C) 2022 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. jobs:
  23. check:
  24. runs-on: ubuntu-latest
  25. steps:
  26. - uses: actions/checkout@v2
  27. - name: install prereqs
  28. run: sudo apt-get install python3-proselint
  29. # config file help: https://github.com/amperser/proselint/
  30. - name: create proselint config
  31. run: |
  32. cat <<JSON > $HOME/.proselintrc
  33. {
  34. "checks": {
  35. "typography.diacritical_marks": false,
  36. "typography.symbols": false,
  37. "annotations.misc": false
  38. }
  39. }
  40. JSON
  41. - name: check prose
  42. run: a=`git ls-files '*.md' | grep -v docs/CHECKSRC.md` && proselint $a README
  43. # This is for CHECKSRC and files with aggressive exclamation mark needs
  44. - name: create second proselint config
  45. run: |
  46. cat <<JSON > $HOME/.proselintrc
  47. {
  48. "checks": {
  49. "typography.diacritical_marks": false,
  50. "typography.symbols": false,
  51. "typography.exclamation": false,
  52. "annotations.misc": false
  53. }
  54. }
  55. JSON
  56. - name: check special prose
  57. run: a=docs/CHECKSRC.md && proselint $a