mirror of
https://github.com/lxc/incus
synced 2026-08-02 05:26:46 +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 \
|
lxc-templates \
|
||||||
make \
|
make \
|
||||||
man-db \
|
man-db \
|
||||||
|
pipx \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
protoc-gen-go \
|
protoc-gen-go \
|
||||||
python3-matplotlib \
|
python3-matplotlib \
|
||||||
@ -69,6 +70,9 @@ RUN sed -r -i 's/^Components: main$/Components: main contrib/g' /etc/apt/sources
|
|||||||
# zfsutils-linux
|
# zfsutils-linux
|
||||||
xz-utils
|
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.
|
# Add vscode user and add it to sudoers.
|
||||||
RUN groupadd -g 1000 $USERNAME && \
|
RUN groupadd -g 1000 $USERNAME && \
|
||||||
useradd -s /bin/bash -u $USER_UID -g $USER_GID -m $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 \
|
libtool \
|
||||||
libudev-dev \
|
libudev-dev \
|
||||||
make \
|
make \
|
||||||
|
pipx \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
shellcheck
|
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
|
- name: Fix repository permissions
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
4
Makefile
4
Makefile
@ -307,6 +307,10 @@ endif
|
|||||||
ifeq ($(shell command -v flake8),)
|
ifeq ($(shell command -v flake8),)
|
||||||
echo "Please install flake8"
|
echo "Please install flake8"
|
||||||
exit 1
|
exit 1
|
||||||
|
endif
|
||||||
|
ifeq ($(shell command -v codespell),)
|
||||||
|
echo "Please install codespell"
|
||||||
|
exit 1
|
||||||
endif
|
endif
|
||||||
flake8 test/deps/import-busybox
|
flake8 test/deps/import-busybox
|
||||||
shellcheck --shell sh test/*.sh test/includes/*.sh test/suites/*.sh test/backends/*.sh test/lint/*.sh
|
shellcheck --shell sh test/*.sh test/includes/*.sh test/suites/*.sh test/backends/*.sh test/lint/*.sh
|
||||||
|
|||||||
@ -35,6 +35,7 @@ pkgs.mkShell {
|
|||||||
gopls
|
gopls
|
||||||
|
|
||||||
# static-analysis
|
# static-analysis
|
||||||
|
codespell
|
||||||
debianutils
|
debianutils
|
||||||
go-licenses
|
go-licenses
|
||||||
go-swagger
|
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