mozilla / grcov

Rust tool to collect and aggregate code coverage data for multiple source files
Mozilla Public License 2.0
1.17k stars 148 forks source link

Option to use local bulma instead of jsdelivr CDN #1079

Open legoktm opened 1 year ago

legoktm commented 1 year ago

Hi, thanks for developing grcov!

On https://doc.wikimedia.org we have a pretty restrictive CSP that only allows local/self-hosted resources for both privacy and security reasons (e.g. a broken report). Would it be possible to bundle any necessary resources with grcov so they don't need to be loaded from a remote site? This would also be nice for offline usage.

See for example how a PHPUnit report bundles bootstrap.

calixteman commented 1 year ago

We could just read an env variable which will contain the path of the css file and fallback on the url. That said the bulma version is pinpointed: https://github.com/mozilla/grcov/blob/322fc39acacd75aca0ff1c0a1ec2a3e91f04011c/src/html.rs#L75 and we should probably have the url in the Cargo file.