Closed nnobelis closed 2 years ago
Thinking about it maybe this is not a bug. Maybe this expression is just not supported. Please advise.
As a sidenote, should ORT not use 2 instead for glob matching ?
Unfortunately, that standard implementation behaves oddly in some edge cases, i.e. it does not match files that we expect to be matched for certain patterns.
As anyone an idea what happens here ?
Probably @fviernau can advise.
@nnobelis @sschuberth , I wonder if the AntPathMatcher
syntax is actually the best choice.
When I have some time I'd make some research what other implementations are available, so that we could switch
to something else. Do you agree at least rearching it makes sense?
Meanwhile, we could merge my above PR to have things aligned.
Do you agree at least searching it makes sense?
Definitively. Spring also as a replacement for AntPathMatcher
if I am not mistaken:
https://www.baeldung.com/spring-5-mvc-url-matching
When I have some time I'd make some research what other implementations are available, so that we could switch to something else. Do you agree at least rearching it makes sense?
Yes, doing some research does not hurt, and I did that myself some time ago as I was considering to write a Kotlin-only (and multi-platform) glob matcher because the Kotlin stdlib unfortunately does not provide one (nor could I find a decent one, except for this outdated library). An article I found helpful was https://research.swtch.com/glob as it gives some nice overview of the approaches used in different programming languages and their performance.
JGit also has an (internal) class to convert .gitignore
-style globs to Java Regexes that we maybe could use.
I've extracted improving the externally facing glob syntax to a separate ticket: see #5908.
We have a project with the following path exclude
However it seems this pattern excludes the
build.gradle
in the project.After debugging, I came to evaluate this bit of code in ORT Reporter:
and to my surprise it evaluates to
true
.Has anyone an idea what happens here ? It does not seem to conform to what's in Spring Javadoc 1.
As a sidenote, should ORT not use 2 instead for glob matching ?