Accept environment variables spelled with underscores #217
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.
Environment variables with dots are hard to handle in unix shells (e.g. bash). A quick google search for 'environment variables dots' shows that many people struggle with such variables, e.g.:
http://unix.stackexchange.com/questions/93532/exporting-a-variable-with-dot-in-it
http://askubuntu.com/questions/65638/how-to-set-env-with-a-dot
http://stackoverflow.com/questions/2821043/allowed-characters-in-linux-environment-variable-names
To make custom configurations easier on unix systems, this PR makes find-sec-bugs also accept environment variables spelled with underscores (
_
) instead of dots (.
). E.g.findsecbugs_taint_customconfigfile
instead offindsecbugs.taint.customconfigfile
. Using environment variables (rather than system properties) for configuration is e.g. helpful when using find-sec-bugs with gradle.Additionally, I've added a small change that fails early if some custom file/resource cannot be found. Otherwise it would just fail a bit later with an NPE not telling which file/resource could not be found.