mirror of
https://github.com/ivuorinen/nvm-auto-use.fish.git
synced 2026-02-05 10:46:16 +00:00
feat: refactor plugin architecture, enhance linting, CI & tooling
- Major refactor of core Fish functions for modularity, caching, and error handling - Improved `.editorconfig` and Makefile for stricter formatting and linting standards - Expanded linting support: added EditorConfig checks, auto-install for missing tools, and Makefile targets - Enhanced CI workflow with clearer permissions and job steps in GitHub Actions - Updated documentation in `README.md` and `CLAUDE.md` to reflect new features, advanced developer tools, and contribution guidelines - Improved Node.js version manager detection, switching, and installation logic - Added/updated utility functions for configuration, silent mode, notifications, and version extraction - Various bug fixes, code quality improvements, and expanded test coverage
This commit is contained in:
50
.github/install_editorconfig-checker.sh
vendored
Executable file
50
.github/install_editorconfig-checker.sh
vendored
Executable file
@@ -0,0 +1,50 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "Downloading editorconfig-checker..."
|
||||
|
||||
BASE_URL="https://github.com/editorconfig-checker/editorconfig-checker/releases/latest/download"
|
||||
|
||||
# Detect OS and architecture
|
||||
OS="$(uname -s)"
|
||||
ARCH="$(uname -m)"
|
||||
case "$OS" in
|
||||
Darwin)
|
||||
[ "$ARCH" = "arm64" ] && ARCH="arm64" || ARCH="amd64"
|
||||
URL="$BASE_URL/ec-darwin-${ARCH}.tar.gz"
|
||||
;;
|
||||
Linux)
|
||||
[ "$ARCH" = "aarch64" ] && ARCH="arm64" || ARCH="amd64"
|
||||
URL="$BASE_URL/ec-linux-${ARCH}.tar.gz"
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported OS: $OS"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
TMPDIR="$(mktemp -d)"
|
||||
trap 'rm -rf "$TMPDIR"' EXIT
|
||||
|
||||
curl -L "$URL" | tar -xz -C "$TMPDIR"
|
||||
|
||||
# Choose install directory
|
||||
INSTALL_DIR="${XDG_BIN_HOME:-$HOME/bin}"
|
||||
[ -d "$INSTALL_DIR" ] || INSTALL_DIR="/usr/local/bin"
|
||||
|
||||
echo "Installing to $INSTALL_DIR..."
|
||||
|
||||
mkdir -p "$INSTALL_DIR" 2>/dev/null || true
|
||||
|
||||
if mv "$TMPDIR/bin/ec" "$INSTALL_DIR/editorconfig-checker" 2>/dev/null; then
|
||||
echo "✓ Installed editorconfig-checker to $INSTALL_DIR"
|
||||
elif sudo mv "$TMPDIR/bin/ec" "$INSTALL_DIR/editorconfig-checker" 2>/dev/null; then
|
||||
echo "✓ Installed editorconfig-checker to $INSTALL_DIR (with sudo)"
|
||||
else
|
||||
echo "Could not install to $INSTALL_DIR, using local copy"
|
||||
mkdir -p bin
|
||||
mv "$TMPDIR/bin/ec" bin/editorconfig-checker
|
||||
echo "Add $(pwd)/bin to your PATH to use editorconfig-checker"
|
||||
fi
|
||||
|
||||
echo "Installation complete!"
|
||||
15
.github/workflows/pr-lint.yml
vendored
15
.github/workflows/pr-lint.yml
vendored
@@ -8,11 +8,12 @@ on:
|
||||
pull_request:
|
||||
branches: [master, main]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
statuses: write
|
||||
|
||||
jobs:
|
||||
SuperLinter:
|
||||
uses: ivuorinen/actions/pr-lint@625c37446b1c7e219755a40807f825c9283f6e05 # 25.7.7
|
||||
Linter:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
statuses: write
|
||||
steps:
|
||||
- uses: ivuorinen/actions/pr-lint@625c37446b1c7e219755a40807f825c9283f6e05 # 25.7.7
|
||||
|
||||
Reference in New Issue
Block a user