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

Explicitely exclude files from being linted by MegaLinter #358

Merged
merged 4 commits into from
Aug 26, 2024

Conversation

johannaengland
Copy link
Contributor

Scope and purpose

MegaLinter passes a list of files to black and ruff without using force-exclude the linters did ignore the basic exclude configuration in that case, which is why FILTER_REGEX_EXCLUDE was needed.

The issue I made in MegaLinter about that topic: oxsecurity/megalinter#3915
Force-exclude in black configuration: https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#force-exclude
Force-exclude in ruff configuration: https://docs.astral.sh/ruff/settings/#force-exclude

Contributor Checklist

Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to Zino can be found in the
README.

  • Added a changelog fragment for towncrier
  • Added/amended tests for new/changed code
  • Added/changed documentation
  • Linted/formatted the code with black, ruff and isort, easiest by using pre-commit
  • The first line of the commit message continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See https://cbea.ms/git-commit/
  • If applicable: Created new issues if this PR does not fix the issue completely/there is further work to be done

These files are already excluded in the linter configs
MegaLinter passes a list of files to black and ruff
Before the linters did ignore the exclude configuration in that case
@johannaengland johannaengland self-assigned this Aug 22, 2024
Copy link

codecov bot commented Aug 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.57%. Comparing base (c0c5696) to head (92a0c65).
Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #358   +/-   ##
=======================================
  Coverage   98.57%   98.57%           
=======================================
  Files          77       77           
  Lines        9699     9699           
=======================================
  Hits         9560     9560           
  Misses        139      139           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@johannaengland johannaengland merged commit 850ae3b into Uninett:master Aug 26, 2024
8 of 9 checks passed
@johannaengland johannaengland deleted the workflows/megalinter branch August 26, 2024 20:50
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.

2 participants