diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..2b2c2db --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,12 @@ +version: "2.1" + +orbs: + shellcheck: circleci/shellcheck@3.1.2 + +workflows: + main: + jobs: + - shellcheck/check: + name: shellcheck + dir: src + diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a9dc6a4..0c91086 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,6 +25,11 @@ repos: - id: shellcheck additional_dependencies: [] + - repo: https://github.com/zahorniak/pre-commit-circleci.git + rev: v0.6 + hooks: + - id: circleci_validate + - repo: https://github.com/matthorgan/pre-commit-conventional-commits rev: 20fb9631be1385998138432592d0b6d4dfa38fc9 hooks: diff --git a/src/main.sh b/src/main.sh index 8cd5864..49e98d0 100644 --- a/src/main.sh +++ b/src/main.sh @@ -1,5 +1,8 @@ #!/bin/bash +# shellcheck disable=SC1091 source "prompts.sh" +# shellcheck disable=SC1091 source "user_feedback.sh" +# shellcheck disable=SC1091 source "logging.sh" diff --git a/src/prompts.sh b/src/prompts.sh index 22e7bfb..c26ddfe 100644 --- a/src/prompts.sh +++ b/src/prompts.sh @@ -24,6 +24,7 @@ _key_input() { } # print new line for empty element in array +# shellcheck disable=SC2231 _new_line_foreach_item() { for _ in $1[@]; do echo -en "\n" >&2; done } # display prompt text without linebreak diff --git a/test.sh b/test.sh index 88d7cd7..0e2e8f0 100755 --- a/test.sh +++ b/test.sh @@ -2,9 +2,9 @@ # # Basic demo of features # -cd src +cd src || exit 2 source main.sh -cd - +cd - || exit 2 # # UTILS