From db1c0cd21860d2f07d77a82bd89da6e6973c4f97 Mon Sep 17 00:00:00 2001 From: iamnbutler Date: Fri, 12 Dec 2025 14:30:01 -0500 Subject: [PATCH] Remove Zed-specific and CI scripts Keep only essential development scripts: - clippy (linting) - linux (Linux dependency installation) - metal-debug (macOS GPU debugging) Removed: - Version bumping scripts (Zed release process) - CI helper scripts (target dir cleaning, crate version) - Build tool installers (cmake, mold, wild, rustup) - Prettier/shellcheck (Zed-specific checks) - crate-dep-graph (references Zed crates) - histogram (Python perf analysis) - new-crate (references Zed licensing) - lib/ helpers (blob-store, deploy, etc.) --- script/bump-gpui-version | 45 ----------- script/clear-target-dir-if-larger-than | 26 ------- script/clear-target-dir-if-larger-than.ps1 | 22 ------ script/crate-dep-graph | 19 ----- script/get-crate-version | 17 ----- script/get-crate-version.ps1 | 16 ---- script/histogram | 74 ------------------- script/install-cmake | 77 ------------------- script/install-mold | 45 ----------- script/install-rustup.ps1 | 39 ---------- script/install-wild | 44 ----------- script/lib/blob-store.ps1 | 68 ----------------- script/lib/blob-store.sh | 32 -------- script/lib/bump-version.sh | 55 -------------- script/lib/deploy-helpers.sh | 37 ---------- script/lib/squawk.toml | 11 --- script/lib/workspace.ps1 | 6 -- script/new-crate | 86 ---------------------- script/prettier | 17 ----- script/shellcheck-scripts | 12 --- 20 files changed, 748 deletions(-) delete mode 100755 script/bump-gpui-version delete mode 100755 script/clear-target-dir-if-larger-than delete mode 100644 script/clear-target-dir-if-larger-than.ps1 delete mode 100755 script/crate-dep-graph delete mode 100755 script/get-crate-version delete mode 100644 script/get-crate-version.ps1 delete mode 100755 script/histogram delete mode 100755 script/install-cmake delete mode 100755 script/install-mold delete mode 100644 script/install-rustup.ps1 delete mode 100755 script/install-wild delete mode 100644 script/lib/blob-store.ps1 delete mode 100644 script/lib/blob-store.sh delete mode 100755 script/lib/bump-version.sh delete mode 100644 script/lib/deploy-helpers.sh delete mode 100644 script/lib/squawk.toml delete mode 100644 script/lib/workspace.ps1 delete mode 100755 script/new-crate delete mode 100755 script/prettier delete mode 100755 script/shellcheck-scripts diff --git a/script/bump-gpui-version b/script/bump-gpui-version deleted file mode 100755 index 5112bde450..0000000000 --- a/script/bump-gpui-version +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env bash - -# Parse arguments -bump_type=${1:-minor} - -if [[ "$bump_type" != "minor" && "$bump_type" != "patch" ]]; then - echo "Usage: $0 [minor|patch]" - echo " minor (default): bumps the minor version (e.g., 0.1.0 -> 0.2.0)" - echo " patch: bumps the patch version (e.g., 0.1.0 -> 0.1.1)" - exit 1 -fi - -# Ensure we're in a clean state on an up-to-date `main` branch. -if [[ -n $(git status --short --untracked-files=no) ]]; then - echo "can't bump versions with uncommitted changes" - exit 1 -fi -if [[ $(git rev-parse --abbrev-ref HEAD) != "main" ]]; then - echo "this command must be run on main" - exit 1 -fi -git pull -q --ff-only origin main - - -# Parse the current version -version=$(script/get-crate-version gpui) -major=$(echo $version | cut -d. -f1) -minor=$(echo $version | cut -d. -f2) -patch=$(echo $version | cut -d. -f3) - -if [[ "$bump_type" == "minor" ]]; then - next_minor=$(expr $minor + 1) - next_version="${major}.${next_minor}.0" -else - next_patch=$(expr $patch + 1) - next_version="${major}.${minor}.${next_patch}" -fi - -branch_name="bump-gpui-to-v${next_version}" - -git checkout -b ${branch_name} - -script/lib/bump-version.sh gpui gpui-v "" $bump_type true - -git checkout -q main diff --git a/script/clear-target-dir-if-larger-than b/script/clear-target-dir-if-larger-than deleted file mode 100755 index 46256159a8..0000000000 --- a/script/clear-target-dir-if-larger-than +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash - -set -euxo pipefail - -if [[ $# -ne 1 ]]; then - echo "usage: $0 " - exit 1 -fi - -if ! [[ -d target ]]; then - echo "target directory does not exist yet" - exit 0 -fi - -max_size_gb=$1 - -current_size=$(du -s target | cut -f1) -current_size_gb=$(expr ${current_size} / 1024 / 1024) - -echo "target directory size: ${current_size_gb}gb. max size: ${max_size_gb}gb" - -if [[ ${current_size_gb} -gt ${max_size_gb} ]]; then - echo "clearing target directory" - shopt -s dotglob - rm -rf target/* -fi diff --git a/script/clear-target-dir-if-larger-than.ps1 b/script/clear-target-dir-if-larger-than.ps1 deleted file mode 100644 index c18c308624..0000000000 --- a/script/clear-target-dir-if-larger-than.ps1 +++ /dev/null @@ -1,22 +0,0 @@ -param ( - [Parameter(Mandatory = $true)] - [int]$MAX_SIZE_IN_GB -) - -$ErrorActionPreference = "Stop" -$PSNativeCommandUseErrorActionPreference = $true -$ProgressPreference = "SilentlyContinue" - -if (-Not (Test-Path -Path "target")) { - Write-Host "target directory does not exist yet" - exit 0 -} - -$current_size_gb = (Get-ChildItem -Recurse -Force -File -Path "target" | Measure-Object -Property Length -Sum).Sum / 1GB - -Write-Host "target directory size: ${current_size_gb}GB. max size: ${MAX_SIZE_IN_GB}GB" - -if ($current_size_gb -gt $MAX_SIZE_IN_GB) { - Write-Host "clearing target directory" - Remove-Item -Recurse -Force -Path "target\*" -ErrorAction SilentlyContinue -} diff --git a/script/crate-dep-graph b/script/crate-dep-graph deleted file mode 100755 index 54170a9986..0000000000 --- a/script/crate-dep-graph +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash - -set -e - -if [[ -x cargo-depgraph ]]; then - cargo install cargo-depgraph -fi - -graph_file=target/crate-graph.html - -cargo depgraph \ - --workspace-only \ - --offline \ - --root=zed,cli,collab \ - --dedup-transitive-deps \ - | dot -Tsvg > $graph_file - -echo "open $graph_file" -open $graph_file diff --git a/script/get-crate-version b/script/get-crate-version deleted file mode 100755 index d642eb0867..0000000000 --- a/script/get-crate-version +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -set -eu - -if [[ $# -ne 1 ]]; then - echo "Usage: $0 " >&2 - exit 1 -fi - -CRATE_NAME=$1 - -cargo metadata \ - --no-deps \ - --format-version=1 \ - | jq \ - --raw-output \ - ".packages[] | select(.name == \"${CRATE_NAME}\") | .version" diff --git a/script/get-crate-version.ps1 b/script/get-crate-version.ps1 deleted file mode 100644 index d86c971e32..0000000000 --- a/script/get-crate-version.ps1 +++ /dev/null @@ -1,16 +0,0 @@ -if ($args.Length -ne 1) { - Write-Error "Usage: $($MyInvocation.MyCommand.Name) " - exit 1 -} - -$crateName = $args[0] - -$metadata = cargo metadata --no-deps --format-version=1 | ConvertFrom-Json - -$package = $metadata.packages | Where-Object { $_.name -eq $crateName } -if ($package) { - $package.version -} -else { - Write-Error "Crate '$crateName' not found." -} diff --git a/script/histogram b/script/histogram deleted file mode 100755 index 32db95134e..0000000000 --- a/script/histogram +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env python3 - -# Required dependencies for this script: -# -# pandas: For data manipulation and analysis. -# matplotlib: For creating static, interactive, and animated visualizations in Python. -# seaborn: For making statistical graphics in Python, based on matplotlib. - -# To install these dependencies, use the following pip command: -# pip install pandas matplotlib seaborn - -# This script is designed to parse log files for performance measurements and create histograms of these measurements. -# It expects log files to contain lines with measurements in the format "measurement: timeunit" where timeunit can be in milliseconds (ms) or microseconds (µs). -# Lines that do not contain a colon ':' are skipped. -# The script takes one or more file paths as command-line arguments, parses each log file, and then combines the data into a single DataFrame. -# It then converts all time measurements into milliseconds, discards the original time and unit columns, and creates histograms for each unique measurement type. -# The histograms display the distribution of times for each measurement, separated by log file, and normalized to show density rather than count. -# To use this script, run it from the command line with the log file paths as arguments, like so: -# python this_script.py log1.txt log2.txt ... -# The script will then parse the provided log files and display the histograms for each type of measurement found. - -import pandas as pd -import matplotlib.pyplot as plt -import seaborn as sns -import sys - -def parse_log_file(file_path): - data = {'measurement': [], 'time': [], 'unit': [], 'log_file': []} - with open(file_path, 'r') as file: - for line in file: - if ':' not in line: - continue - - parts = line.strip().split(': ') - if len(parts) != 2: - continue - - measurement, time_with_unit = parts[0], parts[1] - if 'ms' in time_with_unit: - time, unit = time_with_unit[:-2], 'ms' - elif 'µs' in time_with_unit: - time, unit = time_with_unit[:-2], 'µs' - else: - # Print an error message if we can't parse the line and then continue with rest. - print(f'Error: Invalid time unit in line "{line.strip()}". Skipping.', file=sys.stderr) - continue - - data['measurement'].append(measurement) - data['time'].append(float(time)) - data['unit'].append(unit) - data['log_file'].append(file_path.split('/')[-1]) - return pd.DataFrame(data) - -def create_histograms(df, measurement): - filtered_df = df[df['measurement'] == measurement] - plt.figure(figsize=(12, 6)) - sns.histplot(data=filtered_df, x='time_ms', hue='log_file', element='step', stat='density', common_norm=False, palette='bright') - plt.title(f'Histogram of {measurement}') - plt.xlabel('Time (ms)') - plt.ylabel('Density') - plt.grid(True) - plt.xlim(filtered_df['time_ms'].quantile(0.01), filtered_df['time_ms'].quantile(0.99)) - plt.show() - - -file_paths = sys.argv[1:] -dfs = [parse_log_file(path) for path in file_paths] -combined_df = pd.concat(dfs, ignore_index=True) -combined_df['time_ms'] = combined_df.apply(lambda row: row['time'] if row['unit'] == 'ms' else row['time'] / 1000, axis=1) -combined_df.drop(['time', 'unit'], axis=1, inplace=True) - -measurement_types = combined_df['measurement'].unique() -for measurement in measurement_types: - create_histograms(combined_df, measurement) diff --git a/script/install-cmake b/script/install-cmake deleted file mode 100755 index 3a28aae1b8..0000000000 --- a/script/install-cmake +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/env bash -# -# This script installs an up-to-date version of CMake. -# -# For MacOS use Homebrew to install the latest version. -# -# For Ubuntu use the official KitWare Apt repository with backports. -# See: https://apt.kitware.com/ -# -# For other systems (RHEL 8.x, 9.x, AmazonLinux, SUSE, Fedora, Arch, etc) -# use the official CMake installer script from KitWare. -# -# Note this is similar to how GitHub Actions runners install cmake: -# https://github.com/actions/runner-images/blob/main/images/ubuntu/scripts/build/install-cmake.sh -# -# Upstream: 3.30.4 (2024-09-27) - -set -euo pipefail - - -if [[ "$(uname -s)" == "darwin" ]]; then - brew --version >/dev/null \ - || echo "Error: Homebrew is required to install cmake on MacOS." && exit 1 - echo "Installing cmake via Homebrew (can't pin to old versions)." - brew install cmake - exit 0 -elif [ "$(uname -s)" != "Linux" ]; then - echo "Error: This script is intended for MacOS/Linux systems only." - exit 1 -elif [ -z "${1:-}" ]; then - echo "Usage: $0 [3.30.4]" - exit 1 -fi -CMAKE_VERSION="${CMAKE_VERSION:-${1:-3.30.4}}" - -if [ "$(whoami)" = root ]; then SUDO=; else SUDO="$(command -v sudo || command -v doas || true)"; fi - -if cmake --version 2>/dev/null | grep -q "$CMAKE_VERSION"; then - echo "CMake $CMAKE_VERSION is already installed." - exit 0 -elif [ -e /usr/local/bin/cmake ]; then - echo "Warning: existing cmake found at /usr/local/bin/cmake. Skipping installation." - exit 0 -elif [ -e /etc/apt/sources.list.d/kitware.list ]; then - echo "Warning: existing KitWare repository found. Skipping installation." - exit 0 -elif [ -e /etc/lsb-release ] && grep -qP 'DISTRIB_ID=Ubuntu' /etc/lsb-release; then - curl -fsSL https://apt.kitware.com/keys/kitware-archive-latest.asc \ - | $SUDO gpg --dearmor - \ - | $SUDO tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null - echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" \ - | $SUDO tee /etc/apt/sources.list.d/kitware.list >/dev/null - $SUDO apt-get update - $SUDO apt-get install -y kitware-archive-keyring cmake -else - arch="$(uname -m)" - if [ "$arch" != "x86_64" ] && [ "$arch" != "aarch64" ]; then - echo "Error. Only x86_64 and aarch64 are supported." - exit 1 - fi - tempdir=$(mktemp -d) - pushd "$tempdir" - CMAKE_REPO="https://github.com/Kitware/CMake" - CMAKE_INSTALLER="cmake-$CMAKE_VERSION-linux-$arch.sh" - curl -fsSL --output cmake-$CMAKE_VERSION-SHA-256.txt \ - "$CMAKE_REPO/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-SHA-256.txt" - curl -fsSL --output $CMAKE_INSTALLER \ - "$CMAKE_REPO/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-linux-$arch.sh" - # workaround for old versions of sha256sum not having --ignore-missing - grep -F "cmake-$CMAKE_VERSION-linux-$arch.sh" "cmake-$CMAKE_VERSION-SHA-256.txt" \ - | sha256sum -c \ - | grep -qP "^${CMAKE_INSTALLER}: OK" - chmod +x cmake-$CMAKE_VERSION-linux-$arch.sh - $SUDO ./cmake-$CMAKE_VERSION-linux-$arch.sh --prefix=/usr/local --skip-license - popd - rm -rf "$tempdir" -fi diff --git a/script/install-mold b/script/install-mold deleted file mode 100755 index b0bf851770..0000000000 --- a/script/install-mold +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env bash - -# Install `mold` official binaries from GitHub Releases. -# -# Adapted from the official rui314/setup-mold@v1 action to: -# * use environment variables instead of action inputs -# * remove make-default support -# * use curl instead of wget -# * support doas for sudo -# * support redhat systems -# See: https://github.com/rui314/setup-mold/blob/main/action.yml - -set -euo pipefail - -MOLD_VERSION="2.34.0" - -if [ "$(uname -s)" != "Linux" ]; then - echo "Error: This script is intended for Linux systems only." - exit 1 -elif [ -e /usr/local/bin/mold ]; then - echo "Warning: existing mold found at /usr/local/bin/mold. Skipping installation." - exit 0 -fi - -if [ "$(whoami)" = root ]; then SUDO=; else SUDO="$(command -v sudo || command -v doas || true)"; fi - -MOLD_REPO="${MOLD_REPO:-https://github.com/rui314/mold}" -MOLD_URL="${MOLD_URL:-$MOLD_REPO}/releases/download/v$MOLD_VERSION/mold-$MOLD_VERSION-$(uname -m)-linux.tar.gz" - -echo "Downloading from $MOLD_URL" -curl -fsSL --output - "$MOLD_URL" \ - | $SUDO tar -C /usr/local --strip-components=1 --no-overwrite-dir -xzf - - -# Note this binary depends on the system libatomic.so.1 which is usually -# provided as a dependency of gcc so it should be available on most systems. - -cat </dev/null 2>&1 && wild --version | grep -Fq "$WILD_VERSION" ; then - echo "Warning: existing wild $WILD_VERSION found at $(command -v wild). Skipping installation." - exit 0 -fi - -if [ "$(whoami)" = root ]; then SUDO=; else SUDO="$(command -v sudo || command -v doas || true)"; fi - -ARCH="$(uname -m)" -WILD_REPO="${WILD_REPO:-https://github.com/davidlattimore/wild}" -WILD_PACKAGE="wild-linker-${WILD_VERSION}-${ARCH}-unknown-linux-gnu" -WILD_URL="${WILD_URL:-$WILD_REPO}/releases/download/$WILD_VERSION/${WILD_PACKAGE}.tar.gz" -DEST_DIR=/usr/local/bin - -echo "Downloading from $WILD_URL" -curl -fsSL --output - "$WILD_URL" \ - | $SUDO tar -C ${DEST_DIR} --strip-components=1 --no-overwrite-dir -xzf - \ - "${WILD_PACKAGE}/wild" - -cat < /dev/null || cargo install cargo-edit -which jq > /dev/null || brew install jq -cargo set-version --package $package --bump $version_increment -cargo check --quiet - -new_version=$(script/get-crate-version $package) -branch_name=$(git rev-parse --abbrev-ref HEAD) -old_sha=$(git rev-parse HEAD) -tag_name=${tag_prefix}${new_version}${tag_suffix} - -git commit --quiet --all --message "${package} ${new_version}" -git tag ${tag_name} - -if [[ "$gpui_release" == "true" ]]; then -cat <&2 - exit 1 - fi - export $(grep -v '^#' $env_file | grep -v '^[[:space:]]*$') -} - -function target_zed_kube_cluster { - if [[ $(kubectl config current-context 2> /dev/null) != do-nyc1-zed-1 ]]; then - doctl kubernetes cluster kubeconfig save zed-1 - fi -} - -function tag_for_environment { - if [[ "$1" == "production" ]]; then - echo "collab-production" - elif [[ "$1" == "staging" ]]; then - echo "collab-staging" - else - echo "Invalid environment name '${environment}'" >&2 - exit 1 - fi -} - -function url_for_environment { - if [[ "$1" == "production" ]]; then - echo "https://collab.zed.dev" - elif [[ "$1" == "staging" ]]; then - echo "https://collab-staging.zed.dev" - else - echo "Invalid environment name '${environment}'" >&2 - exit 1 - fi -} diff --git a/script/lib/squawk.toml b/script/lib/squawk.toml deleted file mode 100644 index 83a238c4ff..0000000000 --- a/script/lib/squawk.toml +++ /dev/null @@ -1,11 +0,0 @@ -excluded_rules = [ - # We use `serial` already, no point changing now. - "prefer-identity", - - # We store timestamps in UTC, so we don't care about the timezone. - "prefer-timestamptz", - - "prefer-big-int", - "prefer-bigint-over-int", -] -pg_version = "15.0" diff --git a/script/lib/workspace.ps1 b/script/lib/workspace.ps1 deleted file mode 100644 index c6fdc274c1..0000000000 --- a/script/lib/workspace.ps1 +++ /dev/null @@ -1,6 +0,0 @@ - -function ParseZedWorkspace { - $metadata = cargo metadata --no-deps --offline | ConvertFrom-Json - $env:ZED_WORKSPACE = $metadata.workspace_root - $env:RELEASE_VERSION = $metadata.packages | Where-Object { $_.name -eq "zed" } | Select-Object -ExpandProperty version -} diff --git a/script/new-crate b/script/new-crate deleted file mode 100755 index 52ee900b30..0000000000 --- a/script/new-crate +++ /dev/null @@ -1,86 +0,0 @@ -#!/usr/bin/env bash - -# Try to make sure we are in the zed repo root -if [ ! -d "crates" ] || [ ! -d "script" ]; then - echo "Error: Run from the \`zed\` repo root" - exit 1 -fi - -if [ ! -f "Cargo.toml" ]; then - echo "Error: Run from the \`zed\` repo root" - exit 1 -fi - -if [ $# -eq 0 ]; then - echo "Usage: $0 [optional_license_flag]" - exit 1 -fi - -CRATE_NAME="$1" - -LICENSE_FLAG=$(echo "${2}" | tr '[:upper:]' '[:lower:]') -if [[ "$LICENSE_FLAG" == *"apache"* ]]; then - LICENSE_MODE="Apache-2.0" - LICENSE_FILE="LICENSE-APACHE" -elif [[ "$LICENSE_FLAG" == *"agpl"* ]]; then - LICENSE_MODE="AGPL-3.0-or-later" - LICENSE_FILE="LICENSE-AGPL" -else - LICENSE_MODE="GPL-3.0-or-later" - LICENSE_FILE="LICENSE-GPL" -fi - -if [[ ! "$CRATE_NAME" =~ ^[a-z0-9_]+$ ]]; then - echo "Error: Crate name must be lowercase and contain only alphanumeric characters and underscores" - exit 1 -fi - -CRATE_PATH="crates/$CRATE_NAME" -mkdir -p "$CRATE_PATH/src" - -# Symlink the license -ln -sf "../../$LICENSE_FILE" "$CRATE_PATH/$LICENSE_FILE" - -CARGO_TOML_TEMPLATE=$(cat << 'EOF' -[package] -name = "$CRATE_NAME" -version = "0.1.0" -edition.workspace = true -publish.workspace = true -license = "$LICENSE_MODE" - -[lints] -workspace = true - -[lib] -path = "src/$CRATE_NAME.rs" - -[features] -default = [] - -[dependencies] -anyhow.workspace = true -gpui.workspace = true -ui.workspace = true -util.workspace = true - -# Uncomment other workspace dependencies as needed -# assistant.workspace = true -# client.workspace = true -# project.workspace = true -# settings.workspace = true -EOF -) - -# Populate template -CARGO_TOML_CONTENT=$(echo "$CARGO_TOML_TEMPLATE" | sed \ - -e "s/\$CRATE_NAME/$CRATE_NAME/g" \ - -e "s/\$LICENSE_MODE/$LICENSE_MODE/g") - -echo "$CARGO_TOML_CONTENT" > "$CRATE_PATH/Cargo.toml" - -echo "//! # $CRATE_NAME" > "$CRATE_PATH/src/$CRATE_NAME.rs" - -echo "Created new crate: $CRATE_NAME in $CRATE_PATH" -echo "License: $LICENSE_MODE (symlinked from $LICENSE_FILE)" -echo "Don't forget to add the new crate to the workspace!" diff --git a/script/prettier b/script/prettier deleted file mode 100755 index 5ad5d15cf0..0000000000 --- a/script/prettier +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -set -euxo pipefail - -PRETTIER_VERSION=3.5.0 - -pnpm dlx "prettier@${PRETTIER_VERSION}" assets/settings/default.json --parser=jsonc --check || { - echo "To fix, run from the root of the Zed repo:" - echo " pnpm dlx prettier@${PRETTIER_VERSION} assets/settings/default.json --parser=jsonc --write" - false -} - -cd docs -pnpm dlx "prettier@${PRETTIER_VERSION}" . --check || { - echo "To fix, run from the root of the Zed repo:" - echo " cd docs && pnpm dlx prettier@${PRETTIER_VERSION} . --write && cd .." - false -} diff --git a/script/shellcheck-scripts b/script/shellcheck-scripts deleted file mode 100755 index d42b31d02f..0000000000 --- a/script/shellcheck-scripts +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -mode=${1:-error} -[[ "$mode" =~ ^(error|warning)$ ]] || { echo "Usage: $0 [error|warning]"; exit 1; } - -cd "$(dirname "$0")/.." || exit 1 - -find script -maxdepth 1 -type f -print0 | - xargs -0 grep -l -E '^#!(/bin/|/usr/bin/env )(sh|bash|dash)' | - xargs -r shellcheck -x -S "$mode" -C