Skip to content

Commit

Permalink
Removing old files. Update verbosity
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph-flinn committed Jan 5, 2024
1 parent 8e4f866 commit e0a3ad8
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 251 deletions.
3 changes: 0 additions & 3 deletions lint-workflow/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ def main(input_args=None):

args = parser.parse_args(input_args)

if args.verbose:
print(f"Args:\n{args}")

if args.command == "lint":
return linter_cmd.run(args.files)

Expand Down
6 changes: 3 additions & 3 deletions lint-workflow/src/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@


class LinterCmd:
def __init__(self, settings: Settings = None, verbose: bool = True) -> None:
self.rules = Rules(settings=settings, verbose=verbose)
def __init__(self, settings: Settings = None) -> None:
self.rules = Rules(settings=settings)

@staticmethod
def extend_parser(subparsers: argparse.ArgumentParser) -> argparse.ArgumentParser:
Expand Down Expand Up @@ -62,7 +62,7 @@ def lint_file(self, filename: str) -> int:
findings = []
max_error_level = 0

print(f"Linting: {filename}\n")
print(f"Linting: {filename}")
with open(filename) as file:
workflow = WorkflowBuilder.build(filename)

Expand Down
26 changes: 13 additions & 13 deletions lint-workflow/src/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class Rules:
job: List[Rule] = []
step: List[Rule] = []

def __init__(self, settings: Settings, verbose: bool = False) -> None:
def __init__(self, settings: Settings) -> None:
for rule in settings.enabled_rules:
module_name = rule.split(".")
module_name = ".".join(module_name[:-1])
Expand All @@ -83,15 +83,15 @@ def __init__(self, settings: Settings, verbose: bool = False) -> None:
except Exception as err:
print(f"Error loading: {rule}\n{err}")

if verbose:
print("===== Loaded Rules =====")
print("workflow rules:")
for rule in self.workflow:
print(f" - {type(rule).__name__}")
print("job rules:")
for rule in self.job:
print(f" - {type(rule).__name__}")
print("step rules:")
for rule in self.step:
print(f" - {type(rule).__name__}")
print("========================\n")
def list(self) -> None:
print("===== Loaded Rules =====")
print("workflow rules:")
for rule in self.workflow:
print(f" - {type(rule).__name__}")
print("job rules:")
for rule in self.job:
print(f" - {type(rule).__name__}")
print("step rules:")
for rule in self.step:
print(f" - {type(rule).__name__}")
print("========================\n")
86 changes: 0 additions & 86 deletions lint-workflow/src/rules.py

This file was deleted.

20 changes: 0 additions & 20 deletions lint-workflow/tests/test_action_update.py

This file was deleted.

23 changes: 0 additions & 23 deletions lint-workflow/tests/test_lint.py

This file was deleted.

66 changes: 0 additions & 66 deletions lint-workflow/tests/test_main.py

This file was deleted.

37 changes: 0 additions & 37 deletions lint-workflow/tests/test_workflow_files.py

This file was deleted.

0 comments on commit e0a3ad8

Please sign in to comment.