Skip to content

Add linting check - #53

Merged
47thomasj merged 18 commits into
devfrom
add-linting-check
Jun 24, 2026
Merged

Add linting check#53
47thomasj merged 18 commits into
devfrom
add-linting-check

Conversation

@Emaniacinator

Copy link
Copy Markdown
Contributor

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

@jgchris jgchris left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread LintingCheck.py
Returns:
Exit code (0 for success, 1 for errors found)
"""
print("Starting the Linting Check")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the "found a x..." print statements in this file? They seem a little excessive

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this! Just made those updates

Comment thread StandardCheck.py Outdated


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]:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prob don't want a mutable default argument here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread StandardCheck.py Outdated


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]:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the other one

@47thomasj
47thomasj merged commit f638ba5 into dev Jun 24, 2026
2 checks passed
@47thomasj
47thomasj deleted the add-linting-check branch June 24, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants