From de803a2af9c32937dc00cd8fe0b4210f89cab5b8 Mon Sep 17 00:00:00 2001 From: Nathaniel Landau Date: Wed, 18 Aug 2021 12:29:36 -0400 Subject: [PATCH] fix spelling errors --- .hooks/pre-commit.sh | 4 ++-- README.md | 2 +- test/alerts.bats | 2 +- test/arrays.bats | 2 +- test/baseHelpers.bats | 2 +- test/dates.bats | 2 +- test/files.bats | 2 +- test/numbers.bats | 2 +- test/textProcessing.bats | 10 +++++----- utilities/baseHelpers.bash | 2 +- utilities/files.bash | 4 ++-- utilities/textProcessing.bash | 2 +- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.hooks/pre-commit.sh b/.hooks/pre-commit.sh index 5f4a645..08e168f 100755 --- a/.hooks/pre-commit.sh +++ b/.hooks/pre-commit.sh @@ -10,7 +10,7 @@ _mainScript_() { # ARGS: $1 (Required) - File to check # OUTS: None # USAGE: Call the function - # NOTE: Requires a file localed at `~/.git_stop_words` containing one word per line. + # NOTE: Requires a file located at `~/.git_stop_words` containing one word per line. # Fail if any matching words are present in the diff @@ -100,7 +100,7 @@ _mainScript_() { success "yamllint passed: '${1}'" fi else - notice "No YAML linter installed. Continuiing..." + notice "No YAML linter installed. Continuing..." fi } diff --git a/README.md b/README.md index ef5d590..c84ec13 100644 --- a/README.md +++ b/README.md @@ -157,7 +157,7 @@ Common utilities for working with files. * `_extract_` Extract a compressed file * `_json2yaml_` Convert JSON to YAML uses python * `_makeSymlink_` Creates a symlink and backs up a file which may be overwritten by the new symlink. If the exact same symlink already exists, nothing is done. - * `_parseYAML_` Convert a YANML file into BASH variables for use in a shell script + * `_parseYAML_` Convert a YAML file into BASH variables for use in a shell script * `_readFile_` Prints each line of a file * `_sourceFile_` Source a file into a script * `_uniqueFileName_` Ensure a file to be created has a unique filename to avoid overwriting other files diff --git a/test/alerts.bats b/test/alerts.bats index dad7509..61ae399 100755 --- a/test/alerts.bats +++ b/test/alerts.bats @@ -27,7 +27,7 @@ setup() { pushd "${TESTDIR}" >&2 - ######## DEFAUL FLAGS ######## + ######## DEFAULT FLAGS ######## LOGFILE="${TESTDIR}/logs/log.txt" QUIET=false LOGLEVEL=ERROR diff --git a/test/arrays.bats b/test/arrays.bats index 64e1a7e..ab1a632 100755 --- a/test/arrays.bats +++ b/test/arrays.bats @@ -33,7 +33,7 @@ setup() { B=(1 2 3 4 5 6) DUPES=(1 2 3 1 2 3) - ######## DEFAUL FLAGS ######## + ######## DEFAULT FLAGS ######## LOGFILE="${TESTDIR}/logs/log.txt" QUIET=false LOGLEVEL=ERROR diff --git a/test/baseHelpers.bats b/test/baseHelpers.bats index 318cc50..b212e9b 100755 --- a/test/baseHelpers.bats +++ b/test/baseHelpers.bats @@ -36,7 +36,7 @@ setup() { pushd "${TESTDIR}" >&2 - ######## DEFAUL FLAGS ######## + ######## DEFAULT FLAGS ######## LOGFILE="${TESTDIR}/logs/log.txt" QUIET=false LOGLEVEL=ERROR diff --git a/test/dates.bats b/test/dates.bats index 525b862..48d9d42 100755 --- a/test/dates.bats +++ b/test/dates.bats @@ -29,7 +29,7 @@ fi setup() { TESTDIR="$(temp_make)" - ######## DEFAUL FLAGS ######## + ######## DEFAULT FLAGS ######## LOGFILE="${TESTDIR}/logs/log.txt" QUIET=false LOGLEVEL=OFF diff --git a/test/files.bats b/test/files.bats index 2fd2d8b..6d261f0 100755 --- a/test/files.bats +++ b/test/files.bats @@ -45,7 +45,7 @@ setup() { pushd "${TESTDIR}" &>/dev/null - ######## DEFAUL FLAGS ######## + ######## DEFAULT FLAGS ######## LOGFILE="${TESTDIR}/logs/log.txt" QUIET=false LOGLEVEL=OFF diff --git a/test/numbers.bats b/test/numbers.bats index d9653cf..e8d7beb 100755 --- a/test/numbers.bats +++ b/test/numbers.bats @@ -45,7 +45,7 @@ setup() { pushd "${TESTDIR}" &>/dev/null - ######## DEFAUL FLAGS ######## + ######## DEFAULT FLAGS ######## LOGFILE="${TESTDIR}/logs/log.txt" QUIET=false LOGLEVEL=OFF diff --git a/test/textProcessing.bats b/test/textProcessing.bats index f7e5bdb..88da4b3 100755 --- a/test/textProcessing.bats +++ b/test/textProcessing.bats @@ -45,7 +45,7 @@ setup() { pushd "${TESTDIR}" &>/dev/null - ######## DEFAUL FLAGS ######## + ######## DEFAULT FLAGS ######## LOGFILE="${TESTDIR}/logs/log.txt" QUIET=false LOGLEVEL=OFF @@ -93,13 +93,13 @@ _testCleanString_() { assert_output "I AM IN CAPS" } - @test "_cleanString_: remove spaces before/aftrer dashes" { + @test "_cleanString_: remove spaces before/after dashes" { run _cleanString_ "word - another- word -another-word" assert_success assert_output "word-another-word-another-word" } - @test "_cleanString_: remove spaces before/aftrer underscores" { + @test "_cleanString_: remove spaces before/after underscores" { run _cleanString_ "word _ another_ word _another_word" assert_success assert_output "word_another_word_another_word" @@ -173,9 +173,9 @@ _testStopWords_() { _testStopWords_ @test "_escape_" { - run _escape_ "Here is some / text to & be - escape'd" + run _escape_ "Here is some / text to & be - escaped" assert_success - assert_output "Here\ is\ some\ /\ text\ to\ &\ be\ -\ escape'd" + assert_output "Here\ is\ some\ /\ text\ to\ &\ be\ -\ escaped" } @test "_htmlEncode_" { diff --git a/utilities/baseHelpers.bash b/utilities/baseHelpers.bash index 2cb6172..e928168 100644 --- a/utilities/baseHelpers.bash +++ b/utilities/baseHelpers.bash @@ -3,7 +3,7 @@ _execute_() { # ARGS: $1 (Required) - The command to be executed. Quotation marks MUST be escaped. # $2 (Optional) - String to display after command is executed # OPTS: -v Always print debug output from the execute function - # -p Pass a failed command with 'return 0'. This effecively bypasses set -e. + # -p Pass a failed command with 'return 0'. This effectively bypasses set -e. # -e Bypass _alert_ functions and use 'echo RESULT' # -s Use '_alert_ success' for successful output. (default is 'info') # -q Do not print output (QUIET mode) diff --git a/utilities/files.bash b/utilities/files.bash index fae170f..f81f2ba 100644 --- a/utilities/files.bash +++ b/utilities/files.bash @@ -7,7 +7,7 @@ _listFiles_() { # NOTE: Searches are NOT case sensitive and MUST be quoted # USAGE: _listFiles_ glob "*.txt" "some/backup/dir" # _listFiles_ regex ".*\.txt" "some/backup/dir" - # readarry -t array < <(_listFiles_ g "*.txt") + # readarray -t array < <(_listFiles_ g "*.txt") [[ $# -lt 2 ]] && { error 'Missing required argument to _listFiles_()!' @@ -446,7 +446,7 @@ _makeSymlink_() { } _parseYAML_() { - # DESC: Convert a YANML file into BASH variables for use in a shell script + # DESC: Convert a YAML file into BASH variables for use in a shell script # ARGS: $1 (Required) - Source YAML file # $2 (Required) - Prefix for the variables to avoid namespace collisions # OUTS: Prints variables and arrays derived from YAML File diff --git a/utilities/textProcessing.bash b/utilities/textProcessing.bash index ade00f3..04a18ec 100644 --- a/utilities/textProcessing.bash +++ b/utilities/textProcessing.bash @@ -18,7 +18,7 @@ _cleanString_() { # - leading white space # - trailing white space # - multiple spaces become a single space - # - remove spaces before and aftrer -_ + # - remove spaces before and after -_ local opt local lc=false