-
Notifications
You must be signed in to change notification settings - Fork 24
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
Allow passing custom CSS file to html_coverage
#56
Conversation
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.
Thanks, just requested a tiny change, and please add a test. It can be something trivial, eg
-
you provide a CSS file and then grep for it in the result, and
-
you provide a bogus argument (eg an integer) and it errors.
src/LocalCoverage.jl
Outdated
|
||
See [`generate_coverage`](@ref). | ||
""" | ||
function html_coverage(coverage::PackageCoverage; gitroot = ".", open = false, dir = tempdir()) | ||
function html_coverage(coverage::PackageCoverage; gitroot = ".", open = false, dir = tempdir(), css::Union{Nothing,String}=nothing) |
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.
function html_coverage(coverage::PackageCoverage; gitroot = ".", open = false, dir = tempdir(), css::Union{Nothing,String}=nothing) | |
function html_coverage(coverage::PackageCoverage; gitroot = ".", open = false, dir = tempdir(), css::Union{Nothing,AbstractString}=nothing) |
Thanks for the suggestions! I added a test for the argument error you suggested, and generation of a coverage report using a dummy CSS file, testing for equality using the FileCmp package as a extra test dependency. Hope that is OK. |
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.
Thanks for the very clean code.
I added a keyword argument to
html_coverage
that takes the path to a custom CSS file, to be used asUsing e.g. a CSS file based on the Gruvbox theme, it can look like
gruvbox.zip