Skip to content

Commit

Permalink
Merge pull request #376 from afbjorklund/yaml-lint
Browse files Browse the repository at this point in the history
Add lint target for running yamllint
  • Loading branch information
AkihiroSuda authored Nov 17, 2021
2 parents 2d0572d + 28e26d9 commit 908c5a7
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 9 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ jobs:
version: v1.42.1
args: --verbose

yamllint:
runs-on: ubuntu-20.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Run yamllint
run: yamllint .

shellcheck:
runs-on: ubuntu-20.04
timeout-minutes: 20
Expand Down
12 changes: 12 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---

extends: default

rules:
indentation:
indent-sequences: consistent
truthy:
allowed-values: ['true', 'false', 'on', 'off']
comments-indentation: disable
document-start: disable
line-length: disable
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ uninstall:
"$(DEST)/share/lima" "$(DEST)/share/doc/lima"
# TODO: remove $(DEST)/bin/nerdctl only when it is a symlink to nerdctl.lima

.PHONY: lint
lint:
yamllint .

.PHONY: clean
clean:
rm -rf _output
Expand Down
10 changes: 5 additions & 5 deletions examples/k3s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
# This example requires Lima v0.7.0 or later.

images:
# Hint: run `limactl prune` to invalidate the "current" cache
- location: "https://cloud-images.ubuntu.com/impish/current/impish-server-cloudimg-amd64.img"
arch: "x86_64"
- location: "https://cloud-images.ubuntu.com/impish/current/impish-server-cloudimg-arm64.img"
arch: "aarch64"
# Hint: run `limactl prune` to invalidate the "current" cache
- location: "https://cloud-images.ubuntu.com/impish/current/impish-server-cloudimg-amd64.img"
arch: "x86_64"
- location: "https://cloud-images.ubuntu.com/impish/current/impish-server-cloudimg-arm64.img"
arch: "aarch64"

# Mounts are disabled in this example, but can be enabled optionally.
mounts: []
Expand Down
2 changes: 1 addition & 1 deletion examples/vmnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ networks:
# https://github.com/lima-vm/vde_vmnet. Available networks are defined in
# $LIMA_HOME/_config/networks.yaml. Supported network types are "host",
# "shared", or "bridged".
- lima: shared
- lima: shared
3 changes: 0 additions & 3 deletions pkg/limayaml/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ ssh:
# Default: false
forwardAgent: false



# ===================================================================== #
# ADVANCED CONFIGURATION
# ===================================================================== #
Expand Down Expand Up @@ -234,4 +232,3 @@ useHostResolver: true
# ===================================================================== #
# END OF TEMPLATE
# ===================================================================== #

0 comments on commit 908c5a7

Please sign in to comment.