tetra 0.46.0 → 0.48.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.rubocop.yml +6 -0
- data/README.md +5 -12
- data/SPECIAL_CASES.md +3 -74
- data/integration-tests/build-commons.sh +5 -8
- data/lib/template/kit/CONTENTS +4 -3
- data/lib/template/kit/apache-ant-1.9.4/INSTALL +2 -0
- data/lib/template/kit/apache-ant-1.9.4/KEYS +1497 -0
- data/lib/template/kit/apache-ant-1.9.4/LICENSE +272 -0
- data/lib/template/kit/apache-ant-1.9.4/NOTICE +9 -0
- data/lib/template/kit/apache-ant-1.9.4/README +97 -0
- data/lib/template/kit/apache-ant-1.9.4/WHATSNEW +6108 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/ant +336 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/ant.bat +218 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/ant.cmd +93 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/antRun +24 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/antRun.bat +50 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/antRun.pl +66 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/antenv.cmd +98 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/complete-ant-cmd.pl +114 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/envset.cmd +131 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/lcp.bat +31 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/runant.pl +153 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/runant.py +102 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/runrc.cmd +60 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/ant-bootstrap.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/changelog.xsl +148 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/checkstyle/checkstyle-frames.xsl +299 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/checkstyle/checkstyle-text.xsl +34 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/checkstyle/checkstyle-xdoc.xsl +130 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/coverage-frames.xsl +489 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/jdepend-frames.xsl +487 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/jdepend.xsl +276 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/junit-frames-xalan1.xsl +745 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/junit-frames.xsl +955 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/junit-noframes.xsl +496 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/log.xsl +203 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/maudit-frames.xsl +503 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/mmetrics-frames.xsl +1026 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/tagdiff.xsl +179 -0
- data/lib/template/kit/apache-ant-1.9.4/fetch.xml +335 -0
- data/lib/template/kit/apache-ant-1.9.4/get-m2.xml +121 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/README +3 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-antlr.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-antlr.pom +75 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-bcel.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-bcel.pom +71 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-bsf.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-bsf.pom +74 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-log4j.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-log4j.pom +69 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-oro.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-oro.pom +74 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-regexp.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-regexp.pom +70 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-resolver.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-resolver.pom +69 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-xalan2.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-xalan2.pom +94 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-commons-logging.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-commons-logging.pom +70 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-commons-net.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-commons-net.pom +75 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-jai.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-jai.pom +85 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-javamail.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-javamail.pom +78 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-jdepend.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-jdepend.pom +72 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-jmf.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-jmf.pom +65 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-jsch.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-jsch.pom +74 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-junit.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-junit.pom +101 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-junit4.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-junit4.pom +71 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-launcher.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-launcher.pom +57 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-netrexx.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-netrexx.pom +98 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-parent.pom +151 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-swing.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-swing.pom +66 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-testutil.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-testutil.pom +74 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant.pom +225 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/libraries.properties +65 -0
- data/lib/template/kit/apache-maven-3.2.5/LICENSE +302 -0
- data/lib/template/kit/apache-maven-3.2.5/NOTICE +8 -0
- data/lib/template/kit/apache-maven-3.2.5/README.txt +77 -0
- data/lib/template/kit/apache-maven-3.2.5/bin/m2.conf +8 -0
- data/lib/template/kit/apache-maven-3.2.5/bin/mvn +202 -0
- data/lib/template/kit/apache-maven-3.2.5/bin/mvn.bat +197 -0
- data/lib/template/kit/apache-maven-3.2.5/bin/mvnDebug +200 -0
- data/lib/template/kit/apache-maven-3.2.5/bin/mvnDebug.bat +200 -0
- data/lib/template/kit/apache-maven-3.2.5/bin/mvnyjp +207 -0
- data/lib/template/kit/apache-maven-3.2.5/boot/plexus-classworlds-2.5.2.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/conf/logging/simplelogger.properties +25 -0
- data/lib/template/kit/apache-maven-3.2.5/conf/settings.xml +257 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-api-1.0.0.v20140518.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-api.license +261 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-connector-basic-1.0.0.v20140518.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-connector-basic.license +261 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-impl-1.0.0.v20140518.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-impl.license +261 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-spi-1.0.0.v20140518.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-spi.license +261 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-transport-wagon-1.0.0.v20140518.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-transport-wagon.license +261 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-util-1.0.0.v20140518.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-util.license +261 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aopalliance-1.0.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/cdi-api-1.0.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/cdi-api.license +445 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/commons-cli-1.2.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/commons-io-2.2.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/commons-lang-2.6.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/ext/README.txt +2 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/guava-18.0.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/javax.inject-1.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/jsoup-1.7.2.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/jsoup.license +66 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/jsr250-api-1.0.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/jsr250-api.license +406 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-aether-provider-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-aether-provider.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-artifact-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-artifact.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-compat-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-compat.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-core-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-core.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-embedder-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-embedder.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-model-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-model-builder-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-model-builder.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-model.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-plugin-api-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-plugin-api.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-repository-metadata-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-repository-metadata.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-settings-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-settings-builder-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-settings-builder.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-settings.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/org.eclipse.sisu.inject-0.3.0.M1.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/org.eclipse.sisu.inject.license +261 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/org.eclipse.sisu.plexus-0.3.0.M1.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/org.eclipse.sisu.plexus.license +261 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/plexus-cipher-1.7.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/plexus-cipher.license +445 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/plexus-component-annotations-1.5.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/plexus-interpolation-1.21.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/plexus-sec-dispatcher-1.3.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/plexus-sec-dispatcher.license +445 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/plexus-utils-3.0.20.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/sisu-guice-3.2.3-no_aop.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/slf4j-api-1.7.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/slf4j-api.license +190 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/slf4j-simple-1.7.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/slf4j-simple.license +190 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/wagon-file-2.8.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/wagon-file.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/wagon-http-2.8-shaded.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/wagon-http-shared-2.8.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/wagon-http-shared.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/wagon-http.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/wagon-provider-api-2.8.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/wagon-provider-api.license +202 -0
- data/lib/tetra.rb +30 -29
- data/lib/tetra/facades/ant.rb +27 -0
- data/lib/tetra/{git.rb → facades/git.rb} +29 -24
- data/lib/tetra/facades/mvn.rb +44 -0
- data/lib/tetra/facades/process_runner.rb +65 -0
- data/lib/tetra/facades/tar.rb +20 -0
- data/lib/tetra/{kit_runner.rb → kit.rb} +3 -10
- data/lib/tetra/main.rb +12 -36
- data/lib/tetra/maven_website.rb +1 -1
- data/lib/tetra/packages/archivable.rb +3 -11
- data/lib/tetra/packages/{kit.rb → kit_package.rb} +1 -1
- data/lib/tetra/packages/{built_package.rb → package.rb} +2 -2
- data/lib/tetra/packages/scriptable.rb +27 -15
- data/lib/tetra/project.rb +18 -14
- data/lib/tetra/{commands/ant.rb → ui/ant_subcommand.rb} +5 -5
- data/lib/tetra/ui/dry_run_subcommand.rb +44 -0
- data/lib/tetra/{commands/generate_all.rb → ui/generate_all_subcommand.rb} +5 -5
- data/lib/tetra/{commands/generate_archive.rb → ui/generate_archive_subcommand.rb} +2 -2
- data/lib/tetra/{commands/generate_kit.rb → ui/generate_kit_subcommand.rb} +2 -2
- data/lib/tetra/{commands/generate_script.rb → ui/generate_script_subcommand.rb} +2 -2
- data/lib/tetra/{commands/generate_spec.rb → ui/generate_spec_subcommand.rb} +2 -2
- data/lib/tetra/{commands/get_pom.rb → ui/get_pom_subcommand.rb} +1 -1
- data/lib/tetra/{commands/init.rb → ui/init_subcommand.rb} +1 -1
- data/lib/tetra/{commands/move_jars_to_kit.rb → ui/move_jars_to_kit_subcommand.rb} +1 -1
- data/lib/tetra/{commands/mvn.rb → ui/mvn_subcommand.rb} +5 -5
- data/lib/tetra/{commands/base.rb → ui/subcommand.rb} +19 -6
- data/lib/tetra/version.rb +1 -1
- data/spec/lib/ant_spec.rb +36 -0
- data/spec/lib/archivable_spec.rb +1 -1
- data/spec/lib/built_package_spec.rb +6 -6
- data/spec/lib/kit_package_spec.rb +47 -0
- data/spec/lib/kit_spec.rb +8 -28
- data/spec/lib/mvn_spec.rb +47 -0
- data/spec/lib/project_spec.rb +11 -11
- data/spec/lib/scriptable_spec.rb +8 -16
- data/spec/spec_helper.rb +13 -4
- data/tetra.gemspec +1 -0
- metadata +207 -31
- data/lib/tetra/ant_runner.rb +0 -27
- data/lib/tetra/commands/download_maven_source_jars.rb +0 -29
- data/lib/tetra/commands/dry_run.rb +0 -17
- data/lib/tetra/commands/finish.rb +0 -22
- data/lib/tetra/commands/get_source.rb +0 -30
- data/lib/tetra/commands/list_kit_missing_sources.rb +0 -21
- data/lib/tetra/kit_checker.rb +0 -104
- data/lib/tetra/maven_runner.rb +0 -43
- data/lib/tetra/source_getter.rb +0 -41
- data/spec/lib/ant_runner_spec.rb +0 -45
- data/spec/lib/kit_checker_spec.rb +0 -119
- data/spec/lib/maven_runner_spec.rb +0 -68
- data/spec/lib/source_getter_spec.rb +0 -36
- data/spec/support/kit_runner_examples.rb +0 -15
@@ -0,0 +1,130 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
3
|
+
xmlns:lxslt="http://xml.apache.org/xslt"
|
4
|
+
xmlns:redirect="org.apache.xalan.lib.Redirect"
|
5
|
+
extension-element-prefixes="redirect">
|
6
|
+
|
7
|
+
<!--
|
8
|
+
Licensed to the Apache Software Foundation (ASF) under one or more
|
9
|
+
contributor license agreements. See the NOTICE file distributed with
|
10
|
+
this work for additional information regarding copyright ownership.
|
11
|
+
The ASF licenses this file to You under the Apache License, Version 2.0
|
12
|
+
(the "License"); you may not use this file except in compliance with
|
13
|
+
the License. You may obtain a copy of the License at
|
14
|
+
|
15
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
16
|
+
|
17
|
+
Unless required by applicable law or agreed to in writing, software
|
18
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
19
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
20
|
+
See the License for the specific language governing permissions and
|
21
|
+
limitations under the License.
|
22
|
+
-->
|
23
|
+
|
24
|
+
<xsl:output method="xml" indent="yes"/>
|
25
|
+
<xsl:decimal-format decimal-separator="." grouping-separator="," />
|
26
|
+
|
27
|
+
<xsl:param name="output.dir" select="'.'"/>
|
28
|
+
<xsl:param name="basedir" select="'.'"/>
|
29
|
+
|
30
|
+
<xsl:template match="checkstyle">
|
31
|
+
<document>
|
32
|
+
<properties>
|
33
|
+
<title>Checkstyle Audit</title>
|
34
|
+
</properties>
|
35
|
+
|
36
|
+
<body>
|
37
|
+
<xsl:apply-templates select="." mode="summary"/>
|
38
|
+
<!-- File list part -->
|
39
|
+
<xsl:apply-templates select="." mode="filelist"/>
|
40
|
+
<xsl:apply-templates select="file[count(error) != 0]"/>
|
41
|
+
</body>
|
42
|
+
</document>
|
43
|
+
</xsl:template>
|
44
|
+
|
45
|
+
<xsl:template match="checkstyle" mode="filelist">
|
46
|
+
<section name="Files">
|
47
|
+
<table>
|
48
|
+
<tr>
|
49
|
+
<th>Name</th>
|
50
|
+
<th>Errors</th>
|
51
|
+
</tr>
|
52
|
+
<xsl:apply-templates select="file[count(error) != 0]" mode="filelist">
|
53
|
+
<xsl:sort select="count(error)" order="descending" data-type="number"/>
|
54
|
+
</xsl:apply-templates>
|
55
|
+
</table>
|
56
|
+
</section>
|
57
|
+
</xsl:template>
|
58
|
+
|
59
|
+
<xsl:template match="file" mode="filelist">
|
60
|
+
<tr>
|
61
|
+
<xsl:call-template name="alternated-row"/>
|
62
|
+
<td nowrap="nowrap">
|
63
|
+
<a>
|
64
|
+
<xsl:attribute name="href">
|
65
|
+
<xsl:text>files</xsl:text><xsl:value-of select="substring-after(@name, $basedir)"/><xsl:text>.html</xsl:text>
|
66
|
+
</xsl:attribute>
|
67
|
+
<xsl:value-of select="substring-after(@name, $basedir)"/>
|
68
|
+
</a>
|
69
|
+
</td>
|
70
|
+
<td><xsl:value-of select="count(error)"/></td>
|
71
|
+
</tr>
|
72
|
+
</xsl:template>
|
73
|
+
|
74
|
+
<xsl:template match="file">
|
75
|
+
<redirect:write file="{$output.dir}/files{substring-after(@name, $basedir)}.xml">
|
76
|
+
<document>
|
77
|
+
<properties>
|
78
|
+
<title>Checkstyle Audit</title>
|
79
|
+
</properties>
|
80
|
+
|
81
|
+
<body>
|
82
|
+
<section name="Details for {substring-after(@name, $basedir)}">
|
83
|
+
<table>
|
84
|
+
<tr>
|
85
|
+
<th>Error Description</th>
|
86
|
+
<th>Line</th>
|
87
|
+
</tr>
|
88
|
+
<xsl:for-each select="error">
|
89
|
+
<tr>
|
90
|
+
<xsl:call-template name="alternated-row"/>
|
91
|
+
<td><a title="{@source}"><xsl:value-of select="@message"/></a></td>
|
92
|
+
<td><xsl:value-of select="@line"/></td>
|
93
|
+
</tr>
|
94
|
+
</xsl:for-each>
|
95
|
+
</table>
|
96
|
+
</section>
|
97
|
+
</body>
|
98
|
+
</document>
|
99
|
+
</redirect:write>
|
100
|
+
</xsl:template>
|
101
|
+
|
102
|
+
<xsl:template match="checkstyle" mode="summary">
|
103
|
+
<section name="Summary">
|
104
|
+
<xsl:variable name="fileCount" select="count(file)"/>
|
105
|
+
<xsl:variable name="errorCount" select="count(file/error)"/>
|
106
|
+
<xsl:variable name="fileErrorCount" select="count(file[count(error) != 0])"/>
|
107
|
+
<table>
|
108
|
+
<tr>
|
109
|
+
<th>Files</th>
|
110
|
+
<th>Files With Errors</th>
|
111
|
+
<th>Errors</th>
|
112
|
+
</tr>
|
113
|
+
<tr>
|
114
|
+
<xsl:call-template name="alternated-row"/>
|
115
|
+
<td><xsl:value-of select="$fileCount"/></td>
|
116
|
+
<td><xsl:value-of select="$fileErrorCount"/></td>
|
117
|
+
<td><xsl:value-of select="$errorCount"/></td>
|
118
|
+
</tr>
|
119
|
+
</table>
|
120
|
+
</section>
|
121
|
+
</xsl:template>
|
122
|
+
|
123
|
+
<xsl:template name="alternated-row">
|
124
|
+
<xsl:attribute name="class">
|
125
|
+
<xsl:if test="position() mod 2 = 1">oddrow</xsl:if>
|
126
|
+
<xsl:if test="position() mod 2 = 0">evenrow</xsl:if>
|
127
|
+
</xsl:attribute>
|
128
|
+
</xsl:template>
|
129
|
+
</xsl:stylesheet>
|
130
|
+
|
@@ -0,0 +1,489 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
3
|
+
xmlns:lxslt="http://xml.apache.org/xslt"
|
4
|
+
xmlns:redirect="org.apache.xalan.lib.Redirect"
|
5
|
+
extension-element-prefixes="redirect">
|
6
|
+
<xsl:output method="html" indent="yes"/>
|
7
|
+
<xsl:decimal-format decimal-separator="." grouping-separator="," />
|
8
|
+
<!--
|
9
|
+
Licensed to the Apache Software Foundation (ASF) under one or more
|
10
|
+
contributor license agreements. See the NOTICE file distributed with
|
11
|
+
this work for additional information regarding copyright ownership.
|
12
|
+
The ASF licenses this file to You under the Apache License, Version 2.0
|
13
|
+
(the "License"); you may not use this file except in compliance with
|
14
|
+
the License. You may obtain a copy of the License at
|
15
|
+
|
16
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
17
|
+
|
18
|
+
Unless required by applicable law or agreed to in writing, software
|
19
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
20
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
21
|
+
See the License for the specific language governing permissions and
|
22
|
+
limitations under the License.
|
23
|
+
-->
|
24
|
+
|
25
|
+
<!--
|
26
|
+
|
27
|
+
Sample stylesheet to be used with JProbe 3.0 XML output.
|
28
|
+
|
29
|
+
It creates a set of HTML files a la javadoc where you can browse easily
|
30
|
+
through all packages and classes.
|
31
|
+
|
32
|
+
It is best used with JProbe Coverage Ant task that gives you the benefit
|
33
|
+
of a reference classpath so that you have the list of classes/methods
|
34
|
+
that are not used at all in a given classpath.
|
35
|
+
|
36
|
+
@author Stephane Bailliez <a href="mailto:sbailliez@apache.org"/>
|
37
|
+
|
38
|
+
-->
|
39
|
+
|
40
|
+
<!-- default output directory is current directory -->
|
41
|
+
<xsl:param name="output.dir" select="'.'"/>
|
42
|
+
|
43
|
+
<!-- ======================================================================
|
44
|
+
Root element
|
45
|
+
======================================================================= -->
|
46
|
+
<xsl:template match="/snapshot">
|
47
|
+
<!-- create the index.html -->
|
48
|
+
<redirect:write file="{$output.dir}/index.html">
|
49
|
+
<xsl:call-template name="index.html"/>
|
50
|
+
</redirect:write>
|
51
|
+
|
52
|
+
<!-- create the stylesheet.css -->
|
53
|
+
<redirect:write file="{$output.dir}/stylesheet.css">
|
54
|
+
<xsl:call-template name="stylesheet.css"/>
|
55
|
+
</redirect:write>
|
56
|
+
|
57
|
+
<!-- create the overview-packages.html at the root -->
|
58
|
+
<redirect:write file="{$output.dir}/overview-summary.html">
|
59
|
+
<xsl:apply-templates select="." mode="overview.packages"/>
|
60
|
+
</redirect:write>
|
61
|
+
|
62
|
+
<!-- create the all-packages.html at the root -->
|
63
|
+
<redirect:write file="{$output.dir}/overview-frame.html">
|
64
|
+
<xsl:apply-templates select="." mode="all.packages"/>
|
65
|
+
</redirect:write>
|
66
|
+
|
67
|
+
<!-- create the all-classes.html at the root -->
|
68
|
+
<redirect:write file="{$output.dir}/allclasses-frame.html">
|
69
|
+
<xsl:apply-templates select="." mode="all.classes"/>
|
70
|
+
</redirect:write>
|
71
|
+
|
72
|
+
<!-- process all packages -->
|
73
|
+
<xsl:apply-templates select="./package" mode="write"/>
|
74
|
+
</xsl:template>
|
75
|
+
|
76
|
+
<!-- =======================================================================
|
77
|
+
Frameset definition. Entry point for the report.
|
78
|
+
3 frames: packageListFrame, classListFrame, classFrame
|
79
|
+
======================================================================= -->
|
80
|
+
<xsl:template name="index.html">
|
81
|
+
<html>
|
82
|
+
<head><title>Coverage Results.</title></head>
|
83
|
+
<frameset cols="20%,80%">
|
84
|
+
<frameset rows="30%,70%">
|
85
|
+
<frame src="overview-frame.html" name="packageListFrame"/>
|
86
|
+
<frame src="allclasses-frame.html" name="classListFrame"/>
|
87
|
+
</frameset>
|
88
|
+
<frame src="overview-summary.html" name="classFrame"/>
|
89
|
+
</frameset>
|
90
|
+
<noframes>
|
91
|
+
<h2>Frame Alert</h2>
|
92
|
+
<p>
|
93
|
+
This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
|
94
|
+
</p>
|
95
|
+
</noframes>
|
96
|
+
</html>
|
97
|
+
</xsl:template>
|
98
|
+
|
99
|
+
<!-- =======================================================================
|
100
|
+
Stylesheet CSS used
|
101
|
+
======================================================================= -->
|
102
|
+
<!-- this is the stylesheet css to use for nearly everything -->
|
103
|
+
<xsl:template name="stylesheet.css">
|
104
|
+
.bannercell {
|
105
|
+
border: 0px;
|
106
|
+
padding: 0px;
|
107
|
+
}
|
108
|
+
body {
|
109
|
+
margin-left: 10;
|
110
|
+
margin-right: 10;
|
111
|
+
font:normal 80% arial,helvetica,sanserif;
|
112
|
+
background-color:#FFFFFF;
|
113
|
+
color:#000000;
|
114
|
+
}
|
115
|
+
.a td {
|
116
|
+
background: #efefef;
|
117
|
+
}
|
118
|
+
.b td {
|
119
|
+
background: #fff;
|
120
|
+
}
|
121
|
+
th, td {
|
122
|
+
text-align: left;
|
123
|
+
vertical-align: top;
|
124
|
+
}
|
125
|
+
th {
|
126
|
+
font-weight:bold;
|
127
|
+
background: #ccc;
|
128
|
+
color: black;
|
129
|
+
}
|
130
|
+
table, th, td {
|
131
|
+
font-size:100%;
|
132
|
+
border: none
|
133
|
+
}
|
134
|
+
table.log tr td, tr th {
|
135
|
+
|
136
|
+
}
|
137
|
+
h2 {
|
138
|
+
font-weight:bold;
|
139
|
+
font-size:140%;
|
140
|
+
margin-bottom: 5;
|
141
|
+
}
|
142
|
+
h3 {
|
143
|
+
font-size:100%;
|
144
|
+
font-weight:bold;
|
145
|
+
background: #525D76;
|
146
|
+
color: white;
|
147
|
+
text-decoration: none;
|
148
|
+
padding: 5px;
|
149
|
+
margin-right: 2px;
|
150
|
+
margin-left: 2px;
|
151
|
+
margin-bottom: 0;
|
152
|
+
}
|
153
|
+
</xsl:template>
|
154
|
+
|
155
|
+
<!-- =======================================================================
|
156
|
+
List of all classes in all packages
|
157
|
+
This will be the first page in the classListFrame
|
158
|
+
======================================================================= -->
|
159
|
+
<xsl:template match="snapshot" mode="all.classes">
|
160
|
+
<html>
|
161
|
+
<head>
|
162
|
+
<xsl:call-template name="create.stylesheet.link"/>
|
163
|
+
</head>
|
164
|
+
<body>
|
165
|
+
<h2>Classes</h2>
|
166
|
+
<table width="100%">
|
167
|
+
<xsl:for-each select="package/class">
|
168
|
+
<xsl:sort select="@name"/>
|
169
|
+
<xsl:variable name="package.name" select="(ancestor::package)[last()]/@name"/>
|
170
|
+
<xsl:variable name="link">
|
171
|
+
<xsl:if test="not($package.name='')">
|
172
|
+
<xsl:value-of select="translate($package.name,'.','/')"/><xsl:text>/</xsl:text>
|
173
|
+
</xsl:if><xsl:value-of select="@name"/><xsl:text>.html</xsl:text>
|
174
|
+
</xsl:variable>
|
175
|
+
<tr>
|
176
|
+
<td nowrap="nowrap">
|
177
|
+
<a target="classFrame" href="{$link}"><xsl:value-of select="@name"/></a>
|
178
|
+
</td>
|
179
|
+
</tr>
|
180
|
+
</xsl:for-each>
|
181
|
+
</table>
|
182
|
+
</body>
|
183
|
+
</html>
|
184
|
+
</xsl:template>
|
185
|
+
|
186
|
+
<!-- list of all packages -->
|
187
|
+
<xsl:template match="snapshot" mode="all.packages">
|
188
|
+
<html>
|
189
|
+
<head>
|
190
|
+
<xsl:call-template name="create.stylesheet.link"/>
|
191
|
+
</head>
|
192
|
+
<body>
|
193
|
+
<h2><a href="overview-summary.html" target="classFrame">Home</a></h2>
|
194
|
+
<h2>Packages</h2>
|
195
|
+
<table width="100%">
|
196
|
+
<xsl:for-each select="package">
|
197
|
+
<xsl:sort select="@name" order="ascending"/>
|
198
|
+
<tr>
|
199
|
+
<td nowrap="nowrap">
|
200
|
+
<a href="{translate(@name,'.','/')}/package-summary.html" target="classFrame">
|
201
|
+
<xsl:value-of select="@name"/>
|
202
|
+
</a>
|
203
|
+
</td>
|
204
|
+
</tr>
|
205
|
+
</xsl:for-each>
|
206
|
+
</table>
|
207
|
+
</body>
|
208
|
+
</html>
|
209
|
+
</xsl:template>
|
210
|
+
|
211
|
+
<!-- overview of statistics in packages -->
|
212
|
+
<xsl:template match="snapshot" mode="overview.packages">
|
213
|
+
<html>
|
214
|
+
<head>
|
215
|
+
<xsl:call-template name="create.stylesheet.link"/>
|
216
|
+
</head>
|
217
|
+
<body onload="open('allclasses-frame.html','classListFrame')">
|
218
|
+
<xsl:call-template name="pageHeader"/>
|
219
|
+
<h3>Summary</h3>
|
220
|
+
<table class="log" cellpadding="5" cellspacing="2" width="100%">
|
221
|
+
<tr>
|
222
|
+
<!--th width="10%" nowrap="nowrap">Date</th>
|
223
|
+
<th width="10%" nowrap="nowrap">Elapsed time</th-->
|
224
|
+
<th width="10%" nowrap="nowrap">Reported Classes</th>
|
225
|
+
<th width="10%" nowrap="nowrap">Methods Hit</th>
|
226
|
+
<th width="10%" nowrap="nowrap">Lines Hit</th>
|
227
|
+
</tr>
|
228
|
+
<tr class="a">
|
229
|
+
<!--td nowrap="nowrap"><xsl:value-of select="execution_log/@program_start"/></td>
|
230
|
+
<td><xsl:value-of select="format-number(execution_log/@elapsed_time div 1000,'0.0')"/>secs</td-->
|
231
|
+
<td><xsl:value-of select="count(package/class)"/></td>
|
232
|
+
<td><xsl:value-of select="format-number(cov.data/@hit_methods div cov.data/@total_methods,'0.0%')"/></td>
|
233
|
+
<td><xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/></td>
|
234
|
+
</tr>
|
235
|
+
</table>
|
236
|
+
<table border="0" width="100%">
|
237
|
+
<tr>
|
238
|
+
<td style="text-align: justify;">
|
239
|
+
To ensure accurate test runs on Java applications, developers need to know how much of
|
240
|
+
the code has been tested, and where to find any untested code. Coverage helps you
|
241
|
+
locate untested code, and measure precisely how much code has been exercised.
|
242
|
+
The result is a higher quality application in a shorter period of time.
|
243
|
+
<p/>
|
244
|
+
</td>
|
245
|
+
</tr>
|
246
|
+
</table>
|
247
|
+
|
248
|
+
<h3>Packages</h3>
|
249
|
+
<table class="log" cellpadding="5" cellspacing="2" width="100%">
|
250
|
+
<xsl:apply-templates select="package[1]" mode="stats.header"/>
|
251
|
+
<!-- display packages and sort them via their coverage rate -->
|
252
|
+
<xsl:for-each select="package">
|
253
|
+
<xsl:sort data-type="number" select="cov.data/@hit_lines div cov.data/@total_lines"/>
|
254
|
+
<tr>
|
255
|
+
<xsl:call-template name="alternate-row"/>
|
256
|
+
<td><a href="{translate(@name,'.','/')}/package-summary.html"><xsl:value-of select="@name"/></a></td>
|
257
|
+
<td><xsl:value-of select="format-number(cov.data/@hit_methods div cov.data/@total_methods,'0.0%')"/></td>
|
258
|
+
<td><xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/></td>
|
259
|
+
</tr>
|
260
|
+
</xsl:for-each>
|
261
|
+
</table>
|
262
|
+
<xsl:call-template name="pageFooter"/>
|
263
|
+
</body>
|
264
|
+
</html>
|
265
|
+
</xsl:template>
|
266
|
+
|
267
|
+
<!--
|
268
|
+
detailed info for a package. It will output the list of classes
|
269
|
+
, the summary page, and the info for each class
|
270
|
+
-->
|
271
|
+
<xsl:template match="package" mode="write">
|
272
|
+
<xsl:variable name="package.dir">
|
273
|
+
<xsl:if test="not(@name = '')"><xsl:value-of select="translate(@name,'.','/')"/></xsl:if>
|
274
|
+
<xsl:if test="@name = ''">.</xsl:if>
|
275
|
+
</xsl:variable>
|
276
|
+
|
277
|
+
<!-- create a classes-list.html in the package directory -->
|
278
|
+
<redirect:write file="{$output.dir}/{$package.dir}/package-frame.html">
|
279
|
+
<xsl:apply-templates select="." mode="classes.list"/>
|
280
|
+
</redirect:write>
|
281
|
+
|
282
|
+
<!-- create a package-summary.html in the package directory -->
|
283
|
+
<redirect:write file="{$output.dir}/{$package.dir}/package-summary.html">
|
284
|
+
<xsl:apply-templates select="." mode="package.summary"/>
|
285
|
+
</redirect:write>
|
286
|
+
|
287
|
+
<!-- for each class, creates a @name.html -->
|
288
|
+
<xsl:for-each select="class">
|
289
|
+
<redirect:write file="{$output.dir}/{$package.dir}/{@name}.html">
|
290
|
+
<xsl:apply-templates select="." mode="class.details"/>
|
291
|
+
</redirect:write>
|
292
|
+
</xsl:for-each>
|
293
|
+
</xsl:template>
|
294
|
+
|
295
|
+
<!-- list of classes in a package -->
|
296
|
+
<xsl:template match="package" mode="classes.list">
|
297
|
+
<html>
|
298
|
+
<HEAD>
|
299
|
+
<xsl:call-template name="create.stylesheet.link">
|
300
|
+
<xsl:with-param name="package.name" select="@name"/>
|
301
|
+
</xsl:call-template>
|
302
|
+
</HEAD>
|
303
|
+
<BODY>
|
304
|
+
<table width="100%">
|
305
|
+
<tr>
|
306
|
+
<td nowrap="nowrap">
|
307
|
+
<H2><a href="package-summary.html" target="classFrame"><xsl:value-of select="@name"/></a></H2>
|
308
|
+
</td>
|
309
|
+
</tr>
|
310
|
+
</table>
|
311
|
+
|
312
|
+
<H2>Classes</H2>
|
313
|
+
<TABLE WIDTH="100%">
|
314
|
+
<xsl:for-each select="class">
|
315
|
+
<xsl:sort select="@name"/>
|
316
|
+
<tr>
|
317
|
+
<td nowrap="nowrap">
|
318
|
+
<a href="{@name}.html" target="classFrame"><xsl:value-of select="@name"/></a>
|
319
|
+
</td>
|
320
|
+
</tr>
|
321
|
+
</xsl:for-each>
|
322
|
+
</TABLE>
|
323
|
+
</BODY>
|
324
|
+
</html>
|
325
|
+
</xsl:template>
|
326
|
+
|
327
|
+
<!-- summary of a package -->
|
328
|
+
<xsl:template match="package" mode="package.summary">
|
329
|
+
<HTML>
|
330
|
+
<HEAD>
|
331
|
+
<xsl:call-template name="create.stylesheet.link">
|
332
|
+
<xsl:with-param name="package.name" select="@name"/>
|
333
|
+
</xsl:call-template>
|
334
|
+
</HEAD>
|
335
|
+
<!-- when loading this package, it will open the classes into the frame -->
|
336
|
+
<BODY onload="open('package-frame.html','classListFrame')">
|
337
|
+
<xsl:call-template name="pageHeader"/>
|
338
|
+
<h3>Package <xsl:value-of select="@name"/></h3>
|
339
|
+
<table class="log" cellpadding="5" cellspacing="2" width="100%">
|
340
|
+
<xsl:apply-templates select="." mode="stats.header"/>
|
341
|
+
<xsl:apply-templates select="." mode="stats"/>
|
342
|
+
</table>
|
343
|
+
|
344
|
+
<xsl:if test="count(class) > 0">
|
345
|
+
<H3>Classes</H3>
|
346
|
+
<table class="log" cellpadding="5" cellspacing="2" width="100%">
|
347
|
+
<xsl:apply-templates select="." mode="stats.header"/>
|
348
|
+
<xsl:apply-templates select="class" mode="stats">
|
349
|
+
<xsl:sort data-type="number" select="cov.data/@hit_lines div cov.data/@total_lines"/>
|
350
|
+
</xsl:apply-templates>
|
351
|
+
</table>
|
352
|
+
</xsl:if>
|
353
|
+
<xsl:call-template name="pageFooter"/>
|
354
|
+
</BODY>
|
355
|
+
</HTML>
|
356
|
+
</xsl:template>
|
357
|
+
|
358
|
+
<!-- details of a class -->
|
359
|
+
<xsl:template match="class" mode="class.details">
|
360
|
+
<xsl:variable name="package.name" select="(ancestor::package)[last()]/@name"/>
|
361
|
+
<HTML>
|
362
|
+
<HEAD>
|
363
|
+
<xsl:call-template name="create.stylesheet.link">
|
364
|
+
<xsl:with-param name="package.name" select="$package.name"/>
|
365
|
+
</xsl:call-template>
|
366
|
+
</HEAD>
|
367
|
+
<BODY>
|
368
|
+
<xsl:call-template name="pageHeader"/>
|
369
|
+
<H3>Class <xsl:if test="not($package.name = '')"><xsl:value-of select="$package.name"/>.</xsl:if><xsl:value-of select="@name"/></H3>
|
370
|
+
|
371
|
+
<!-- class summary -->
|
372
|
+
<table class="log" cellpadding="5" cellspacing="2" width="100%">
|
373
|
+
<xsl:apply-templates select="." mode="stats.header"/>
|
374
|
+
<xsl:apply-templates select="." mode="stats"/>
|
375
|
+
</table>
|
376
|
+
|
377
|
+
<!-- details of methods -->
|
378
|
+
<H3>Methods</H3>
|
379
|
+
<table class="log" cellpadding="5" cellspacing="2" width="100%">
|
380
|
+
<xsl:apply-templates select="method[1]" mode="stats.header"/>
|
381
|
+
<xsl:apply-templates select="method" mode="stats">
|
382
|
+
<xsl:sort data-type="number" select="cov.data/@hit_lines div cov.data/@total_lines"/>
|
383
|
+
</xsl:apply-templates>
|
384
|
+
</table>
|
385
|
+
<xsl:call-template name="pageFooter"/>
|
386
|
+
</BODY>
|
387
|
+
</HTML>
|
388
|
+
|
389
|
+
</xsl:template>
|
390
|
+
|
391
|
+
<!-- Page Header -->
|
392
|
+
<xsl:template name="pageHeader">
|
393
|
+
<!-- jakarta logo -->
|
394
|
+
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
395
|
+
<tr>
|
396
|
+
<td class="bannercell" rowspan="2">
|
397
|
+
<a href="http://jakarta.apache.org/">
|
398
|
+
<img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="http://jakarta.apache.org" align="left" border="0"/>
|
399
|
+
</a>
|
400
|
+
</td>
|
401
|
+
<td style="text-align:right"><h2>Source Code Coverage</h2></td>
|
402
|
+
</tr>
|
403
|
+
<tr>
|
404
|
+
<td style="text-align:right">Designed for use with <a href='http://www.sitraka.com/jprobe'>Sitraka JProbe</a> and <a href='http://jakarta.apache.org'>Ant</a>.</td>
|
405
|
+
</tr>
|
406
|
+
</table>
|
407
|
+
<hr size="1"/>
|
408
|
+
</xsl:template>
|
409
|
+
|
410
|
+
<!-- Page Footer -->
|
411
|
+
<xsl:template name="pageFooter">
|
412
|
+
</xsl:template>
|
413
|
+
|
414
|
+
|
415
|
+
<xsl:template name="table.header">
|
416
|
+
<tr>
|
417
|
+
<th width="80%">Name</th>
|
418
|
+
<th width="10%" nowrap="nowrap">Methods Hit</th>
|
419
|
+
<th width="10%" nowrap="nowrap">Lines Hit</th>
|
420
|
+
</tr>
|
421
|
+
</xsl:template>
|
422
|
+
|
423
|
+
<xsl:template match="method" mode="stats.header">
|
424
|
+
<tr>
|
425
|
+
<th width="90%">Name</th>
|
426
|
+
<th width="10%" nowrap="nowrap">Lines Hit</th>
|
427
|
+
</tr>
|
428
|
+
</xsl:template>
|
429
|
+
<xsl:template match="method" mode="stats">
|
430
|
+
<tr>
|
431
|
+
<xsl:call-template name="alternate-row"/>
|
432
|
+
<td><xsl:value-of select="@name"/></td>
|
433
|
+
<td>
|
434
|
+
<xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/>
|
435
|
+
</td>
|
436
|
+
</tr>
|
437
|
+
</xsl:template>
|
438
|
+
|
439
|
+
<xsl:template match="package|class" mode="stats.header">
|
440
|
+
<tr>
|
441
|
+
<th width="80%">Name</th>
|
442
|
+
<th width="10%" nowrap="nowrap">Methods Hit</th>
|
443
|
+
<th width="10%" nowrap="nowrap">Lines Hit</th>
|
444
|
+
</tr>
|
445
|
+
</xsl:template>
|
446
|
+
<xsl:template match="package|class" mode="stats">
|
447
|
+
<tr>
|
448
|
+
<xsl:call-template name="alternate-row"/>
|
449
|
+
<td><xsl:value-of select="@name"/></td>
|
450
|
+
<td><xsl:value-of select="format-number(cov.data/@hit_methods div cov.data/@total_methods,'0.0%')"/></td>
|
451
|
+
<td><xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/></td>
|
452
|
+
</tr>
|
453
|
+
</xsl:template>
|
454
|
+
|
455
|
+
<!--
|
456
|
+
transform string like a.b.c to ../../../
|
457
|
+
@param path the path to transform into a descending directory path
|
458
|
+
-->
|
459
|
+
<xsl:template name="path">
|
460
|
+
<xsl:param name="path"/>
|
461
|
+
<xsl:if test="contains($path,'.')">
|
462
|
+
<xsl:text>../</xsl:text>
|
463
|
+
<xsl:call-template name="path">
|
464
|
+
<xsl:with-param name="path"><xsl:value-of select="substring-after($path,'.')"/></xsl:with-param>
|
465
|
+
</xsl:call-template>
|
466
|
+
</xsl:if>
|
467
|
+
<xsl:if test="not(contains($path,'.')) and not($path = '')">
|
468
|
+
<xsl:text>../</xsl:text>
|
469
|
+
</xsl:if>
|
470
|
+
</xsl:template>
|
471
|
+
|
472
|
+
|
473
|
+
<!-- create the link to the stylesheet based on the package name -->
|
474
|
+
<xsl:template name="create.stylesheet.link">
|
475
|
+
<xsl:param name="package.name"/>
|
476
|
+
<LINK REL ="stylesheet" TYPE="text/css" TITLE="Style"><xsl:attribute name="href"><xsl:if test="not($package.name = 'unnamed package')"><xsl:call-template name="path"><xsl:with-param name="path" select="$package.name"/></xsl:call-template></xsl:if>stylesheet.css</xsl:attribute></LINK>
|
477
|
+
</xsl:template>
|
478
|
+
|
479
|
+
<!-- alternated row style -->
|
480
|
+
<xsl:template name="alternate-row">
|
481
|
+
<xsl:attribute name="class">
|
482
|
+
<xsl:if test="position() mod 2 = 1">a</xsl:if>
|
483
|
+
<xsl:if test="position() mod 2 = 0">b</xsl:if>
|
484
|
+
</xsl:attribute>
|
485
|
+
</xsl:template>
|
486
|
+
|
487
|
+
</xsl:stylesheet>
|
488
|
+
|
489
|
+
|