diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e349be70..f1353e36 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,6 +15,13 @@ jobs: - run: git fetch origin master - uses: flux-framework/pr-validator@master + spelling: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v4 + - name: Check Spelling + uses: crate-ci/typos@bcafd462cb07ef7ba57e34abf458fe20767e808b # v1.19.0 + python-format: name: python format runs-on: ubuntu-latest diff --git a/config/ax_flux_core.m4 b/config/ax_flux_core.m4 index 90885a47..63596bda 100644 --- a/config/ax_flux_core.m4 +++ b/config/ax_flux_core.m4 @@ -71,7 +71,7 @@ AC_DEFUN([AX_FLUX_CORE], [ AC_SUBST(FLUX_PREFIX) AC_SUBST(LIBFLUX_VERSION) # Ensure we find the same flux executable as corresponds to - # to libflux-core found by pkg-config by puting FLUX_PREFIX/bin + # to libflux-core found by pkg-config by putting FLUX_PREFIX/bin # first in AC_PATH_PROG's path # AC_PATH_PROG(FLUX,[flux], diff --git a/config/tap-driver.sh b/config/tap-driver.sh index 90e3fce2..67027149 100755 --- a/config/tap-driver.sh +++ b/config/tap-driver.sh @@ -402,7 +402,7 @@ function setup_result_obj(line) sub("^(not )?ok[ \t]*", "", line) # If the result has an explicit number, get it and strip it; otherwise, - # automatically assing the next progresive number to it. + # automatically assign the next progresive number to it. if (line ~ /^[0-9]+$/ || line ~ /^[0-9]+[^a-zA-Z0-9_]/) { match(line, "^[0-9]+") diff --git a/doc/test/spell.en.pws b/doc/test/spell.en.pws index 591a3014..0f99dffc 100644 --- a/doc/test/spell.en.pws +++ b/doc/test/spell.en.pws @@ -535,3 +535,5 @@ cancelall raiseall IPv4 IPv6 +dne +DNE diff --git a/doc/test/spellcheck b/doc/test/spellcheck index d6310682..ca895cdc 100755 --- a/doc/test/spellcheck +++ b/doc/test/spellcheck @@ -1,7 +1,7 @@ #!/bin/bash if test $man_base_dir; then - set ${man_base_dir}/man*/*.rst + set ${man_base_dir}/*.rst ${man_base_dir}/guide/*.rst ${man_base_dir}/man*/*.rst ${man_base_dir}/man*/common/*.rst fi if test $# == 0; then @@ -22,7 +22,7 @@ if test -z "$ASPELL"; then echo "1..0 # skip because aspell is not installed" exit 0 fi -if ! $ASPELL -n list /dev/null; then +if ! $ASPELL -p $dict -n list /dev/null; then echo "1..$# # skip because aspell dry run failed" exit 0 fi diff --git a/src/bindings/python/fluxacct/accounting/bank_subcommands.py b/src/bindings/python/fluxacct/accounting/bank_subcommands.py index b4e7c8be..8e9b4d36 100644 --- a/src/bindings/python/fluxacct/accounting/bank_subcommands.py +++ b/src/bindings/python/fluxacct/accounting/bank_subcommands.py @@ -107,7 +107,7 @@ def bank_is_active(cur, bank, parent_bank): def check_if_bank_disabled(cur, bank, parent_bank): """ Check if the bank already exists but was disabled first. If so, just - update the 'active' column in the alread existing row. + update the 'active' column in the already existing row. """ cur.execute( "SELECT * FROM bank_table WHERE bank=? AND parent_bank=?", @@ -359,7 +359,7 @@ def get_sub_banks(bank): get_sub_banks(row[0]) get_sub_banks(bank) - # if an exception occcurs while recursively deleting + # if an exception occurs while recursively deleting # the parent banks, then throw the exception and roll # back the changes made to the DB except sqlite3.OperationalError as exc: diff --git a/src/bindings/python/fluxacct/accounting/job_usage_calculation.py b/src/bindings/python/fluxacct/accounting/job_usage_calculation.py index a5c2232e..afa192f6 100755 --- a/src/bindings/python/fluxacct/accounting/job_usage_calculation.py +++ b/src/bindings/python/fluxacct/accounting/job_usage_calculation.py @@ -17,7 +17,7 @@ def update_t_inactive(acct_conn, last_t_inactive, user, bank): """ - Save the timestamp of the most recent inactive job for the assocation. + Save the timestamp of the most recent inactive job for the association. """ u_ts = """ UPDATE job_usage_factor_table SET last_job_timestamp=? WHERE username=? AND bank=? diff --git a/src/bindings/python/fluxacct/accounting/project_subcommands.py b/src/bindings/python/fluxacct/accounting/project_subcommands.py index ff823815..97751177 100644 --- a/src/bindings/python/fluxacct/accounting/project_subcommands.py +++ b/src/bindings/python/fluxacct/accounting/project_subcommands.py @@ -98,7 +98,7 @@ def delete_project(conn, project): cursor.execute(select_stmt, ("%" + project + "%",)) result = cursor.fetchall() warning_stmt = ( - "WARNING: user(s) in the assocation_table still " + "WARNING: user(s) in the association_table still " "reference this project. Make sure to edit user rows to " "account for this deleted project." ) diff --git a/src/cmd/flux-account-priority-update.py b/src/cmd/flux-account-priority-update.py index f20ed951..e023d382 100755 --- a/src/cmd/flux-account-priority-update.py +++ b/src/cmd/flux-account-priority-update.py @@ -52,7 +52,7 @@ def est_sqlite_conn(path): if db_version < fluxacct.accounting.db_schema_version: print( """flux-accounting database out of date; updating DB with """ - """'flux account-update-db' before sending infomation to plugin""" + """'flux account-update-db' before sending information to plugin""" ) # if flux account-update-db fails, we should not attempt to send data from # the DB to the priority plugin, and instead we should abort diff --git a/src/cmd/flux-account-service.py b/src/cmd/flux-account-service.py index dff81ae9..30bf33b1 100755 --- a/src/cmd/flux-account-service.py +++ b/src/cmd/flux-account-service.py @@ -342,7 +342,7 @@ def list_banks(self, handle, watcher, msg, arg): except ValueError as exc: handle.respond_error(msg, 0, f"{exc}") except sqlite3.Error as exc: - handle.respond_error(msg, 0, f"a SQLite error occured: {exc}") + handle.respond_error(msg, 0, f"a SQLite error occurred: {exc}") except Exception as exc: handle.respond_error( msg, 0, f"a non-OSError exception was caught: {str(exc)}" diff --git a/src/plugins/accounting.hpp b/src/plugins/accounting.hpp index 22df9936..4cbec507 100644 --- a/src/plugins/accounting.hpp +++ b/src/plugins/accounting.hpp @@ -50,7 +50,7 @@ class Association { json_t* to_json () const; // convert object to JSON string }; -// - UKNOWN_QUEUE: a queue is specified for a submitted job that flux-accounting +// - UNKNOWN_QUEUE: a queue is specified for a submitted job that flux-accounting // does not know about // - NO_QUEUE_SPECIFIED: no queue was specified for this job // - INVALID_QUEUE: the association does not have permission to run jobs under diff --git a/src/plugins/mf_priority.cpp b/src/plugins/mf_priority.cpp index b0d0e692..e1825d04 100644 --- a/src/plugins/mf_priority.cpp +++ b/src/plugins/mf_priority.cpp @@ -655,7 +655,7 @@ static int validate_cb (flux_plugin_t *p, a = get_association (userid, bank, users, users_def_bank); if (a == nullptr) { - // the assocation could not be found in the plugin's internal map, + // the association could not be found in the plugin's internal map, // so perform a check to see if the map has any loaded // flux-accounting data before rejecting the job bool only_dne_data = check_map_for_dne_only (users, users_def_bank); diff --git a/src/plugins/test/accounting_test01.cpp b/src/plugins/test/accounting_test01.cpp index 6901d780..5d56b65d 100644 --- a/src/plugins/test/accounting_test01.cpp +++ b/src/plugins/test/accounting_test01.cpp @@ -109,7 +109,7 @@ static void test_direct_map_access ( } -// ensure an Assocation* is returned on success +// ensure an Association* is returned on success static void test_get_association_success () { // retrieve user_bank_info object @@ -180,7 +180,7 @@ static void test_get_queue_info_no_queue_specified () } -// ensure UNKOWN_QUEUE is returned when an unrecognized queue is passed in +// ensure UNKNOWN_QUEUE is returned when an unrecognized queue is passed in static void test_get_queue_info_unknown_queue () { Association a = users[1001]["bank_A"]; diff --git a/src/test/checks_run.sh b/src/test/checks_run.sh index 4b8cc88f..bce520a1 100755 --- a/src/test/checks_run.sh +++ b/src/test/checks_run.sh @@ -65,7 +65,7 @@ export PATH=/usr/lib/ccache:$PATH # Ensure ccache dir exists mkdir -p $HOME/.ccache -# clang+ccache requries second cpp pass: +# clang+ccache requires second cpp pass: if echo "$CC" | grep -q "clang"; then CCACHE_CPP=1 fi diff --git a/t/sharness.sh b/t/sharness.sh index c9f2bcac..40de0dfd 100644 --- a/t/sharness.sh +++ b/t/sharness.sh @@ -25,7 +25,7 @@ export SHARNESS_VERSION : ${SHARNESS_TEST_EXTENSION:=t} export SHARNESS_TEST_EXTENSION -# Reset TERM to original terminal if found, otherwise save orignal TERM +# Reset TERM to original terminal if found, otherwise save original TERM [ "x" = "x$SHARNESS_ORIG_TERM" ] && SHARNESS_ORIG_TERM="$TERM" || TERM="$SHARNESS_ORIG_TERM" @@ -182,7 +182,7 @@ trap 'die' EXIT # implicitly by specifying the prerequisite name in calls to test_expect_success # or test_expect_failure. # -# $1 - Name of prerequiste (a simple word, in all capital letters by convention) +# $1 - Name of prerequisite (a simple word, in all capital letters by convention) # # Examples # @@ -580,7 +580,7 @@ test_expect_code() { # Public: Compare two files to see if expected output matches actual output. # -# The TEST_CMP variable defines the command used for the comparision; it +# The TEST_CMP variable defines the command used for the comparison; it # defaults to "diff -u". Only when the test script was started with --verbose, # will the command's output, the diff, be printed to the standard output. # diff --git a/t/t0000-sharness.t b/t/t0000-sharness.t index c372c058..8c265f0f 100755 --- a/t/t0000-sharness.t +++ b/t/t0000-sharness.t @@ -372,12 +372,12 @@ test_expect_success COLOR,PERL_AND_TTY 'sub-sharness still has color' " test_expect_success 'EXPENSIVE prereq not activated by default' " run_sub_test_lib_test no-long 'long test' <<-\\EOF && test_expect_success 'passing test' 'true' - test_expect_success EXPENSIVE 'passing suposedly long test' 'true' + test_expect_success EXPENSIVE 'passing supposedly long test' 'true' test_done EOF check_sub_test_lib_test no-long <<-\\EOF > ok 1 - passing test - > ok 2 # skip passing suposedly long test (missing EXPENSIVE) + > ok 2 # skip passing supposedly long test (missing EXPENSIVE) > # passed all 2 test(s) > 1..2 EOF @@ -386,12 +386,12 @@ test_expect_success 'EXPENSIVE prereq not activated by default' " test_expect_success 'EXPENSIVE prereq is activated by --long' " run_sub_test_lib_test long 'long test' '' '--long' <<-\\EOF && test_expect_success 'passing test' 'true' - test_expect_success EXPENSIVE 'passing suposedly long test' 'true' + test_expect_success EXPENSIVE 'passing supposedly long test' 'true' test_done EOF check_sub_test_lib_test long <<-\\EOF > ok 1 - passing test - > ok 2 - passing suposedly long test + > ok 2 - passing supposedly long test > # passed all 2 test(s) > 1..2 EOF diff --git a/t/t1005-max-jobs-limits.t b/t/t1005-max-jobs-limits.t index ad3bb1a5..a4746d9a 100755 --- a/t/t1005-max-jobs-limits.t +++ b/t/t1005-max-jobs-limits.t @@ -117,7 +117,7 @@ test_expect_success 'a submitted job while at max-running-jobs limit will have a flux cancel ${jobid2} ' -test_expect_success 'submit max number of jobs with a mix of default bank and explicity set bank' ' +test_expect_success 'submit max number of jobs with a mix of default bank and explicitly set bank' ' jobid1=$(flux python ${SUBMIT_AS} 5011 sleep 60) && jobid2=$(flux python ${SUBMIT_AS} 5011 --setattr=system.bank=account3 -n 1 sleep 60) ' diff --git a/t/t1025-flux-account-projects.t b/t/t1025-flux-account-projects.t index 8bb824df..ec7e50f9 100755 --- a/t/t1025-flux-account-projects.t +++ b/t/t1025-flux-account-projects.t @@ -90,7 +90,7 @@ test_expect_success 'editing a user project list with a non-existing project sho test_expect_success 'remove a project from the project_table that is still referenced by at least one user' ' flux account delete-project project_1 > warning_message.out && test_must_fail flux account view-project project_1 > deleted_project.out 2>&1 && - grep "WARNING: user(s) in the assocation_table still reference this project." warning_message.out && + grep "WARNING: user(s) in the association_table still reference this project." warning_message.out && grep "project project_1 not found in project_table" deleted_project.out ' diff --git a/t/t1033-mf-priority-update-job.t b/t/t1033-mf-priority-update-job.t index 668a2856..9687bff2 100755 --- a/t/t1033-mf-priority-update-job.t +++ b/t/t1033-mf-priority-update-job.t @@ -104,7 +104,7 @@ test_expect_success 'check that job is still in original queue' ' grep "\"queue\": \"bronze\"" jobspec.out ' -test_expect_success 'update job with invalud combination (invalid queue)' ' +test_expect_success 'update job with invalid combination (invalid queue)' ' test_must_fail flux update ${jobid} bank=B queue=gold > unavail_queue.out 2>&1 && test_debug "cat unavail_queue.out" && grep "ERROR: mf_priority: queue not valid for user: gold" unavail_queue.out