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

fix: Avoid running linters on files in fuzz/generated #3436

Closed
terriko opened this issue Oct 19, 2023 · 1 comment · Fixed by #3441
Closed

fix: Avoid running linters on files in fuzz/generated #3436

terriko opened this issue Oct 19, 2023 · 1 comment · Fixed by #3441
Assignees
Labels
bug Something isn't working hacktoberfest good issue for hacktoberfest participation

Comments

@terriko
Copy link
Contributor

terriko commented Oct 19, 2023

Description

Reldated:

It came up in #3434 that our CI system is running linters on files in fuzz/generated -- since these are generated files and not intended for us to edit, we should probably ignore those. I'm guessing we'll need to add something to the config for black, isort and other tools, and we may need to modify the CI job to make sure that it uses config if there isn't a file already in use, and make sure that the same stuff is used when pre-commit is run locally.

The pre-commit config can be found here:
https://github.com/intel/cve-bin-tool/blob/main/.pre-commit-config.yaml

You can see in there that black has its own config file here:
https://github.com/intel/cve-bin-tool/blob/main/bandit.conf

To reproduce

Steps to reproduce the behaviour:

  1. Add in a file in fuzz/generated to a PR
  2. Run tests in github ac tions

Expected behaviour:

  • File in the generated/ directory should be ignored

Actual behaviour:

  • isort, black, flake8 seem to run on files in the fuzz/generated directory and may report errors.
@terriko terriko added bug Something isn't working hacktoberfest good issue for hacktoberfest participation labels Oct 19, 2023
@mastersans
Copy link
Member

Hey can i work on this issue?

terriko pushed a commit that referenced this issue Oct 23, 2023
* fixes #3436
Added an exclusion of fuzz/generated sub-directory for linting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hacktoberfest good issue for hacktoberfest participation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants