Skip to content

Commit

Permalink
move txt files to folder
Browse files Browse the repository at this point in the history
  • Loading branch information
stg-annon committed Feb 18, 2024
1 parent 0d694e5 commit 07f89ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 1 addition & 2 deletions plugins/findFileErrors/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
log.txt
*_errors.txt
*.txt
7 changes: 5 additions & 2 deletions plugins/findFileErrors/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

plugin_path = Path(__file__).parent

txt_file_path = Path(plugin_path, "errors")
txt_file_path.mkdir(exist_ok=True)

TAG_TEMPLATE = Template("[FileError] $error_type generation error")

def main():
Expand Down Expand Up @@ -45,7 +48,7 @@ def find_scan_errors():
continue
file_errors[m.group(2)] = m.groupdict()

errors_path = Path(plugin_path,"scan_errors.txt")
errors_path = Path(txt_file_path,"scan_errors.txt")
with open(errors_path, "w") as error_log:
for file_path, match_dict in file_errors.items():
file_path = Path(file_path)
Expand All @@ -68,7 +71,7 @@ def find_generate_errors():
continue
file_errors[m.group(2)] = m.groupdict()

errors_path = Path(plugin_path,"generate_errors.txt")
errors_path = Path(txt_file_path,"generate_errors.txt")
with open(errors_path, "w") as error_log:
for file_path, match_dict in file_errors.items():
file_path = Path(file_path)
Expand Down

0 comments on commit 07f89ce

Please sign in to comment.