Add linting check - #53
Conversation
jgchris
left a comment
There was a problem hiding this comment.
uh oh
Is there a way to set a flag to not fail the check on a fail? Like what we have with the test coverage? Or do you just have to pass in a bunch of ignore flags to mypy
| Returns: | ||
| Exit code (0 for success, 1 for errors found) | ||
| """ | ||
| print("Starting the Linting Check") |
There was a problem hiding this comment.
Can you remove the "found a x..." print statements in this file? They seem a little excessive
There was a problem hiding this comment.
Thanks for catching this! Just made those updates
|
|
||
|
|
||
| def visit_node(node: ast.AST, file_path: str, ignore_codes: set[str], ignore_names: set[str] = None) -> list[models.StyleError]: | ||
| def visit_node(node: ast.AST, file_path: str, ignore_codes: set[str], ignore_names: set[str] = set()) -> list[models.StyleError]: |
There was a problem hiding this comment.
Prob don't want a mutable default argument here
There was a problem hiding this comment.
The alternative is changing the function itself like I just did, but I hate this solution because it feels super redundant. Nevertheless, the requested changes were made
|
|
||
|
|
||
| def check_file(file_path: Path, ignore_codes: set[str], ignore_names: set[str] = None, config: dict[str, Any] = None) -> list[models.StyleError]: | ||
| def check_file(file_path: Path, ignore_codes: set[str], ignore_names: set[str] = set(), config: dict[str, Any] | None = None) -> list[models.StyleError]: |
There was a problem hiding this comment.
Same as the other one
I did a few things to make it so that there could be a linting check run after the standard check, as long as it's set up. I also added parsing and other things for it to help make this happen