sbt / sbt-findbugs

FindBugs static analysis plugin for sbt.
Eclipse Public License 1.0
46 stars 13 forks source link

Can't generate HTML output. #25

Open Ferada opened 6 years ago

Ferada commented 6 years ago

Expected vs Actual Behaviour

It should generate HTML output for a report.

Instead it crashes.

Generating the XML works fine though and I can render the XML to HTML with the standalone findbugs binary.

Steps to Reproduce

Configuration is

addSbtPlugin("com.github.sbt" % "sbt-findbugs" % "2.0.0") in project/plugins.sbt, findbugsReportType := Some(FindbugsReport.Html) in build.sbt.

Then output is as follows (same for the other report types apart from the XML one):

sbt findbugs
[info] Loading settings from credentials.sbt,plugins.sbt,idea.sbt ...
[info] Loading global plugins from /home/olof/.sbt/1.0/plugins
Waiting for lock on /home/olof/.ivy2/.sbt.ivy.lock to be available...
[info] Loading settings from plugins.sbt ...
[info] Loading project definition from /home/olof/src/<project>/project
[info] Loading settings from build.sbt ...
[info] Set current project to libplugin (in build file:/home/olof/src/<project>/)
[info] Compiling 1 Scala source to /home/olof/src/<project>/target/classes ...
[info] Done compiling.
[error] Warning: at xsl:variable on line 349 column 56 of default.xsl:
[error]   SXWN9001: A variable with no following sibling instructions has no effect
[error] Warning: at xsl:variable on line 352 column 59 of default.xsl:
[error]   SXWN9001: A variable with no following sibling instructions has no effect
[error] Error on line 72 of default.xsl:
[error]   SEPM0009: Values of 'standalone' and 'omit-xml-declaration' conflict
[error] The following errors occurred during analysis:
[error]   Could not generate HTML output
[error]     net.sf.saxon.trans.XPathException: Values of 'standalone' and 'omit-xml-declaration' conflict
[error]       At net.sf.saxon.serialize.XMLEmitter.writeDeclaration(XMLEmitter.java:229)
[error]       At net.sf.saxon.serialize.XMLEmitter.openDocument(XMLEmitter.java:162)
[error]       At net.sf.saxon.serialize.XMLEmitter.characters(XMLEmitter.java:576)
[error]       At net.sf.saxon.serialize.XMLIndenter.indent(XMLIndenter.java:315)
[error]       At net.sf.saxon.serialize.XMLIndenter.startElement(XMLIndenter.java:113)
[error]       At net.sf.saxon.event.ProxyReceiver.startElement(ProxyReceiver.java:132)
[error]       At net.sf.saxon.event.NamespaceReducer.startElement(NamespaceReducer.java:73)
[error]       At net.sf.saxon.event.ComplexContentOutputter.startContent(ComplexContentOutputter.java:566)
[error]       At net.sf.saxon.event.ComplexContentOutputter.startElement(ComplexContentOutputter.java:189)
[error]       At net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:443)
[error]       At net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:389)
[error]       At net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:669)
[error]       At net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:144)
[error]       At net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:450)
[error]       At net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:389)
[error]       At net.sf.saxon.expr.instruct.Template.applyLeavingTail(Template.java:336)
[error]       At net.sf.saxon.trans.Mode.applyTemplates(Mode.java:1124)
[error]       At net.sf.saxon.Controller.transformDocument(Controller.java:2106)
[error]       At net.sf.saxon.Controller.transform(Controller.java:1705)
[error]       At net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:547)
[error]       At net.sf.saxon.jaxp.TransformerImpl.transform(TransformerImpl.java:179)
[error]       At edu.umd.cs.findbugs.HTMLBugReporter.finish(HTMLBugReporter.java:73)
[error]       At edu.umd.cs.findbugs.DelegatingBugReporter.finish(DelegatingBugReporter.java:89)
[error]       At edu.umd.cs.findbugs.DelegatingBugReporter.finish(DelegatingBugReporter.java:89)
[error]       At edu.umd.cs.findbugs.FindBugs2.analyzeApplication(FindBugs2.java:1138)
[error]       At edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:283)
[error]       At edu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:402)
[error]       At edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1200)
[error]       At edu.umd.cs.findbugs.LaunchAppropriateUI.launch(LaunchAppropriateUI.java:106)
[error]       At edu.umd.cs.findbugs.LaunchAppropriateUI.main(LaunchAppropriateUI.java:198)
[error] Warnings generated: 90
[success] Total time: 24 s, completed 24-May-2018 12:40:35

Environment