Skip to content

Commit cd6f12a

Browse files
authored
feat: Add taplo as TOML formatter and linter (#16)
1 parent 470aa3e commit cd6f12a

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
# Version of actionlint to install: latest, or specific version number WITHOUT 'v' prefix e.g. 1.7.5
44
ARG ACTIONLINT_VERSION=latest
5+
# Version of taplo to install: latest, or specific version number WITHOUT 'v' prefix e.g. 0.10.0
6+
ARG TAPLO_VERSION=latest
57
# Version of hadolint to install: latest, or specific version number e.g. v2.14.0
68
ARG HADOLINT_VERSION=latest
79
# Version of shellcheck to install: latest, or specific version number e.g. v0.11.0
@@ -17,6 +19,7 @@ ARG SNYK_VERSION=stable
1719

1820
# Images which we can directly copy the binaries from
1921
FROM rhysd/actionlint:${ACTIONLINT_VERSION} AS actionlint
22+
FROM tamasfe/taplo:${TAPLO_VERSION} AS taplo
2023
FROM hadolint/hadolint:${HADOLINT_VERSION} AS hadolint
2124
FROM koalaman/shellcheck:${SHELLCHECK_VERSION} AS shellcheck
2225
FROM mvdan/shfmt:${SHFMT_VERSION} AS shfmt
@@ -142,6 +145,9 @@ COPY --from=hadolint /bin/hadolint /usr/local/bin/hadolint
142145
# Install actionlint
143146
COPY --from=actionlint /usr/local/bin/actionlint /usr/local/bin/actionlint
144147

148+
# Install taplo (TOML formatter and linter)
149+
COPY --from=taplo /taplo /usr/local/bin/taplo
150+
145151
# Install shellcheck
146152
# Required for shellcheck vscode extension and actionlint
147153
COPY --from=shellcheck /bin/shellcheck /usr/local/bin/shellcheck

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ It contains the necessary dependencies for running various linters and type chec
1919
- `reviewdog` - for code review
2020
- `hadolint` - for linting Dockerfile
2121
- `actionlint` - static checker for GitHub Actions workflow files
22+
- `taplo` - TOML formatter and linter
2223

2324
Alternative unix power tools:
2425

tests/specs.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ commandTests:
4949
command: "actionlint"
5050
args: ["--version"]
5151

52+
- name: "taplo is installed in path"
53+
command: "taplo"
54+
args: ["--version"]
55+
5256
- name: "watchman is installed in path"
5357
command: "watchman"
5458
args: ["--version"]

0 commit comments

Comments
 (0)