Add typos command for linting and tidying and fix issues it found

This commit is contained in:
Dave Rolsky 2024-05-18 12:11:04 +08:00
parent 9b467e6799
commit 2297f8e434
No known key found for this signature in database
3 changed files with 13 additions and 2 deletions

View File

@ -89,5 +89,5 @@ be stripped either.
## Caching Rust Compilation Output
You can use the [Swatinem/rust-cache](https://github.com/Swatinem/rust-cache) action with this one
seemlessly, whether or not a specific build target needs `cross`. There is no special configuration
seamlessly, whether or not a specific build target needs `cross`. There is no special configuration
that you need for this. It just works.

View File

@ -58,7 +58,7 @@ runs:
env:
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
if: ${{ steps.determine-cross-compile.outputs.needs-cross == 'true' }}
# We need to accesss this in both this YAML config and shell scripts. It
# We need to access this in both this YAML config and shell scripts. It
# doesn't seem like using ${{ env.RUNNER_TEMP }} works in the YAML config.
- name: Set directory for installing cross
id: set-cross-dir

View File

@ -1,7 +1,18 @@
exclude = [
"target",
"tests/lib/**/*",
]
[commands.typos]
type = "both"
include = "**/*"
exclude = "**/*.tar.gz"
invoke = "once"
cmd = "typos"
tidy_flags = "--write-changes"
ok-exit-codes = 0
lint-failure-exit-codes = 2
[commands.perltidy]
type = "both"
include = [ "**/*.{pl,pm,t,psgi}" ]