mirror of
https://github.com/RedWizardsLab/EchoHub.git
synced 2026-09-04 08:36:11 +02:00
feat: Add .gitattributes to enforce LF line endings for shell scripts
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
# Force LF line endings for shell scripts (required for Linux CI runners)
|
||||||
|
*.sh text eol=lf
|
||||||
+24
-24
@@ -1,24 +1,24 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# Lint all Markdown files in the repository.
|
# Lint all Markdown files in the repository.
|
||||||
# Config, globs, and ignores are defined in .markdownlint-cli2.jsonc.
|
# Config, globs, and ignores are defined in .markdownlint-cli2.jsonc.
|
||||||
#
|
#
|
||||||
# Usage:
|
# Usage:
|
||||||
# ./scripts/lint-markdown.sh # check
|
# ./scripts/lint-markdown.sh # check
|
||||||
# ./scripts/lint-markdown.sh --fix # auto-fix
|
# ./scripts/lint-markdown.sh --fix # auto-fix
|
||||||
#
|
#
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||||
cd "$REPO_ROOT"
|
cd "$REPO_ROOT"
|
||||||
|
|
||||||
# Resolve markdownlint-cli2 binary
|
# Resolve markdownlint-cli2 binary
|
||||||
if command -v markdownlint-cli2 &>/dev/null; then
|
if command -v markdownlint-cli2 &>/dev/null; then
|
||||||
LINT_CMD="markdownlint-cli2"
|
LINT_CMD="markdownlint-cli2"
|
||||||
else
|
else
|
||||||
LINT_CMD="npx --yes markdownlint-cli2"
|
LINT_CMD="npx --yes markdownlint-cli2"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Linting Markdown files..."
|
echo "Linting Markdown files..."
|
||||||
$LINT_CMD "$@"
|
$LINT_CMD "$@"
|
||||||
echo "Markdown lint passed."
|
echo "Markdown lint passed."
|
||||||
|
|||||||
Reference in New Issue
Block a user