From a0996995017d6c5447589455c4adca4fea51edef Mon Sep 17 00:00:00 2001 From: Snoweuph Date: Sat, 23 Nov 2024 19:30:12 +0100 Subject: [PATCH] Add Auto Install Script --- install.sh | 44 ++++++++++++++++++++++++++++++++++++++++ lua/toolchain/config.lua | 1 - 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100755 install.sh diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..464e1c5 --- /dev/null +++ b/install.sh @@ -0,0 +1,44 @@ +#!/bin/sh + +# Config +command -v spectral &>/dev/null || volta install @stoplight/spectral-cli + +# Go +command -v delv &>/dev/null || sudo dnf install delve -y +command -v gomodifytags &>/dev/null || go install github.com/fatih/gomodifytags@latest +command -v impl &>/dev/null || go install github.com/josharian/impl@latest +command -v golangci-lint &>/dev/null || go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest +command -v staticcheck &>/dev/null || go install honnef.co/go/tools/cmd/staticcheck@latest +command -v gofumpt &>/dev/null || go install mvdan.cc/gofumpt@latest + +# Lua +command -v selene &>/dev/null || cargo install selene +command -v selene &>/dev/null || cargo install styua + +# Php +command -v phpcs &>/dev/null || composer global require "squizlabs/php_codesniffer=*" -n +command -v phpstan &>/dev/null || composer global require "phpstan/phpstan=*" -n +command -v php-cs-fixer &>/dev/null || composer global require "friendsofphp/php-cs-fixer=*" -n +command -v twigcs &>/dev/null || composer global require "friendsoftwig/twigcs=*" -n + +# Rust +command -v cargo-clippy &>/dev/null || rustup component add clippy +command -v rust-analyzer &>/dev/null || rustup component add rust-analyzer + +# Scripts +command -v actionlint &>/dev/null || go install github.com/rhysd/actionlint/cmd/actionlint@latest +command -v checkmake &>/dev/null || go install github.com/mrtazz/checkmake/cmd/checkmake@latest +command -v dotenv-linter &>/dev/null || cargo install dotenv-linter +command -v shfmt &>/dev/null || go install mvdan.cc/sh/v3/cmd/shfmt@latest +command -v shellharden &>/dev/null || cargo install shellharden + +# text +command -v proselint &>/dev/null || sudo dnf install proselint -y +command -v alex &>/dev/null || volta install alex +command -v markdownlint &>/dev/null || volta install markdownlint-cli +command -v stylelint &>/dev/null || volta install stylelint +command -v @fsouza/prettierd &>/dev/null || volta install @fsouza/prettierd + + + + diff --git a/lua/toolchain/config.lua b/lua/toolchain/config.lua index 38d3605..a740216 100644 --- a/lua/toolchain/config.lua +++ b/lua/toolchain/config.lua @@ -7,7 +7,6 @@ function M.setup() T.add_null_ls_module(function(null_ls) return { null_ls.builtins.diagnostics.spectral, - --null_ls.builtins.diagnostics.vacuum --Pure Openapi linter } end)