mirror of
https://github.com/chenasraf/text-transform.nvim.git
synced 2026-05-17 17:48:04 +00:00
27 lines
462 B
Bash
Executable File
27 lines
462 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# shellcheck disable=SC2181,SC2086
|
|
|
|
# Stylua check
|
|
diffs=$(stylua --check --output-format=json .)
|
|
|
|
# Exit code != 0 means there are changes (files are not formatted)
|
|
if [[ "$?" -ne 0 ]]; then
|
|
# Get filenames of diffs
|
|
filelist="$(echo "$diffs" | jq -r '.file')"
|
|
|
|
# Format & add to git
|
|
stylua $filelist
|
|
git add $filelist
|
|
fi
|
|
|
|
# Run lints
|
|
make lint
|
|
|
|
# Run tests
|
|
# make test
|
|
|
|
# Generate docs & add to git
|
|
make documentation
|
|
git add doc
|
|
|