-
Notifications
You must be signed in to change notification settings - Fork 97
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
Ignore test files in linters #240
Conversation
8748ce1
to
d3074b2
Compare
d801436
to
b96cf16
Compare
src/.pre-commit-config.yaml.jinja
Outdated
@@ -85,6 +85,8 @@ exclude: | | |||
readme/.*\.(rst|md)$| | |||
# Ignore build and dist directories in addons | |||
/build/|/dist/| | |||
# Ignore test files in addons | |||
/tests/.*\.(wamas|txt|xml)$| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/tests/.*\.(wamas|txt|xml)$| | |
/tests/fixtures/*| |
I would ignore everything in a given dir.
If by chance someone wants to have formatted xmls there the it will be their choices.
Also, I would not tie this to any specific extension.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @simahawk the PR has been updated as your request
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please explain the motivation behind this PR?
b96cf16
to
ed224d8
Compare
hi @yajo thanks for asking. I'm doing some modules that need XML / text files to run unitest and |
Example: you get an example file (xml maybe) from an official doc/example and you want to respect the original. There's no reason to re-format it. |
src/.pre-commit-config.yaml.jinja
Outdated
@@ -85,6 +85,8 @@ exclude: | | |||
readme/.*\.(rst|md)$| | |||
# Ignore build and dist directories in addons | |||
/build/|/dist/| | |||
# Ignore test files in addons | |||
/tests/fixtures/*| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanations.
I think "fixtures" is very confusing here, as it has no special meaning, and otherwise it reminds to pytest fixtures, which have no relationship with what you want.
What about this?
/tests/fixtures/*| | |
/tests/vendor/*| |
"Vendor" is a common word for external code or files that are included in an alien repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine for me. @tuantrantg can you update?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend /tests/resources
as a more generic name for files which the tests depend on. This directory needn't necessarily contain 3rd-party stuff. Failing that, /tests/vendor
is also fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or even samples
better than vendor
one IMO.
ed224d8
to
9966873
Compare
9966873
to
88d154b
Compare
hello @pedrobaeza @carmenbianca @simahawk @yajo I finally updated this to |
@yajo fine for you? |
No description provided.