Skip to content

Commit

Permalink
Codespell now correctly checks current directory and ignores entire b…
Browse files Browse the repository at this point in the history
…uild/style/ directory
  • Loading branch information
Jbsco committed Dec 20, 2023
1 parent c88d5f1 commit a5fe26e
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions redo/rules/build_style.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,26 +86,16 @@ def _build(self, redo_1, redo_2, redo_3):
os.chdir(cwd)

# Run codespell check:
codespell_cwd = os.getcwd() + os.sep + "*.*"
codespell_cwd = directory + os.sep + "*.*"
codespell_ignore = os.environ["ADAMANT_DIR"] + os.sep + "redo" + os.sep + "codespell" + os.sep + "ignore_list.txt"
codespell_output = "\" 2>&1 | tee -a " + style_log_file + " 1>&2"
codespell_suffix = " -I " + codespell_ignore + " --skip=\"" + style_directory + codespell_output
shell.run_command("codespell "
+ codespell_cwd
+ " -I "
+ codespell_ignore
+ " -S "
+ os.path.basename(style_log_file)
+ " 2>&1 | tee -a "
+ style_log_file
+ " 1>&2")
+ codespell_suffix)
shell.run_command("codespell "
+ build_directory
+ " -I "
+ codespell_ignore
+ " -S "
+ os.path.basename(style_log_file)
+ " 2>&1 | tee -a "
+ style_log_file
+ " 1>&2")
+ codespell_suffix)

# Finally lint any YAML files:
def _yaml_lint(filenames=[]):
Expand Down

0 comments on commit a5fe26e

Please sign in to comment.