Fix linting (#30)

This commit is contained in:
Denis Isidoro 2019-09-21 19:24:09 -03:00 committed by GitHub
parent 44c4d9551f
commit 0df4b9123d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 10 deletions

8
scripts/lint Executable file
View file

@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -euo pipefail
export SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
cd "${SCRIPT_DIR}"
find . -iname '*.sh' | xargs -I% dot code beautify %
dot code beautify "${SCRIPT_DIR}/navi"

View file

@ -32,5 +32,5 @@ cheat::from_selection() {
done
echoerr "No valid cheatsheet!"
exit 67
exit 67
}

View file

@ -51,7 +51,7 @@ handler::preview() {
main() {
case ${entry_point:-} in
preview) handler::preview "$@" 2>/dev/null || echo "Unable to find command for '${query:-}'";;
preview) handler::preview "$@" 2>/dev/null || echo "Unable to find command for '${query:-}'" ;;
*) health::fzf && handler::main "$@" ;;
esac
}

View file

@ -5,10 +5,10 @@ dep() {
:
}
command_exists () {
type "$1" &> /dev/null
command_exists() {
type "$1" &> /dev/null
}
echoerr() {
echo "$@" 1>&2
echoerr() {
echo "$@" 1>&2
}

View file

@ -12,8 +12,8 @@ test::fail() {
}
test::run() {
echo
echo "-> $1"
shift
eval "$*" && test::success || test::fail
echo
echo "-> $1"
shift
eval "$*" && test::success || test::fail
}