Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Factor out type check in Linter actions #332

Open
sonniki opened this issue Mar 3, 2025 · 0 comments
Open

Factor out type check in Linter actions #332

sonniki opened this issue Mar 3, 2025 · 0 comments
Labels
good first issue Good for newcomers

Comments

@sonniki
Copy link
Contributor

sonniki commented Mar 3, 2025

We want to factor out the idiom we use in our Linter scripts to check the type of files that they receive as input. It looks like this, for example, in amp_add_class_frames:

if not liutils.is_py_file(file_name):
    # Apply only to Python files.
    _LOG.debug("Skipping file_name='%s'", file_name)
    return []

We want to make it a method in the parent class of all Linter classes, Action. And then we should go over all the scripts in linters and replace the idiom with the new method everywhere applicable.

@sonniki sonniki added the good first issue Good for newcomers label Mar 3, 2025
@sonniki sonniki self-assigned this Mar 3, 2025
@sonniki sonniki removed their assignment Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant