Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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'm worried about this one being a bit too general. Are core dumps seriously just called
core
? 😱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.
@zkat That’s the default at least for Linux (although it’s configurable), and Wikipedia agrees by calling it the “traditional” naming of core dumps.
It’s also practical – some people configure their core dump names to have the PID or something like that in them, but that isn’t a sensible default because it can mean your disk filling up with core dumps. Just overwriting a file named
core
every time makes quite a bit of sense…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.
On OS X and other BSD-family Unixes, it's common for core dumps to be in
/var/cores
or/cores
, with a name ofcore.${pid}
. But in those cases, they're not in cwd, so it's less of an issue for this case.I'm personally fine with ignoring
core
by default, as long as it can be explicitly included by a later rule, but it'd be good to see how often this happens empirically by looking at the registry, and how many files namedcore
are not actually core dumps.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.
Oh, actually, I think some versions of SmartOS drop the core file as
core.${pid}
in cwd? Might be worth also addingcore.+([0-9])
as well.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.
@isaacs yup, done! 👍
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.
Some people do encounter problems with this. Is there any way to make sure directories named
core
don't get removed? Something like!core/
+!**/core/
should work (the latter because justcore/
doesn't work in subdirectories), but maybe there's a better way.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.
@larsgw Yeah, that makes sense and I don’t see a better way off the top of my head either. Do you want to open a PR for that?
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.
Here you go #25
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 have a "common" utils repo required through git in almost all my microservices, (basically, types and some classes to ease the communication between them). Suddenly, all my classes and types from the "core" service disappeared in my services.
I think this behaviour should be undone as it breaks functional code, and is included in a minor update.