diff --git a/.codespellexcludefile b/.codespellexcludefile new file mode 100644 index 000000000..ac5d38d2e --- /dev/null +++ b/.codespellexcludefile @@ -0,0 +1 @@ + if strings.Contains(command.Name(), "complet") { diff --git a/meson.build b/meson.build index b15480cda..13388b2e1 100644 --- a/meson.build +++ b/meson.build @@ -15,6 +15,8 @@ endif go = find_program('go') go_md2man = find_program('go-md2man') + +codespell = find_program('codespell', required: false) shellcheck = find_program('shellcheck', required: false) skopeo = find_program('skopeo', required: false) @@ -53,6 +55,24 @@ endif toolbox_sh = files('toolbox') +if codespell.found() + test( + 'codespell', + codespell, + args: [ + '--check-filenames', + '--check-hidden', + '--context', '3', + '--exclude-file', meson.project_source_root() / '.codespellexcludefile', + '--skip', meson.project_build_root(), + '--skip', meson.project_source_root() / '.git', + '--skip', meson.project_source_root() / 'test/system/libs/bats-assert', + '--skip', meson.project_source_root() / 'test/system/libs/bats-support', + meson.project_source_root(), + ], + ) +endif + if shellcheck.found() test('shellcheck toolbox (deprecated)', shellcheck, args: [toolbox_sh]) endif diff --git a/playbooks/dependencies.yaml b/playbooks/dependencies.yaml index 50936fe2b..eaad3a2ff 100644 --- a/playbooks/dependencies.yaml +++ b/playbooks/dependencies.yaml @@ -6,6 +6,7 @@ - ShellCheck - bash-completion - bats + - codespell - fish - flatpak-session-helper - golang