mirror of
https://github.com/lxc/incus
synced 2026-08-01 21:25:31 +00:00
lint: Run codespell automatically
Signed-off-by: Colin Watson <cjwatson@debian.org>
This commit is contained in:
parent
4e37b921df
commit
99f8b39716
6
.codespell-ignore
Normal file
6
.codespell-ignore
Normal file
@ -0,0 +1,6 @@
|
||||
AtLeast
|
||||
destOp
|
||||
ECT
|
||||
inport
|
||||
renderD
|
||||
requestor
|
||||
@ -50,6 +50,7 @@ RUN sed -r -i 's/^Components: main$/Components: main contrib/g' /etc/apt/sources
|
||||
lxc-templates \
|
||||
make \
|
||||
man-db \
|
||||
pipx \
|
||||
pkg-config \
|
||||
protoc-gen-go \
|
||||
python3-matplotlib \
|
||||
@ -69,6 +70,9 @@ RUN sed -r -i 's/^Components: main$/Components: main contrib/g' /etc/apt/sources
|
||||
# zfsutils-linux
|
||||
xz-utils
|
||||
|
||||
# With pipx >= 1.5.0, we could use pipx --global instead.
|
||||
RUN PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin pipx install codespell
|
||||
|
||||
# Add vscode user and add it to sudoers.
|
||||
RUN groupadd -g 1000 $USERNAME && \
|
||||
useradd -s /bin/bash -u $USER_UID -g $USER_GID -m $USERNAME && \
|
||||
|
||||
5
.github/workflows/tests.yml
vendored
5
.github/workflows/tests.yml
vendored
@ -90,10 +90,13 @@ jobs:
|
||||
libtool \
|
||||
libudev-dev \
|
||||
make \
|
||||
pipx \
|
||||
pkg-config \
|
||||
shellcheck
|
||||
|
||||
python3 -m pip install flake8
|
||||
# With pipx >= 1.5.0, we could use pipx --global instead.
|
||||
PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin \
|
||||
pipx install codespell flake8
|
||||
|
||||
- name: Fix repository permissions
|
||||
run: |
|
||||
|
||||
4
Makefile
4
Makefile
@ -307,6 +307,10 @@ endif
|
||||
ifeq ($(shell command -v flake8),)
|
||||
echo "Please install flake8"
|
||||
exit 1
|
||||
endif
|
||||
ifeq ($(shell command -v codespell),)
|
||||
echo "Please install codespell"
|
||||
exit 1
|
||||
endif
|
||||
flake8 test/deps/import-busybox
|
||||
shellcheck --shell sh test/*.sh test/includes/*.sh test/suites/*.sh test/backends/*.sh test/lint/*.sh
|
||||
|
||||
@ -35,6 +35,7 @@ pkgs.mkShell {
|
||||
gopls
|
||||
|
||||
# static-analysis
|
||||
codespell
|
||||
debianutils
|
||||
go-licenses
|
||||
go-swagger
|
||||
|
||||
2
test/lint/codespell.sh
Executable file
2
test/lint/codespell.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh -eu
|
||||
codespell -S 'internal/server/apparmor/*.profile.go' -I .codespell-ignore client cmd doc grafana internal scripts shared test
|
||||
Loading…
Reference in New Issue
Block a user