Skip to content

Commit

Permalink
Fix linting (denisidoro#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
denisidoro authored Sep 21, 2019
1 parent 44c4d95 commit 0df4b91
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 10 deletions.
8 changes: 8 additions & 0 deletions scripts/lint
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 1 addition & 1 deletion src/cheat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ cheat::from_selection() {
done

echoerr "No valid cheatsheet!"
exit 67
exit 67
}
2 changes: 1 addition & 1 deletion src/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
8 changes: 4 additions & 4 deletions src/misc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
8 changes: 4 additions & 4 deletions test/core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 0df4b91

Please sign in to comment.