ordo-one / package-benchmark

Swift benchmark runner with many performance metrics and great CI support
Apache License 2.0
326 stars 25 forks source link

Improve safety of strings used as paths #193

Open hassila opened 1 year ago

hassila commented 1 year ago

So it works on e.g. Windows etc, some input here:

https://rdrr.io/cran/fs/src/R/sanitize.R https://forums.swift.org/t/unsafe-characters-in-file-names-redux/65764

Should check swift-foundation if anything exists already and consider an extension to either system or swift-foundation or string for this.

cleanupStringForShellSafety should be replace with this new function.

hassila commented 7 months ago

Also for absolute threshold checks we don't seem to clean up the string properly (so benchmarks with spaces in the name fails - workaround is to use camel case).