checksrc.yml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. # Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
  2. #
  3. # SPDX-License-Identifier: curl
  4. # This workflow contains checks at the source code level only.
  5. name: Source
  6. 'on':
  7. push:
  8. branches:
  9. - master
  10. - '*/ci'
  11. paths-ignore:
  12. - '**/*.md'
  13. - '.circleci/**'
  14. - 'appveyor.*'
  15. - 'plan9/**'
  16. - 'tests/data/**'
  17. - 'winbuild/**'
  18. pull_request:
  19. branches:
  20. - master
  21. paths-ignore:
  22. - '**/*.md'
  23. - '.circleci/**'
  24. - 'appveyor.*'
  25. - 'plan9/**'
  26. - 'tests/data/**'
  27. - 'winbuild/**'
  28. permissions: {}
  29. jobs:
  30. checksrc:
  31. runs-on: ubuntu-latest
  32. steps:
  33. - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
  34. name: checkout
  35. - name: check
  36. run: git ls-files -z "*.[ch]" | xargs -0 -n1 ./scripts/checksrc.pl
  37. codespell-cmakelint:
  38. runs-on: ubuntu-latest
  39. steps:
  40. - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
  41. name: checkout
  42. - name: install
  43. run: |
  44. sudo apt-get install codespell python3-pip
  45. python3 -m pip install cmakelint==1.4.3
  46. - name: spellcheck
  47. run: |
  48. codespell \
  49. --skip scripts/mk-ca-bundle.pl \
  50. --skip src/tool_hugehelp.c \
  51. -I .github/scripts/codespell-ignore.txt \
  52. CMake include m4 scripts src lib
  53. - name: cmakelint
  54. run: scripts/cmakelint.sh
  55. reuse:
  56. runs-on: ubuntu-latest
  57. steps:
  58. - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
  59. name: checkout
  60. - name: REUSE Compliance Check
  61. uses: fsfe/reuse-action@3ae3c6bdf1257ab19397fab11fd3312144692083 # v4
  62. miscchecks:
  63. runs-on: ubuntu-latest
  64. timeout-minutes: 5
  65. steps:
  66. - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
  67. name: checkout
  68. - name: shellcheck
  69. run: .github/scripts/shellcheck.sh
  70. - name: spacecheck
  71. run: .github/scripts/spacecheck.pl
  72. - name: yamlcheck
  73. run: .github/scripts/yamlcheck.sh
  74. - name: binarycheck
  75. run: .github/scripts/binarycheck.pl
  76. # we allow some extra in source code
  77. - name: badwords
  78. run: >
  79. grep -Ev '(\\bwill| url | dir )' .github/scripts/badwords.txt |
  80. .github/scripts/badwords.pl `git ls-files -- src lib include`