INNER CODE UNIT · Shell

main

gruntwork-io/bash-commons · .circleci/shellcheck.sh:76

function main {
  local -a check_files
  local -r format="${1:-gcc}"
  local filename="${2:-}"
  local line

  # If `CIRCLE_WORKING_DIRECTORY` is not set, assume the project root dir.
  if [[ -z "${CIRCLE_WORKING_DIRECTORY:-}" ]]; then
    CIRCLE_WORKING_DIRECTORY="$(
      readlink -f \
        "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/.."
    )"
  fi

  if [[ -z "$filename" ]]; then
    # Since no filenames are provided, look for files based on shebang.
    while read -r filename; do
      set +e

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…