-
Notifications
You must be signed in to change notification settings - Fork 8
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
Pattern for files to ignore? #5
Comments
I think there could be both a "white list" and a "black list" behavior for dose.py file watching patterns, called {
"pattern": [
{
"action": "ignore",
"value": "*.py[co]",
},
{
"action": "ignore",
"type": "hgignore",
},
{
"action": "ignore",
"type": "regex",
"value": "^\.",
},
{
"action": "watch",
"type": "regex",
"path_type": "absolute",
"value": ".*test.*",
},
{
"action": "ignore",
"type": "regex",
"path_type": "filename",
"value": "^[2-9]{2,3}.*\.py$",
},
{
"action": "watch",
"type": "glob",
"value": "*",
},
]
} One list of dictionaries, which is read in order: if appears an Each dictionary should have at least the The
Like the About the The
The The For the CLI, these would become an option per action, like For the GUI, a new screen should be done to replace the current dialog used for colon-separated globs, giving all the options above described. I first thought on it as three combo boxes and one edit box (for the value) in a table-like (or sheet-like) widget, but this sounds hard to follow with the keyboard. Perhaps keeping a CLI-like syntax in the GUI would be more helpful, e.g. writing the JSON proposed at the beginning as a multiline text box with the CLI options for it:
That's still a sketch for a specification, any idea is welcome. |
I don't like the way the "file pattern glob" is used today in dose.
There's already one common file to store a list of ignoring patterns:
.gitignore
. One can get several examples here.Why not use the same idea to decide whether a file change should be neglect in dose?
But one can also think on a reversed approach: why not watch files only when they're at least staged on git? Explicitly, only a file in
git ls-files
would be watched....and a Mercurial user wouldn't be happy either. For the ignored file, dose would be changed to ignore watching files that matches both
.gitignore
and.hgignore
contents, if any, without defaults. Obviously, these files can be changed on the fly as well, and such a change would change the whole filtering going on.For now, this issue is still an open question about how the "file pattern glob" configuration should be changed to be better. How should we configure dose to allow (without bureaucracy, i.e., "convention over configuration" + DRY):
.git
directory as usually no one changes its contents manually; use the.gitignore
and.hgignore
files)The text was updated successfully, but these errors were encountered: