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

Suggestion: Ignore pattern directly instead of pointing to a file? #586

Closed
ppati000 opened this issue Nov 23, 2022 · 3 comments · Fixed by #587
Closed

Suggestion: Ignore pattern directly instead of pointing to a file? #586

ppati000 opened this issue Nov 23, 2022 · 3 comments · Fixed by #587

Comments

@ppati000
Copy link
Contributor

The --ignore flag does not take a glob pattern, but a path to a file that contains the ignored patterns. This level of indirection is not always needed. For example, I'd love to have a simple command that runs all *.test.ts files except for files in a specific directory (e.g., a directory that contains end-to-end tests).

@ljharb what do you think about adding an --ignorePattern or similar option that takes a glob pattern? Would be willing to raise a PR :)

@ljharb
Copy link
Collaborator

ljharb commented Nov 24, 2022

That does seem reasonable - basically, shorthand for a one-line ignore file.

@ljharb
Copy link
Collaborator

ljharb commented Nov 24, 2022

Note, that we'd have to be very very explicit about how --ignore and --ignorePattern worked together - either they're mutually exclusive, or ignorePattern is concatenated to --ignore's contents, or the reverse.

ppati000 added a commit to ppati000/tape that referenced this issue Nov 24, 2022
This PR introduces the --ignorePattern flag as a shorthand for ignoring test files.

The flag may be used together with --ignore; the input will be concatenated in that case. I figured this behavior would make the most sense, since users may want to ignore everything in .gitignore and some other files on top.

Let me know if this looks good, then I'll also add some documentation :)

Fixes tape-testing#586
@ppati000
Copy link
Contributor Author

@ljharb awesome, just opened #587. See the description there! :)

ljharb pushed a commit to ppati000/tape that referenced this issue Nov 29, 2022
This PR introduces the --ignore-pattern flag as a shorthand for ignoring test files.

The flag may be used together with --ignore; the input will be concatenated in that case. I figured this behavior would make the most sense, since users may want to ignore everything in .gitignore and some other files on top.

Fixes tape-testing#586
ljharb pushed a commit to ppati000/tape that referenced this issue Nov 29, 2022
This PR introduces the --ignore-pattern flag as a shorthand for ignoring test files.

The flag may be used together with --ignore; the input will be concatenated in that case. I figured this behavior would make the most sense, since users may want to ignore everything in .gitignore and some other files on top.

Fixes tape-testing#586
ljharb pushed a commit to ppati000/tape that referenced this issue Nov 29, 2022
This PR introduces the --ignore-pattern flag as a shorthand for ignoring test files.

The flag may be used together with --ignore; the input will be concatenated in that case. I figured this behavior would make the most sense, since users may want to ignore everything in .gitignore and some other files on top.

Fixes tape-testing#586
@ljharb ljharb closed this as completed in 8c9fe8e Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants