Skip to content

Commit

Permalink
build, playbooks: Add a test that runs codespell
Browse files Browse the repository at this point in the history
containers#1146

Signed-off-by: Nieves Montero <[email protected]>
  • Loading branch information
nievesmontero authored and debarshiray committed Nov 19, 2022
1 parent 9204d90 commit 9438db2
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions .codespellexcludefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
if strings.Contains(command.Name(), "complet") {
20 changes: 20 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions playbooks/dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- ShellCheck
- bash-completion
- bats
- codespell
- fish
- flatpak-session-helper
- golang
Expand Down

0 comments on commit 9438db2

Please sign in to comment.