fix spelling errors

This commit is contained in:
Nathaniel Landau
2021-08-18 12:29:36 -04:00
parent e30d82acad
commit de803a2af9
12 changed files with 18 additions and 18 deletions

View File

@@ -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
}

View File

@@ -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

View File

@@ -27,7 +27,7 @@ setup() {
pushd "${TESTDIR}" >&2
######## DEFAUL FLAGS ########
######## DEFAULT FLAGS ########
LOGFILE="${TESTDIR}/logs/log.txt"
QUIET=false
LOGLEVEL=ERROR

View File

@@ -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

View File

@@ -36,7 +36,7 @@ setup() {
pushd "${TESTDIR}" >&2
######## DEFAUL FLAGS ########
######## DEFAULT FLAGS ########
LOGFILE="${TESTDIR}/logs/log.txt"
QUIET=false
LOGLEVEL=ERROR

View File

@@ -29,7 +29,7 @@ fi
setup() {
TESTDIR="$(temp_make)"
######## DEFAUL FLAGS ########
######## DEFAULT FLAGS ########
LOGFILE="${TESTDIR}/logs/log.txt"
QUIET=false
LOGLEVEL=OFF

View File

@@ -45,7 +45,7 @@ setup() {
pushd "${TESTDIR}" &>/dev/null
######## DEFAUL FLAGS ########
######## DEFAULT FLAGS ########
LOGFILE="${TESTDIR}/logs/log.txt"
QUIET=false
LOGLEVEL=OFF

View File

@@ -45,7 +45,7 @@ setup() {
pushd "${TESTDIR}" &>/dev/null
######## DEFAUL FLAGS ########
######## DEFAULT FLAGS ########
LOGFILE="${TESTDIR}/logs/log.txt"
QUIET=false
LOGLEVEL=OFF

View File

@@ -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_" {

View File

@@ -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)

View File

@@ -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

View File

@@ -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