-
Notifications
You must be signed in to change notification settings - Fork 52
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
Add more standard 'excludes' values #351
Conversation
src/MakePotCommand.php
Outdated
@@ -47,7 +47,7 @@ class MakePotCommand extends WP_CLI_Command { | |||
/** | |||
* @var array | |||
*/ | |||
protected $exclude = [ 'node_modules', '.git', '.svn', '.CVS', '.hg', 'vendor', 'Gruntfile.js', 'webpack.config.js', '*.min.js' ]; | |||
protected $exclude = [ 'node_modules', '.*', '_*', 'vendor', 'Gruntfile.js', 'webpack.config.js', '*.min.js', 'test', 'tests' ]; |
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.
'.*', '_*'
seem a little broad. Could you share more detail about which folders you're solving for?
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.
@danielbachhuber .cache,.github,.parcel-cache,_entry,_test,_temp
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.
@cliffordp Makes sense. I think it'd be better to list those explicitly for now, if it's alright with you.
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.
Are there any examples of dot files that should be processed, even in edge cases?
Is there an 'include' arg in the MakePot command to override any built-in excludes?
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.
Are there any examples of dot files that should be processed, even in edge cases?
Is there an 'include' arg in the MakePot command to override any built-in excludes?
I don't have any specific examples off the top of my head. Given this is WordPress, I'm sure there's a way for this to be a backwards compatibility break for someone.
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.
better now or you don't want _entry
either?
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.
@cliffordp Could you include some functional tests too? Here's the file they should go in and here is some guidance on best practices, if it's helpful.
Here's some prior art you can steal from: https://github.com/wp-cli/dist-archive-command/pull/61/files
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.
But why _entry
? Is that a common folder that many projects have and that should most likely never checked? It just seems very project-specific
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.
@danielbachhuber not sure I have time to learn how to do that. I searched for .git
since that was an existing excluded item, but I didn't see it.
@swissspidy removed
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.
@cliffordp Sounds good. I added some tests with a58468b
@swissspidy I'm happy with this if you are.
No description provided.