-
Notifications
You must be signed in to change notification settings - Fork 94
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
use toLowerCase to compare all files and paths #505
Conversation
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy will stop sending the deprecated coverage status from June 5th, 2024. Learn more |
.sortBy(name => Math.abs(filename.length - name.length)) | ||
.headOption | ||
} | ||
|
||
def getFilenameFromPath(filename: String): String = { | ||
Try(Paths.get(filename).getFileName.toString).getOrElse(filename) | ||
Try(Paths.get(filename).getFileName.toString.toLowerCase).getOrElse(filename.toLowerCase) |
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.
Do you know if this Paths.get(filename) should rely on the lower case or if they return the file on either case?
Is there a possibility to add a test for this?
Anyway I am fine moving forward if this unblocks a customer, but adding a follow up PR with a test could be cool
I guess I would expect some assertion on the specific file, but I also didn't touch this repo much, and see some similar tests, so LGTM! |
No description provided.