Add information to README for prospective users - #62
Merged
Conversation
✅
|
| Descriptor | Linter | Files | Fixed | Errors | Warnings | Elapsed time |
|---|---|---|---|---|---|---|
| bash-exec | 32 | 29 | 0 | 0.44s | ||
| ✅ BASH | shellcheck | 32 | 0 | 0 | 1.29s | |
| shfmt | 32 | 23 | 0 | 0.03s | ||
| markdownlint | 4 | 81 | 0 | 0.86s | ||
| ✅ MARKDOWN | markdown-table-formatter | 4 | 0 | 0 | 0.31s |
Detailed Issues
⚠️ BASH / bash-exec - 29 errors
Results of bash-exec linter (version 5.3.3)
See documentation on https://megalinter.io/9.4.0/descriptors/bash_bash_exec/
-----------------------------------------------
✅ [SUCCESS] cap
❌ [ERROR] cap_completion.sh
Error: File:[cap_completion.sh] is not executable
❌ [ERROR] commands/env.sh
Error: File:[commands/env.sh] is not executable
❌ [ERROR] commands/help.sh
Error: File:[commands/help.sh] is not executable
❌ [ERROR] commands/md5.sh
Error: File:[commands/md5.sh] is not executable
❌ [ERROR] commands/new.sh
Error: File:[commands/new.sh] is not executable
❌ [ERROR] commands/run.sh
Error: File:[commands/run.sh] is not executable
❌ [ERROR] commands/update.sh
Error: File:[commands/update.sh] is not executable
❌ [ERROR] commands/verify.sh
Error: File:[commands/verify.sh] is not executable
❌ [ERROR] commands/version.sh
Error: File:[commands/version.sh] is not executable
❌ [ERROR] configure.sh
Error: File:[configure.sh] is not executable
❌ [ERROR] install.sh
Error: File:[install.sh] is not executable
❌ [ERROR] lib/environment.sh
Error: File:[lib/environment.sh] is not executable
❌ [ERROR] lib/environment_functions.sh
Error: File:[lib/environment_functions.sh] is not executable
❌ [ERROR] lib/functions.sh
Error: File:[lib/functions.sh] is not executable
❌ [ERROR] lib/functions/cap_array_value.sh
Error: File:[lib/functions/cap_array_value.sh] is not executable
❌ [ERROR] lib/functions/cap_container.sh
Error: File:[lib/functions/cap_container.sh] is not executable
❌ [ERROR] lib/functions/cap_data_download.sh
Error: File:[lib/functions/cap_data_download.sh] is not executable
❌ [ERROR] lib/functions/commands/cap_check_environment.sh
Error: File:[lib/functions/commands/cap_check_environment.sh] is not executable
❌ [ERROR] lib/functions/commands/cap_root_required.sh
Error: File:[lib/functions/commands/cap_root_required.sh] is not executable
❌ [ERROR] lib/functions/verify/cap_verify_append.sh
Error: File:[lib/functions/verify/cap_verify_append.sh] is not executable
❌ [ERROR] lib/functions/verify/cap_verify_md5.sh
Error: File:[lib/functions/verify/cap_verify_md5.sh] is not executable
❌ [ERROR] tests/fixtures/env/.caprc
Error: File:[tests/fixtures/env/.caprc] is not executable
❌ [ERROR] tests/fixtures/run/array_job.sh
Error: File:[tests/fixtures/run/array_job.sh] is not executable
❌ [ERROR] tests/fixtures/run/job.sh
Error: File:[tests/fixtures/run/job.sh] is not executable
❌ [ERROR] tests/fixtures/verify/verifications/test_cap_verify_md5.sh
Error: File:[tests/fixtures/verify/verifications/test_cap_verify_md5.sh] is not executable
❌ [ERROR] tests/fixtures/verify/verifications/test_dry_run.sh
Error: File:[tests/fixtures/verify/verifications/test_dry_run.sh] is not executable
❌ [ERROR] tests/fixtures/verify/verifications/test_name.sh
Error: File:[tests/fixtures/verify/verifications/test_name.sh] is not executable
❌ [ERROR] tests/fixtures/verify/verifications/test_output_file.sh
Error: File:[tests/fixtures/verify/verifications/test_output_file.sh] is not executable
✅ [SUCCESS] tests/install
✅ [SUCCESS] tests/run
❌ [ERROR] tests/setup_suite.bash
Error: File:[tests/setup_suite.bash] is not executable
⚠️ MARKDOWN / markdownlint - 81 errors
.github/pull_request_template.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## Summary"]
.github/pull_request_template.md:6:21 error MD059/descriptive-link-text Link text should be descriptive [Context: "[here]"]
.github/pull_request_template.md:38 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/pull_request_template.md:51 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/pull_request_template.md:58 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/pull_request_template.md:63 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/pull_request_template.md:69 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/pull_request_template.md:76 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
CHANGELOG.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## CAPTURE 1.0.0 (January 16, ..."]
DOCUMENTATION.md:10:401 error MD013/line-length Line length [Expected: 400; Actual: 722]
DOCUMENTATION.md:12 error MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Table of Contents"]
DOCUMENTATION.md:36 error MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Quick Start"]
DOCUMENTATION.md:37:94 error MD059/descriptive-link-text Link text should be descriptive [Context: "[here]"]
DOCUMENTATION.md:39 error MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Upgrade"]
DOCUMENTATION.md:41 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:44 error MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "CLI usage"]
DOCUMENTATION.md:46 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:54 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:63 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:82 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:86 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:137 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:189 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:203 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:215 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:233 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:255 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:289 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:311 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:354 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:395 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:399 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:427 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:446 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:455 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:459 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:466 error MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Job helper functions"]
DOCUMENTATION.md:469 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:480 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:485 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:494 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:523 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:532 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:542 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:564 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:570 error MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Verification helper functions"]
DOCUMENTATION.md:586 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:591:72 error MD026/no-trailing-punctuation Trailing punctuation in heading [Punctuation: ':']
DOCUMENTATION.md:595 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:602 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:621 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:625 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:638 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:657 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Examples for a verification na..."]
DOCUMENTATION.md:657:72 error MD026/no-trailing-punctuation Trailing punctuation in heading [Punctuation: ':']
DOCUMENTATION.md:660 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:664 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:671 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:675 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:680 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:684 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:689 error MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Environment helper functions"]
DOCUMENTATION.md:705 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:718 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:723 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:727 error MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Contributions"]
DOCUMENTATION.md:732 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:736 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:742 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:749 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
DOCUMENTATION.md:754 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
README.md:37 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
README.md:44 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
README.md:52 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
README.md:60 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
README.md:70:51 error MD059/descriptive-link-text Link text should be descriptive [Context: "[here]"]
README.md:109 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
README.md:114 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
README.md:121 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
README.md:129 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
README.md:135 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
⚠️ BASH / shfmt - 23 errors
termine the output folder or file name.
- # There is an assumption that the name of a tar file matches
- # the name of the output. This assumption will probably need
- # to be removed but we will wait until we have a real example
- # before we try to change this.
- local file_name
- if [ -n "$cap_data_download_source_file_name" ]; then
- file_name="$cap_data_download_source_file_name"
- else
- file_name=$(basename "$cap_data_download_url")
- fi
- local output_name
- output_name="${file_name//\.tar.*/}"
- output_name="${output_name//\.gz/}"
-
- local download_path="$CAP_DATA_PATH"
- if [ -n "$cap_data_download_subdirectory" ]; then
- download_path="$CAP_DATA_PATH/$cap_data_download_subdirectory"
- mkdir -p "$download_path"
- fi
-
- # Download data if the final output does not exist.
- if [ -e "$download_path/$output_name" ] || [ -e "$download_path/$file_name" ]; then
- echo "$file_name has already been downloaded"
- else
-
- local download_file
- download_file="${download_path}/${file_name}"
-
- # Download the file.
- if ! wget -nv --retry-connrefused -O "$download_file" "$cap_data_download_url"; then
- echo "Error: URL not found" >&2
- exit 1
- fi
-
- # Check the md5sum if it is provided.
- if [ -n "$cap_data_download_md5sum" ]; then
- if echo "$cap_data_download_md5sum $download_file" | md5sum -c -; then
- echo "File download checksum verified!"
- else
- echo >&2
- echo "File $file_name checksum verification failed!" >&2
- echo "The file was left in place for debugging purposes. It will" >&2
- echo "need to be deleted before attempting another download." >&2
- echo >&2
- exit 1
- fi
- fi
-
- if [[ "$cap_data_download_unzip" == "true" ]]; then
- case "$file_name" in
- # Untar and remove downloads that are tar archives.
- *.tar|*.tar.gz)
- if tar -xf "$download_file" -C "$download_path"; then
- rm "$download_file"
- fi
- ;;
- # Unzip and remove downloads that are compressed files.
- *.gz)
- (
- cd "$download_path" || exit
- gunzip "$file_name"
- )
- ;;
- *)
- echo "Error: Unsupported file extension '$file_name'" >&2
- exit 1
- ;;
- esac
- fi
- fi
+ cap_data_download_parse_commandline_parameters "$@"
+
+ # Determine the output folder or file name.
+ # There is an assumption that the name of a tar file matches
+ # the name of the output. This assumption will probably need
+ # to be removed but we will wait until we have a real example
+ # before we try to change this.
+ local file_name
+ if [ -n "$cap_data_download_source_file_name" ]; then
+ file_name="$cap_data_download_source_file_name"
+ else
+ file_name=$(basename "$cap_data_download_url")
+ fi
+ local output_name
+ output_name="${file_name//\.tar.*/}"
+ output_name="${output_name//\.gz/}"
+
+ local download_path="$CAP_DATA_PATH"
+ if [ -n "$cap_data_download_subdirectory" ]; then
+ download_path="$CAP_DATA_PATH/$cap_data_download_subdirectory"
+ mkdir -p "$download_path"
+ fi
+
+ # Download data if the final output does not exist.
+ if [ -e "$download_path/$output_name" ] || [ -e "$download_path/$file_name" ]; then
+ echo "$file_name has already been downloaded"
+ else
+
+ local download_file
+ download_file="${download_path}/${file_name}"
+
+ # Download the file.
+ if ! wget -nv --retry-connrefused -O "$download_file" "$cap_data_download_url"; then
+ echo "Error: URL not found" >&2
+ exit 1
+ fi
+
+ # Check the md5sum if it is provided.
+ if [ -n "$cap_data_download_md5sum" ]; then
+ if echo "$cap_data_download_md5sum $download_file" | md5sum -c -; then
+ echo "File download checksum verified!"
+ else
+ echo >&2
+ echo "File $file_name checksum verification failed!" >&2
+ echo "The file was left in place for debugging purposes. It will" >&2
+ echo "need to be deleted before attempting another download." >&2
+ echo >&2
+ exit 1
+ fi
+ fi
+
+ if [[ "$cap_data_download_unzip" == "true" ]]; then
+ case "$file_name" in
+ # Untar and remove downloads that are tar archives.
+ *.tar | *.tar.gz)
+ if tar -xf "$download_file" -C "$download_path"; then
+ rm "$download_file"
+ fi
+ ;;
+ # Unzip and remove downloads that are compressed files.
+ *.gz)
+ (
+ cd "$download_path" || exit
+ gunzip "$file_name"
+ )
+ ;;
+ *)
+ echo "Error: Unsupported file extension '$file_name'" >&2
+ exit 1
+ ;;
+ esac
+ fi
+ fi
}
cap_data_download_parse_commandline_parameters() {
- # Define the named commandline options
- if ! OPTIONS=$(getopt -o "" --long source-file-name:,md5sum:,unzip,subdirectory: -- "$@"); then
- echo "See CAPTURE help for cap_data_download." >&2
- exit 1
- fi
- eval set -- "$OPTIONS"
-
- # Set default values for the named parameters
- cap_data_download_source_file_name=""
- cap_data_download_md5sum=""
- cap_data_download_subdirectory=""
- cap_data_download_unzip=false
-
- # Parse the optional named command line options
- while true; do
- case "$1" in
- --source-file-name)
- cap_data_download_source_file_name="$2"
- shift 2 ;;
- --md5sum)
- cap_data_download_md5sum="$2"
- shift 2 ;;
- --subdirectory)
- cap_data_download_subdirectory="$2"
- shift 2 ;;
- --unzip)
- cap_data_download_unzip=true
- shift 1 ;;
- --)
- shift
- break;;
- esac
- done
-
- # Check that the required file url parameter was provided
- if [ "$#" -ne 1 ]; then
- echo "Error: incorrect number of parameters" >&2
- echo "Usage: cap_data_download [options] URL" >&2
- echo "See CAPTURE help for cap_data_download" >&2
- exit 1
- fi
- cap_data_download_url=$1
+ # Define the named commandline options
+ if ! OPTIONS=$(getopt -o "" --long source-file-name:,md5sum:,unzip,subdirectory: -- "$@"); then
+ echo "See CAPTURE help for cap_data_download." >&2
+ exit 1
+ fi
+ eval set -- "$OPTIONS"
+
+ # Set default values for the named parameters
+ cap_data_download_source_file_name=""
+ cap_data_download_md5sum=""
+ cap_data_download_subdirectory=""
+ cap_data_download_unzip=false
+
+ # Parse the optional named command line options
+ while true; do
+ case "$1" in
+ --source-file-name)
+ cap_data_download_source_file_name="$2"
+ shift 2
+ ;;
+ --md5sum)
+ cap_data_download_md5sum="$2"
+ shift 2
+ ;;
+ --subdirectory)
+ cap_data_download_subdirectory="$2"
+ shift 2
+ ;;
+ --unzip)
+ cap_data_download_unzip=true
+ shift 1
+ ;;
+ --)
+ shift
+ break
+ ;;
+ esac
+ done
+
+ # Check that the required file url parameter was provided
+ if [ "$#" -ne 1 ]; then
+ echo "Error: incorrect number of parameters" >&2
+ echo "Usage: cap_data_download [options] URL" >&2
+ echo "See CAPTURE help for cap_data_download" >&2
+ exit 1
+ fi
+ cap_data_download_url=$1
}
diff lib/functions/commands/cap_check_environment.sh.orig lib/functions/commands/cap_check_environment.sh
--- lib/functions/commands/cap_check_environment.sh.orig
+++ lib/functions/commands/cap_check_environment.sh
@@ -1,8 +1,8 @@
#!/bin/bash
cap_check_environment() {
- if [[ ! -f "config/environments/$1.sh" ]]; then
- echo "The $1.sh environment file does not exist in config/environments."
- exit 2
- fi
+ if [[ ! -f "config/environments/$1.sh" ]]; then
+ echo "The $1.sh environment file does not exist in config/environments."
+ exit 2
+ fi
}
diff lib/functions/commands/cap_root_required.sh.orig lib/functions/commands/cap_root_required.sh
--- lib/functions/commands/cap_root_required.sh.orig
+++ lib/functions/commands/cap_root_required.sh
@@ -1,8 +1,8 @@
#!/bin/bash
cap_root_required() {
- if [[ ! -f "config/pipeline.sh" ]]; then
- echo "The $1 command must be executed from the project root directory." >&2
- exit 2
- fi
+ if [[ ! -f "config/pipeline.sh" ]]; then
+ echo "The $1 command must be executed from the project root directory." >&2
+ exit 2
+ fi
}
diff lib/functions/verify/cap_verify_append.sh.orig lib/functions/verify/cap_verify_append.sh
--- lib/functions/verify/cap_verify_append.sh.orig
+++ lib/functions/verify/cap_verify_append.sh
@@ -1,9 +1,9 @@
#!/bin/bash
cap_verify_append() {
- if [[ "$CAP_VERIFICATION_DRY_RUN" == "true" ]]; then
- echo "$1"
- else
- echo "$1" >> "${CAP_VERIFICATION_OUTPUT_FILE:-/dev/stdout}"
- fi
+ if [[ "$CAP_VERIFICATION_DRY_RUN" == "true" ]]; then
+ echo "$1"
+ else
+ echo "$1" >>"${CAP_VERIFICATION_OUTPUT_FILE:-/dev/stdout}"
+ fi
}
diff lib/functions/verify/cap_verify_md5.sh.orig lib/functions/verify/cap_verify_md5.sh
--- lib/functions/verify/cap_verify_md5.sh.orig
+++ lib/functions/verify/cap_verify_md5.sh
@@ -1,49 +1,51 @@
#!/bin/bash
cap_verify_md5() {
- cap_verify_md5_parse_commandline_parameters "$@"
-
- cap_md5_args+=(--append --output-files-only)
- if [[ "$CAP_VERIFICATION_DRY_RUN" == "true" ]]; then
- cap_md5_args+=(--dry-run)
- else
- cap_md5_args+=(--output "$CAP_VERIFICATION_OUTPUT_FILE")
- fi
-
- cap md5 \
- "${cap_md5_args[@]}" \
- "$verify_path"
+ cap_verify_md5_parse_commandline_parameters "$@"
+
+ cap_md5_args+=(--append --output-files-only)
+ if [[ "$CAP_VERIFICATION_DRY_RUN" == "true" ]]; then
+ cap_md5_args+=(--dry-run)
+ else
+ cap_md5_args+=(--output "$CAP_VERIFICATION_OUTPUT_FILE")
+ fi
+
+ cap md5 \
+ "${cap_md5_args[@]}" \
+ "$verify_path"
}
cap_verify_md5_parse_commandline_parameters() {
- # Define the named commandline options
- if ! OPTIONS=$(getopt -o "" --long ignore:,select: -- "$@"); then
- echo "See CAPTURE help for cap_verify_md5." >&2
- exit 1
- fi
- eval set -- "$OPTIONS"
-
- # Set default values for the named parameters
- cap_md5_args=()
-
- # Parse the optional named command line options
- while true; do
- case "$1" in
- --select|--ignore)
- cap_md5_args+=("$1" "$2")
- shift 2 ;;
- --)
- shift
- break;;
- esac
- done
-
- # Check that the required file url parameter was provided
- if [ "$#" -ne 1 ]; then
- echo "Error: incorrect number of parameters" >&2
- echo "Usage: cap_verify_md5 [options] URL" >&2
- echo "See CAPTURE help for cap_verify_md5" >&2
- exit 1
- fi
- verify_path="$1"
+ # Define the named commandline options
+ if ! OPTIONS=$(getopt -o "" --long ignore:,select: -- "$@"); then
+ echo "See CAPTURE help for cap_verify_md5." >&2
+ exit 1
+ fi
+ eval set -- "$OPTIONS"
+
+ # Set default values for the named parameters
+ cap_md5_args=()
+
+ # Parse the optional named command line options
+ while true; do
+ case "$1" in
+ --select | --ignore)
+ cap_md5_args+=("$1" "$2")
+ shift 2
+ ;;
+ --)
+ shift
+ break
+ ;;
+ esac
+ done
+
+ # Check that the required file url parameter was provided
+ if [ "$#" -ne 1 ]; then
+ echo "Error: incorrect number of parameters" >&2
+ echo "Usage: cap_verify_md5 [options] URL" >&2
+ echo "See CAPTURE help for cap_verify_md5" >&2
+ exit 1
+ fi
+ verify_path="$1"
}
diff tests/setup_suite.bash.orig tests/setup_suite.bash
--- tests/setup_suite.bash.orig
+++ tests/setup_suite.bash
@@ -1,32 +1,32 @@
setup_suite() {
- # Make sure the `cap` command in this CAPTURE code base is used in tests
- # instead of the one installed in the system.
- PATH="$(pwd):$PATH"
- export PATH
-
- # Make sure the capture install path is pointing to the development
- # environment.
- CAP_INSTALL_PATH="$(pwd)"
- export CAP_INSTALL_PATH
-
- # Location of the CAPTURE framework development environment.
- CAP_DEVELOPMENT_PATH="$(pwd)"
- export CAP_DEVELOPMENT_PATH
-
- # Setup a unique temporary directory for BATS tests to fix temporary file
- # errors on Cheaha where developers share temp directories.
- BATS_TMPDIR="$(mktemp -d)"
- export BATS_TMPDIR
-
- # Setup test locations for caprc files. Otherwise, the developer's actual
- # caprc files will be used and make tests fail.
- CAP_ETC_RC_PATH="$(mktemp -p "$BATS_TMPDIR")"
- export CAP_ETC_RC_PATH
- CAP_HOME_RC_PATH="$(mktemp -p "$BATS_TMPDIR")"
- export CAP_HOME_RC_PATH
+ # Make sure the `cap` command in this CAPTURE code base is used in tests
+ # instead of the one installed in the system.
+ PATH="$(pwd):$PATH"
+ export PATH
+
+ # Make sure the capture install path is pointing to the development
+ # environment.
+ CAP_INSTALL_PATH="$(pwd)"
+ export CAP_INSTALL_PATH
+
+ # Location of the CAPTURE framework development environment.
+ CAP_DEVELOPMENT_PATH="$(pwd)"
+ export CAP_DEVELOPMENT_PATH
+
+ # Setup a unique temporary directory for BATS tests to fix temporary file
+ # errors on Cheaha where developers share temp directories.
+ BATS_TMPDIR="$(mktemp -d)"
+ export BATS_TMPDIR
+
+ # Setup test locations for caprc files. Otherwise, the developer's actual
+ # caprc files will be used and make tests fail.
+ CAP_ETC_RC_PATH="$(mktemp -p "$BATS_TMPDIR")"
+ export CAP_ETC_RC_PATH
+ CAP_HOME_RC_PATH="$(mktemp -p "$BATS_TMPDIR")"
+ export CAP_HOME_RC_PATH
}
teardown_suite() {
- # Remove the unique temporary directory created in setup_suite().
- rm -rf "$BATS_TMPDIR"
+ # Remove the unique temporary directory created in setup_suite().
+ rm -rf "$BATS_TMPDIR"
}
(Truncated to last 13333 characters out of 79728)
See detailed reports in MegaLinter artifacts
You could have the same capabilities but better runtime performances if you use a MegaLinter flavor:
- oxsecurity/megalinter/flavors/documentation@v9.4.0 (51 linters)
- oxsecurity/megalinter/flavors/ruby@v9.4.0 (52 linters)
- oxsecurity/megalinter/flavors/rust@v9.4.0 (52 linters)
Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)
- Documentation: Custom Flavors
- Command:
npx mega-linter-runner@9.4.0 --custom-flavor-setup --custom-flavor-linters BASH_EXEC,BASH_SHELLCHECK,BASH_SHFMT,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER

Show us your support by starring ⭐ the repository
toniecrumley
marked this pull request as ready for review
April 21, 2026 20:20
toniecrumley
requested review from
Daltoncp,
blasseigne,
eokunbor,
kjamescasper,
lizzyjoan,
mckay33,
sashataluri,
tchowton and
tsoelter
April 21, 2026 20:20
tsoelter
approved these changes
Apr 22, 2026
Daltoncp
approved these changes
Apr 29, 2026
Daltoncp
left a comment
There was a problem hiding this comment.
Everything worked, and read through well for me.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improve the README to be more attractive to prospective users and include a quick-start guide.
Author Checklist
See instructions here.
or unrelated files are part of this pull request. Use
.gitignoreto preventirrelevant files from accidentally being included.
message should show in the GitHub pull request status box above the
"Merge pull request" button.
branch has conflicts that must be resolved" message in the GitHub pull
request status box above the "Merge pull request" button.
commandsdirectoryhas been updated if necessary.
Self/Peer Review Checklist (Coding Guidelines)
why, not what the code is doing. Avoid excessive or redundant commenting.
Setup
Comment out the following Lasseigne Lab .caprc line from your home ~/.caprc.
Get the code for the pull request.
Test
Run the automated test suite.
Review the README content and test the Quick Start guide. Review the DOCUMENTATION down to the Quick Start guide section.
Review the example scripts in the project-template.
Cleanup