[WIP] main: using regex for choosing a paser for given file name #4270
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.
main: using regex for choosing a parser for the given file name
This change extends --map- option to support regular
expression matching with the full file name.
The original --map- option supports glob based matching
and extension comparison with the file basename.
However, two methods are not enough if the file names are too
generic. See #3287 .
The regular expression passed to --map- must be surround
by % character like
--map-RpmMacros='%(.*/)?macros.d/macros.([^/]+)$%'
If you want to match in a case-insensitive way, append `i' after the second % like
--map-RpmMacros='%(.*/)?macros.d/macros.([^/]+)$%i'
If you want to use % as part of an expression, put \ before % for escaping.
TODO: