├── Jenkinsfile ├── src ├── main │ ├── resources │ │ ├── result │ │ │ ├── taglib │ │ │ ├── priorities-summary_de.properties │ │ │ ├── priorities-summary_ja.properties │ │ │ ├── fixed_ja.properties │ │ │ ├── fixed_de.properties │ │ │ ├── trend-summary_de.properties │ │ │ ├── trend-summary_ja.properties │ │ │ ├── priorities-summary.jelly │ │ │ ├── priority-graph.jelly │ │ │ ├── priorities-summary_nl.properties │ │ │ ├── priorities-summary_zh_TW.properties │ │ │ ├── trend-summary.jelly │ │ │ ├── trend-summary_nl.properties │ │ │ ├── trend-summary_fr.properties │ │ │ ├── priorities-summary_fr.properties │ │ │ ├── fixed_zh_TW.properties │ │ │ ├── trend-summary_zh_TW.properties │ │ │ └── fixed.jelly │ │ ├── util │ │ │ ├── taglib │ │ │ ├── summary.properties │ │ │ ├── trend.properties │ │ │ ├── summary_de.properties │ │ │ ├── failed_de.properties │ │ │ ├── health_de.properties │ │ │ ├── trend_de.properties │ │ │ ├── advanced_de.properties │ │ │ ├── thresholds_de.properties │ │ │ ├── defaultEncoding_de.properties │ │ │ ├── summary_ja.properties │ │ │ ├── defaultEncoding.properties │ │ │ ├── failed.properties │ │ │ ├── trend_ja.properties │ │ │ ├── advanced.properties │ │ │ ├── failed.jelly │ │ │ ├── advancedMaven.jelly │ │ │ ├── trend.jelly │ │ │ ├── defaultEncoding_ja.properties │ │ │ ├── repeatable.jelly │ │ │ ├── health.properties │ │ │ ├── summary.jelly │ │ │ ├── defaultEncoding.jelly │ │ │ ├── advanced.jelly │ │ │ ├── sourceLink.jelly │ │ │ ├── failed_ja.properties │ │ │ ├── advanced_ja.properties │ │ │ ├── graphtype.jelly │ │ │ ├── health_ja.properties │ │ │ ├── defaultEncoding_fr.properties │ │ │ ├── summary_zh_TW.properties │ │ │ ├── trend_zh_TW.properties │ │ │ ├── trend_fr.properties │ │ │ ├── defaultEncoding_zh_TW.properties │ │ │ ├── failed_zh_TW.properties │ │ │ ├── advanced_zh_TW.properties │ │ │ └── health.jelly │ │ ├── hudson │ │ │ └── plugins │ │ │ │ └── analysis │ │ │ │ ├── views │ │ │ │ ├── TabDetail │ │ │ │ │ ├── types.properties │ │ │ │ │ ├── categories.properties │ │ │ │ │ ├── origin.properties │ │ │ │ │ ├── packages_de.properties │ │ │ │ │ ├── files_de.properties │ │ │ │ │ ├── packages_ja.properties │ │ │ │ │ ├── modules_de.properties │ │ │ │ │ ├── details_ja.properties │ │ │ │ │ ├── types_de.properties │ │ │ │ │ ├── types_ja.properties │ │ │ │ │ ├── files_ja.properties │ │ │ │ │ ├── categories_de.properties │ │ │ │ │ ├── modules_ja.properties │ │ │ │ │ ├── categories_ja.properties │ │ │ │ │ ├── details_de.properties │ │ │ │ │ ├── origin_de.properties │ │ │ │ │ ├── warnings_de.properties │ │ │ │ │ ├── warnings_ja.properties │ │ │ │ │ ├── table.jelly │ │ │ │ │ ├── fixed.jelly │ │ │ │ │ ├── fixed-table.jelly │ │ │ │ │ ├── all.jelly │ │ │ │ │ ├── new.jelly │ │ │ │ │ ├── high.jelly │ │ │ │ │ ├── low.jelly │ │ │ │ │ ├── normal.jelly │ │ │ │ │ ├── index.jelly │ │ │ │ │ ├── details.jelly │ │ │ │ │ ├── packages_zh_TW.properties │ │ │ │ │ ├── details_zh_TW.properties │ │ │ │ │ ├── files_zh_TW.properties │ │ │ │ │ ├── types_zh_TW.properties │ │ │ │ │ ├── modules_zh_TW.properties │ │ │ │ │ ├── categories_zh_TW.properties │ │ │ │ │ ├── modules.jelly │ │ │ │ │ ├── warnings_zh_TW.properties │ │ │ │ │ ├── files.jelly │ │ │ │ │ ├── authors.jelly │ │ │ │ │ ├── packages.jelly │ │ │ │ │ ├── types.jelly │ │ │ │ │ └── categories.jelly │ │ │ │ ├── ErrorDetail │ │ │ │ │ ├── index_de.properties │ │ │ │ │ └── index.jelly │ │ │ │ ├── SourceDetail │ │ │ │ │ ├── index.properties │ │ │ │ │ ├── index_de.properties │ │ │ │ │ ├── index_ja.properties │ │ │ │ │ ├── index.jelly │ │ │ │ │ └── index_zh_TW.properties │ │ │ │ ├── FixedWarningsDetail │ │ │ │ │ ├── index_de.properties │ │ │ │ │ ├── index_ja.properties │ │ │ │ │ ├── index.jelly │ │ │ │ │ └── index_zh_TW.properties │ │ │ │ ├── WarningsCountColumn │ │ │ │ │ └── column.jelly │ │ │ │ ├── PrioritiesDetail │ │ │ │ │ └── index.jelly │ │ │ │ ├── ConsoleDetail │ │ │ │ │ └── index.jelly │ │ │ │ ├── AbstractAnnotationsDetail │ │ │ │ │ └── index.jelly │ │ │ │ └── AuthorDetail │ │ │ │ │ └── index.jelly │ │ │ │ ├── core │ │ │ │ ├── AbstractProjectAction │ │ │ │ │ ├── floatingBox.properties │ │ │ │ │ ├── floatingBox_ja.properties │ │ │ │ │ ├── floatingBox_de.properties │ │ │ │ │ ├── floatingBox_es_ES.properties │ │ │ │ │ ├── floatingBox_fr.properties │ │ │ │ │ ├── floatingBox_nl.properties │ │ │ │ │ ├── floatingBox_nb_NO.properties │ │ │ │ │ ├── floatingBox_sv_SE.properties │ │ │ │ │ ├── floatingBox.jelly │ │ │ │ │ └── floatingBox_zh_TW.properties │ │ │ │ ├── MavenResultAction │ │ │ │ │ └── summary.jelly │ │ │ │ ├── AbstractResultAction │ │ │ │ │ └── summary.jelly │ │ │ │ ├── GlobalSettings │ │ │ │ │ ├── global.properties │ │ │ │ │ ├── global.jelly │ │ │ │ │ └── global_de.properties │ │ │ │ ├── BuildResult │ │ │ │ │ └── index.jelly │ │ │ │ └── UpgradeNotifier │ │ │ │ │ └── message.jelly │ │ │ │ ├── dashboard │ │ │ │ ├── AbstractWarningsTablePortlet │ │ │ │ │ ├── portlet_de.properties │ │ │ │ │ ├── config_de.properties │ │ │ │ │ ├── portlet_ja.properties │ │ │ │ │ ├── config_ja.properties │ │ │ │ │ ├── config.jelly │ │ │ │ │ ├── config_zh_TW.properties │ │ │ │ │ └── portlet_zh_TW.properties │ │ │ │ └── AbstractWarningsGraphPortlet │ │ │ │ │ ├── main.properties │ │ │ │ │ ├── portlet.properties │ │ │ │ │ ├── config.properties │ │ │ │ │ ├── main_de.properties │ │ │ │ │ ├── config_de.properties │ │ │ │ │ ├── portlet_de.properties │ │ │ │ │ ├── portlet_ja.properties │ │ │ │ │ ├── main_ja.properties │ │ │ │ │ ├── config_ja.properties │ │ │ │ │ ├── portlet.jelly │ │ │ │ │ ├── main.jelly │ │ │ │ │ ├── config.jelly │ │ │ │ │ ├── main_zh_TW.properties │ │ │ │ │ ├── portlet_zh_TW.properties │ │ │ │ │ └── config_zh_TW.properties │ │ │ │ ├── Messages_de.properties │ │ │ │ ├── Messages_fr.properties │ │ │ │ ├── graph │ │ │ │ ├── GraphConfigurationView │ │ │ │ │ ├── index_de.properties │ │ │ │ │ ├── index.properties │ │ │ │ │ ├── index_ja.properties │ │ │ │ │ └── index_fr.properties │ │ │ │ └── TrendDetails │ │ │ │ │ └── index.jelly │ │ │ │ └── Messages_nl.properties │ │ └── index.jelly │ ├── webapp │ │ ├── icons │ │ │ ├── NONE.png │ │ │ ├── FIXED.png │ │ │ ├── HEALTH.png │ │ │ ├── TOTALS.png │ │ │ ├── PRIORITY.png │ │ │ ├── spinner.gif │ │ │ ├── DIFFERENCE.png │ │ │ └── clearpixel.gif │ │ └── yui │ │ │ └── dispatcher-license.txt │ └── java │ │ └── hudson │ │ └── plugins │ │ └── analysis │ │ ├── util │ │ ├── SerializableUrlGenerator.java │ │ ├── SerializableToolTipGenerator.java │ │ ├── NullBlamer.java │ │ ├── NullModuleDetector.java │ │ ├── ToolTipProvider.java │ │ ├── Blamer.java │ │ ├── Validator.java │ │ ├── NullLogger.java │ │ ├── model │ │ │ ├── AnnotationStream.java │ │ │ └── JavaPackage.java │ │ ├── FileInputStreamFactory.java │ │ ├── AbstractPackageDetector.java │ │ ├── SaxSetup.java │ │ ├── PackageDetector.java │ │ ├── PackageDetectors.java │ │ ├── ToolTipAreaRenderer.java │ │ ├── StringPluginLogger.java │ │ ├── AreaRenderer.java │ │ ├── ToolTipBoxRenderer.java │ │ ├── SecureDigester.java │ │ ├── LoggerFactory.java │ │ ├── ToolTipBuilder.java │ │ ├── BoxRenderer.java │ │ ├── CsharpNamespaceDetector.java │ │ ├── Compatibility.java │ │ ├── JavaPackageDetector.java │ │ ├── HtmlPrinter.java │ │ └── TrendReportHeightValidator.java │ │ ├── graph │ │ ├── NullGraph.java │ │ ├── ColorPalette.java │ │ ├── EmptyGraph.java │ │ ├── TotalsGraph.java │ │ └── LocalDateLabel.java │ │ ├── dashboard │ │ ├── AbstractPortlet.java │ │ └── DefaultGraph.java │ │ ├── core │ │ ├── AnalysisCorePlugin.java │ │ ├── AnnotationParser.java │ │ ├── MavenProjectChecker.java │ │ ├── Settings.java │ │ ├── AntBuilderCheck.java │ │ ├── SerializableSettings.java │ │ ├── HealthDescriptor.java │ │ ├── UpgradeNotifier.java │ │ ├── ResultAction.java │ │ └── AnnotationsClassifier.java │ │ └── tokens │ │ ├── AbstractResultTokenMacro.java │ │ ├── AbstractAnnotationsCountTokenMacro.java │ │ ├── AbstractNewAnnotationsTokenMacro.java │ │ └── AbstractFixedAnnotationsTokenMacro.java └── test │ ├── resources │ └── hudson │ │ └── plugins │ │ └── analysis │ │ ├── util │ │ ├── l10n.properties │ │ ├── ActionBinding.cs │ │ ├── ActionBinding-Original-Formatting.cs │ │ ├── no-name-pom.xml │ │ ├── pom.xml │ │ ├── complicated-package-declaration.txt │ │ ├── MavenJavaTest.txt │ │ ├── MANIFEST.MF │ │ └── MANIFEST-NAME.MF │ │ └── views │ │ └── AbortException.txt │ └── java │ └── hudson │ └── plugins │ └── analysis │ ├── util │ ├── TrendReportHeightValidatorTest.java │ ├── LoggerFactoryTest.java │ ├── HtmlPrinterTest.java │ └── EncodingValidatorTest.java │ └── core │ ├── SerializableSettingsTest.java │ └── IsOverriddenTest.java ├── german.sh ├── .gitignore ├── release.bat ├── .settings ├── org.moreunit.prefs ├── org.eclipse.m2e.core.prefs └── org.eclipse.core.resources.prefs ├── release.sh ├── debug.sh ├── .travis.yml ├── clean.sh ├── go.sh ├── README.md ├── .pmd ├── .checkstyle ├── Jenkinsfile.local └── License.txt /Jenkinsfile: -------------------------------------------------------------------------------- 1 | buildPlugin() -------------------------------------------------------------------------------- /src/main/resources/result/taglib: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/util/taglib: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /german.sh: -------------------------------------------------------------------------------- 1 | mvn stapler:i18n -Dlocale=de 2 | 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | *.eml 3 | .idea 4 | .DS_Store 5 | /work -------------------------------------------------------------------------------- /release.bat: -------------------------------------------------------------------------------- 1 | mvn -B -Djava.net.id=drulli release:prepare release:perform 2 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/types.properties: -------------------------------------------------------------------------------- 1 | undefined=(none) -------------------------------------------------------------------------------- /.settings/org.moreunit.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.moreunit.preferences.version=2 3 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/ErrorDetail/index_de.properties: -------------------------------------------------------------------------------- 1 | Errors=Fehler 2 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/categories.properties: -------------------------------------------------------------------------------- 1 | undefined=(none) 2 | -------------------------------------------------------------------------------- /src/main/resources/result/priorities-summary_de.properties: -------------------------------------------------------------------------------- 1 | Total=Gesamt 2 | Summary=Zusammenfassung 3 | -------------------------------------------------------------------------------- /src/main/resources/result/priorities-summary_ja.properties: -------------------------------------------------------------------------------- 1 | Total=\u5408\u8a08 2 | Summary=\u8981\u7d04 3 | -------------------------------------------------------------------------------- /src/test/resources/hudson/plugins/analysis/util/l10n.properties: -------------------------------------------------------------------------------- 1 | Bundle-Name=My Bundle 2 | Bundle-Vendor=My Vendor -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/SourceDetail/index.properties: -------------------------------------------------------------------------------- 1 | sourcedetail.header=Content of file {0} -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/core/AbstractProjectAction/floatingBox.properties: -------------------------------------------------------------------------------- 1 | enable.graph=Enable {0} 2 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/origin.properties: -------------------------------------------------------------------------------- 1 | commit-id=Commit ID 2 | Build=First occurrence -------------------------------------------------------------------------------- /src/main/resources/util/summary.properties: -------------------------------------------------------------------------------- 1 | error.message=During parsing an error has been reported. -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/FixedWarningsDetail/index_de.properties: -------------------------------------------------------------------------------- 1 | Fixed\ Warnings=Behobene Warnungen 2 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/SourceDetail/index_de.properties: -------------------------------------------------------------------------------- 1 | sourcedetail.header=Inhalt der Datei {0} 2 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/packages_de.properties: -------------------------------------------------------------------------------- 1 | Total=Gesamt 2 | Distribution=Verteilung 3 | -------------------------------------------------------------------------------- /src/main/resources/util/trend.properties: -------------------------------------------------------------------------------- 1 | configure=You can define the default values for the trend graph in a separate view. 2 | -------------------------------------------------------------------------------- /src/main/webapp/icons/NONE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jenkinsci/analysis-core-plugin/master/src/main/webapp/icons/NONE.png -------------------------------------------------------------------------------- /release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | git pull 4 | git push 5 | mvn -B -Djava.net.id=drulli release:prepare release:perform 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/webapp/icons/FIXED.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jenkinsci/analysis-core-plugin/master/src/main/webapp/icons/FIXED.png -------------------------------------------------------------------------------- /src/main/webapp/icons/HEALTH.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jenkinsci/analysis-core-plugin/master/src/main/webapp/icons/HEALTH.png -------------------------------------------------------------------------------- /src/main/webapp/icons/TOTALS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jenkinsci/analysis-core-plugin/master/src/main/webapp/icons/TOTALS.png -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/files_de.properties: -------------------------------------------------------------------------------- 1 | File=Datei 2 | Total=Gesamt 3 | Distribution=Verteilung 4 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/packages_ja.properties: -------------------------------------------------------------------------------- 1 | Total=\u5408\u8a08 2 | Distribution=\u5206\u5e03 3 | -------------------------------------------------------------------------------- /src/main/resources/result/fixed_ja.properties: -------------------------------------------------------------------------------- 1 | File=\u30d5\u30a1\u30a4\u30eb 2 | Warning\ Type=\u8b66\u544a\u306e\u30bf\u30a4\u30d7 3 | -------------------------------------------------------------------------------- /src/main/webapp/icons/PRIORITY.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jenkinsci/analysis-core-plugin/master/src/main/webapp/icons/PRIORITY.png -------------------------------------------------------------------------------- /src/main/webapp/icons/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jenkinsci/analysis-core-plugin/master/src/main/webapp/icons/spinner.gif -------------------------------------------------------------------------------- /src/main/resources/util/summary_de.properties: -------------------------------------------------------------------------------- 1 | error.message=Beim Analysieren der Dateien sind Fehler aufgetreten. 2 | -------------------------------------------------------------------------------- /src/main/webapp/icons/DIFFERENCE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jenkinsci/analysis-core-plugin/master/src/main/webapp/icons/DIFFERENCE.png -------------------------------------------------------------------------------- /src/main/webapp/icons/clearpixel.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jenkinsci/analysis-core-plugin/master/src/main/webapp/icons/clearpixel.gif -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/modules_de.properties: -------------------------------------------------------------------------------- 1 | Module=Projekt 2 | Total=Gesamt 3 | Distribution=Verteilung 4 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/FixedWarningsDetail/index_ja.properties: -------------------------------------------------------------------------------- 1 | Fixed\ Warnings=\u4fee\u6b63\u3055\u308c\u305f\u8b66\u544a 2 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/SourceDetail/index_ja.properties: -------------------------------------------------------------------------------- 1 | sourcedetail.header=\u30d5\u30a1\u30a4\u30eb\u306e\u5185\u5bb9\uff1a {0} -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/details_ja.properties: -------------------------------------------------------------------------------- 1 | Priority=\u91cd\u8981\u5ea6 2 | Category=\u30ab\u30c6\u30b4\u30ea\u30fc 3 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/types_de.properties: -------------------------------------------------------------------------------- 1 | undefined=(ohne) 2 | Type=Typ 3 | Total=Gesamt 4 | Distribution=Verteilung 5 | -------------------------------------------------------------------------------- /src/main/resources/util/failed_de.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jenkinsci/analysis-core-plugin/master/src/main/resources/util/failed_de.properties -------------------------------------------------------------------------------- /src/main/resources/util/health_de.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jenkinsci/analysis-core-plugin/master/src/main/resources/util/health_de.properties -------------------------------------------------------------------------------- /src/main/resources/util/trend_de.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jenkinsci/analysis-core-plugin/master/src/main/resources/util/trend_de.properties -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/types_ja.properties: -------------------------------------------------------------------------------- 1 | Type=\u30bf\u30a4\u30d7 2 | Total=\u5408\u8a08 3 | Distribution=\u5206\u5e03 4 | -------------------------------------------------------------------------------- /src/main/resources/util/advanced_de.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jenkinsci/analysis-core-plugin/master/src/main/resources/util/advanced_de.properties -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/files_ja.properties: -------------------------------------------------------------------------------- 1 | File=\u30d5\u30a1\u30a4\u30eb 2 | Total=\u5408\u8a08 3 | Distribution=\u5206\u5e03 4 | -------------------------------------------------------------------------------- /src/main/resources/util/thresholds_de.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jenkinsci/analysis-core-plugin/master/src/main/resources/util/thresholds_de.properties -------------------------------------------------------------------------------- /.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | #Wed Jun 22 15:14:09 CEST 2011 2 | activeProfiles= 3 | eclipse.preferences.version=1 4 | resolveWorkspaceProjects=true 5 | version=1 6 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/categories_de.properties: -------------------------------------------------------------------------------- 1 | undefined=(ohne) 2 | Category=Kategorie 3 | Total=Gesamt 4 | Distribution=Verteilung 5 | -------------------------------------------------------------------------------- /src/main/resources/result/fixed_de.properties: -------------------------------------------------------------------------------- 1 | File=Datei 2 | Warning\ Type=Warnungstyp 3 | Line=Zeile 4 | Priority=Priorität 5 | Type=Typ 6 | Category=Kategorie 7 | -------------------------------------------------------------------------------- /debug.sh: -------------------------------------------------------------------------------- 1 | export MAVEN_OPTS="-Xmx1024m -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n" 2 | rm -rf $JENKINS_HOME/plugins/analysis-core* 3 | mvn hpi:run 4 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/modules_ja.properties: -------------------------------------------------------------------------------- 1 | Module=\u30e2\u30b8\u30e5\u30fc\u30eb 2 | Total=\u5408\u8a08 3 | Distribution=\u5206\u5e03 4 | -------------------------------------------------------------------------------- /src/main/resources/util/defaultEncoding_de.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jenkinsci/analysis-core-plugin/master/src/main/resources/util/defaultEncoding_de.properties -------------------------------------------------------------------------------- /src/main/resources/util/summary_ja.properties: -------------------------------------------------------------------------------- 1 | error.message=\u89e3\u6790\u4e2d\u306b \u30a8\u30e9\u30fc \u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | jdk: oraclejdk8 3 | script: mvn clean verify jacoco:prepare-agent test jacoco:report 4 | after_success: 5 | - bash <(curl -s https://codecov.io/bash) -------------------------------------------------------------------------------- /clean.sh: -------------------------------------------------------------------------------- 1 | rm -rf $JENKINS_HOME/plugins/analysis-core* 2 | 3 | mvn clean install 4 | cp -f target/analysis-core.hpi $JENKINS_HOME/plugins/ 5 | 6 | cd $JENKINS_HOME 7 | ./go.sh 8 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/categories_ja.properties: -------------------------------------------------------------------------------- 1 | Category=\u30ab\u30c6\u30b4\u30ea\u30fc 2 | Total=\u5408\u8a08 3 | Distribution=\u5206\u5e03 4 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/dashboard/AbstractWarningsTablePortlet/portlet_de.properties: -------------------------------------------------------------------------------- 1 | Job=Job 2 | Total=Gesamt 3 | 4 | High=Hoch 5 | Normal=Normal 6 | Low=Niedrig 7 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/Messages_de.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jenkinsci/analysis-core-plugin/master/src/main/resources/hudson/plugins/analysis/Messages_de.properties -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/Messages_fr.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jenkinsci/analysis-core-plugin/master/src/main/resources/hudson/plugins/analysis/Messages_fr.properties -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/core/AbstractProjectAction/floatingBox_ja.properties: -------------------------------------------------------------------------------- 1 | Configure=\u8A2D\u5B9A 2 | Enlarge=\u62E1\u5927 3 | enable.graph={0} \u3092\u6709\u52B9\u5316 4 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/dashboard/AbstractWarningsTablePortlet/config_de.properties: -------------------------------------------------------------------------------- 1 | Name=Name 2 | Hide\ zero\ warnings\ projects=Zeige nur Projekte an, die Warnungen haben 3 | -------------------------------------------------------------------------------- /src/test/resources/hudson/plugins/analysis/util/ActionBinding.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jenkinsci/analysis-core-plugin/master/src/test/resources/hudson/plugins/analysis/util/ActionBinding.cs -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/dashboard/AbstractWarningsTablePortlet/portlet_ja.properties: -------------------------------------------------------------------------------- 1 | Job=\u30B8\u30E7\u30D6 2 | Total=\u5408\u8A08 3 | 4 | High=High 5 | Normal=Normal 6 | Low=Low 7 | -------------------------------------------------------------------------------- /src/main/resources/util/defaultEncoding.properties: -------------------------------------------------------------------------------- 1 | description.defaultEncoding=Default encoding when parsing or showing files. \ 2 | Leave this field empty to use the default encoding of the platform. 3 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/dashboard/AbstractWarningsGraphPortlet/main.properties: -------------------------------------------------------------------------------- 1 | no.results=There are no results available. Did you enable the plug-in in the jobs that are part of this view? 2 | -------------------------------------------------------------------------------- /src/main/resources/result/trend-summary_de.properties: -------------------------------------------------------------------------------- 1 | Warnings\ Trend=Vergleich mit letzter Analyse 2 | All\ Warnings=Alle Warnungen 3 | New\ Warnings=Neue Warnungen 4 | Fixed\ Warnings=Behobene Warnungen 5 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/dashboard/AbstractWarningsGraphPortlet/portlet.properties: -------------------------------------------------------------------------------- 1 | no.results=There are no results available. Did you enable the plug-in in the jobs that are part of this view? 2 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/details_de.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jenkinsci/analysis-core-plugin/master/src/main/resources/hudson/plugins/analysis/views/TabDetail/details_de.properties -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/origin_de.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jenkinsci/analysis-core-plugin/master/src/main/resources/hudson/plugins/analysis/views/TabDetail/origin_de.properties -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/warnings_de.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jenkinsci/analysis-core-plugin/master/src/main/resources/hudson/plugins/analysis/views/TabDetail/warnings_de.properties -------------------------------------------------------------------------------- /src/main/resources/index.jelly: -------------------------------------------------------------------------------- 1 |
2 | The analysis-core plug-in reached end-of-life. All functionality has been integrated 3 | into the Warnings Next Generation Plugin. 4 |
5 | -------------------------------------------------------------------------------- /src/test/resources/hudson/plugins/analysis/util/ActionBinding-Original-Formatting.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jenkinsci/analysis-core-plugin/master/src/test/resources/hudson/plugins/analysis/util/ActionBinding-Original-Formatting.cs -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/dashboard/AbstractWarningsTablePortlet/config_ja.properties: -------------------------------------------------------------------------------- 1 | Name=\u540d\u79f0 2 | Hide\ zero\ warnings\ projects=\u8b66\u544a\u306e\u306a\u3044\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u96a0\u3059 -------------------------------------------------------------------------------- /src/main/resources/util/failed.properties: -------------------------------------------------------------------------------- 1 | description.canRunOnFailed=By default, this plug-in runs only for stable or unstable builds, but not for failed builds. If this plug-in should run even for failed builds then activate this check box. 2 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/dashboard/AbstractWarningsGraphPortlet/config.properties: -------------------------------------------------------------------------------- 1 | description.dayCount=If set only the builds within the specified number of days are considered for the trend graph computation. 2 | name.days=# days 3 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/graph/GraphConfigurationView/index_de.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jenkinsci/analysis-core-plugin/master/src/main/resources/hudson/plugins/analysis/graph/GraphConfigurationView/index_de.properties -------------------------------------------------------------------------------- /go.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm -rf $JENKINS_HOME/plugins/analysis-core* 4 | 5 | mvn install -DskipTests || { echo "Build failed"; exit 1; } 6 | 7 | cp -f target/analysis-core.hpi $JENKINS_HOME/plugins/ 8 | 9 | cd $JENKINS_HOME 10 | ./go.sh 11 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/core/AbstractProjectAction/floatingBox_de.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jenkinsci/analysis-core-plugin/master/src/main/resources/hudson/plugins/analysis/core/AbstractProjectAction/floatingBox_de.properties -------------------------------------------------------------------------------- /src/main/resources/util/trend_ja.properties: -------------------------------------------------------------------------------- 1 | Trend\ graph=\u63a8\u79fb\u30b0\u30e9\u30d5 2 | configure=\u3053\u3061\u3089\u304b\u3089\u63a8\u79fb\u30b0\u30e9\u30d5\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u8a2d\u5b9a\u3092\u5909\u66f4\u3057\u307e\u3059\u3002 3 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/dashboard/AbstractWarningsGraphPortlet/main_de.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jenkinsci/analysis-core-plugin/master/src/main/resources/hudson/plugins/analysis/dashboard/AbstractWarningsGraphPortlet/main_de.properties -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/dashboard/AbstractWarningsGraphPortlet/config_de.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jenkinsci/analysis-core-plugin/master/src/main/resources/hudson/plugins/analysis/dashboard/AbstractWarningsGraphPortlet/config_de.properties -------------------------------------------------------------------------------- /src/main/resources/result/trend-summary_ja.properties: -------------------------------------------------------------------------------- 1 | Warnings\ Trend=\u8b66\u544a\u306e\u63a8\u79fb 2 | All\ Warnings=\u8b66\u544a\u306e\u5408\u8a08 3 | New\ Warnings=\u65b0\u898f\u306e\u8b66\u544a 4 | Fixed\ Warnings=\u4fee\u6b63\u3055\u308c\u305f\u8b66\u544a 5 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/dashboard/AbstractWarningsGraphPortlet/portlet_de.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jenkinsci/analysis-core-plugin/master/src/main/resources/hudson/plugins/analysis/dashboard/AbstractWarningsGraphPortlet/portlet_de.properties -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## This plugin reached end-of-life. 2 | 3 | All functionality has been integrated into the 4 | [Warnings Next Generation Plugin](https://github.com/jenkinsci/warnings-ng-plugin) 5 | and the [Static Analysis Model and Parsers Library](https://github.com/jenkinsci/analysis-model). -------------------------------------------------------------------------------- /src/main/webapp/yui/dispatcher-license.txt: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2007, Caridy Patino. All rights reserved. 3 | Portions Copyright (c) 2007, Yahoo!, Inc. All rights reserved. 4 | Code licensed under the BSD License: 5 | http://www.bubbling-library.com/eng/licence 6 | version: 1.5.0 7 | */ 8 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/warnings_ja.properties: -------------------------------------------------------------------------------- 1 | Package=\u30D1\u30C3\u30B1\u30FC\u30B8 2 | Module=\u30E2\u30B8\u30E5\u30FC\u30EB 3 | File=\u30D5\u30A1\u30A4\u30EB 4 | Line=\u884C 5 | Priority=\u91CD\u8981\u5EA6 6 | Type=\u30BF\u30A4\u30D7 7 | Category=\u30AB\u30C6\u30B4\u30EA\u30FC 8 | -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=ISO-8859-1 3 | encoding//src/main/resources=ISO-8859-1 4 | encoding//src/test/java=ISO-8859-1 5 | encoding//src/test/resources=ISO-8859-1 6 | encoding//target/generated-sources/localizer=ISO-8859-1 7 | encoding/=ISO-8859-1 8 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/core/MavenResultAction/summary.jelly: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/core/AbstractResultAction/summary.jelly: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/table.jelly: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/fixed.jelly: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.pmd: -------------------------------------------------------------------------------- 1 | 2 | 3 | true 4 | ../analysis-config/etc/pmd-configuration.xml 5 | false 6 | false 7 | true 8 | 9 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/dashboard/AbstractWarningsGraphPortlet/portlet_ja.properties: -------------------------------------------------------------------------------- 1 | no.results=\ 2 | \u30d3\u30eb\u30c9\u7d50\u679c\u304c\u3042\u308a\u307e\u305b\u3093\u3002\u3053\u306e\u30d3\u30e5\u30fc\u306b\u542b\u307e\u308c\u308b\u30b8\u30e7\u30d6\u3067\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u6709\u52b9\u306b\u3057\u307e\u3057\u305f\u304b? -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/dashboard/AbstractWarningsGraphPortlet/main_ja.properties: -------------------------------------------------------------------------------- 1 | no.results=\ 2 | \u30d3\u30eb\u30c9\u7d50\u679c\u304c\u3042\u308a\u307e\u305b\u3093\u3002\u3053\u306e\u30d3\u30e5\u30fc\u306b\u542b\u307e\u308c\u308b\u30b8\u30e7\u30d6\u3067\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u6709\u52b9\u306b\u3057\u307e\u3057\u305f\u304b? 3 | -------------------------------------------------------------------------------- /src/main/resources/util/advanced.properties: -------------------------------------------------------------------------------- 1 | description.detectModules=Determines if Ant or Maven modules should be detected for all files that contain \ 2 | warnings. Activating this option may increase your build time since the detector scans the whole \ 3 | workspace for ''build.xml'' or ''pom.xml'' files in order to assign the correct module names. 4 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/fixed-table.jelly: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/dashboard/AbstractWarningsGraphPortlet/config_ja.properties: -------------------------------------------------------------------------------- 1 | description.dayCount=\u305D\u306E\u6307\u5B9A\u65E5\u6570\u306E\u9593\u306B\u5B9F\u884C\u3055\u308C\u305F\u30D3\u30EB\u30C9\u306E\u307F\u30B0\u30E9\u30D5\u8868\u793A\u3055\u308C\u307E\u3059\u3002 2 | name.days=\u8868\u793A\u65E5\u6570 3 | Width=\u5E45 4 | Height=\u9AD8\u3055 5 | Name=\u540D\u79F0 6 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/all.jelly: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/new.jelly: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/high.jelly: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/low.jelly: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/normal.jelly: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/util/SerializableUrlGenerator.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | import java.io.Serializable; 4 | 5 | import org.jfree.chart.urls.CategoryURLGenerator; 6 | 7 | /** 8 | * A serializable {@link CategoryURLGenerator}. 9 | * 10 | * @author Ulli Hafner 11 | */ 12 | public interface SerializableUrlGenerator extends CategoryURLGenerator, Serializable { 13 | // empty 14 | } 15 | 16 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/Messages_nl.properties: -------------------------------------------------------------------------------- 1 | BuildResult.Tab.Categories=Categorie\u00EBn 2 | BuildResult.Tab.Details=Details 3 | BuildResult.Tab.Files=Bestanden 4 | BuildResult.Tab.Fixed=Opgelost 5 | BuildResult.Tab.High=Hoog 6 | BuildResult.Tab.Low=Laag 7 | BuildResult.Tab.Modules=Modulen 8 | BuildResult.Tab.New=Nieuw 9 | BuildResult.Tab.Normal=Normaal 10 | BuildResult.Tab.Types=Typen 11 | BuildResult.Tab.Warnings=Waarschuwingen 12 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/util/SerializableToolTipGenerator.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | import java.io.Serializable; 4 | 5 | import org.jfree.chart.labels.CategoryToolTipGenerator; 6 | 7 | /** 8 | * A serializable {@link CategoryToolTipGenerator}. 9 | * 10 | * @author Ulli Hafner 11 | */ 12 | public interface SerializableToolTipGenerator extends CategoryToolTipGenerator, Serializable { 13 | // empty 14 | } 15 | 16 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/WarningsCountColumn/column.jelly: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ${it.getNumberOfAnnotations(job)} 6 | 7 | 8 | ${it.getNumberOfAnnotations(job)} 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/resources/util/failed.jelly: -------------------------------------------------------------------------------- 1 | 4 | 5 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/util/NullBlamer.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | import java.util.Set; 4 | 5 | import hudson.plugins.analysis.util.model.FileAnnotation; 6 | 7 | /** 8 | * A blamer that does nothing. 9 | * 10 | * @author Ullrich Hafner 11 | */ 12 | public class NullBlamer implements Blamer { 13 | @Override 14 | public void blame(final Set annotations) { 15 | // nothing to do 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/index.jelly: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /src/main/resources/util/advancedMaven.jelly: -------------------------------------------------------------------------------- 1 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/util/NullModuleDetector.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | import org.apache.commons.lang.StringUtils; 4 | 5 | /** 6 | * Null object that always returns the empty string as module name. 7 | * 8 | * @author Ulli Hafner 9 | */ 10 | public class NullModuleDetector extends ModuleDetector { 11 | @Override 12 | public String guessModuleName(final String fileName) { 13 | return StringUtils.EMPTY; 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /src/main/resources/util/trend.jelly: -------------------------------------------------------------------------------- 1 | 6 | 7 | 9 | 10 | 11 | 12 | ${%configure} 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/util/ToolTipProvider.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | /** 4 | * Provides tooltips for single or multiple items. 5 | * 6 | * @author Ulli Hafner 7 | */ 8 | public interface ToolTipProvider { 9 | /** 10 | * Returns the tooltip for the specified number of items. 11 | * 12 | * @param numberOfItems 13 | * the number of items to display the tooltip for 14 | * @return the tooltip for the specified items 15 | */ 16 | String getTooltip(final int numberOfItems); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/PrioritiesDetail/index.jelly: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |

${it.header}

12 | 13 | 14 | 15 |
16 |
17 |
-------------------------------------------------------------------------------- /src/test/resources/hudson/plugins/analysis/util/no-name-pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | base 7 | com.avaloq.adt 8 | 1.2.0-SNAPSHOT 9 | 10 | 4.0.0 11 | com.avaloq.adt.core 12 | source-plugin 13 | 14 | -------------------------------------------------------------------------------- /src/main/resources/util/defaultEncoding_ja.properties: -------------------------------------------------------------------------------- 1 | description.defaultEncoding=\u30d5\u30a1\u30a4\u30eb\u3092\u51e6\u7406\u30fb\u8868\u793a\u3059\u308b\u3068\u304d\u306b\u4f7f\u7528\u3059\u308b\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3002\ 2 | \u6307\u5b9a\u304c\u7121\u3044\u5834\u5408\u306f\u3001\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 3 | Default\ Encoding=\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0 4 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/util/Blamer.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | import java.io.Serializable; 4 | import java.util.Set; 5 | 6 | import hudson.plugins.analysis.util.model.FileAnnotation; 7 | 8 | /** 9 | * Adds SCM information to a set of annotations (e.g., author, commit ID, etc.). 10 | * 11 | * @author Lukas Krose 12 | */ 13 | public interface Blamer extends Serializable { 14 | /** 15 | * Adds the authors to the given annotations. 16 | * 17 | * @param annotations The annotations that should be blamed. 18 | */ 19 | void blame(Set annotations); 20 | } 21 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/ConsoleDetail/index.jelly: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 |

${it.fileName}

10 | 11 | 12 | 13 |
14 |
15 |
-------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/core/GlobalSettings/global.properties: -------------------------------------------------------------------------------- 1 | section.title=Static Code Analysis Plug-ins 2 | 3 | quietMode.title=Logger Quiet Mode 4 | quietMode.description=If checked then no logging statements will be reported in the console log. 5 | 6 | failOnCorrupt.title=Fail On Corrupt Files 7 | failOnCorrupt.description=If checked then parsing errors (due to corrupt input files, etc.) will fail a build. Otherwise the error is shown in the plug-in results view. 8 | 9 | noAuthors.title=Omit Author and Commit Information 10 | noAuthors.description=If checked then author and commit information are omitted. 11 | 12 | -------------------------------------------------------------------------------- /.checkstyle: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/graph/NullGraph.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.graph; 2 | 3 | /** 4 | * Empty graph. Null object: this graph does not render anything. Additionally, 5 | * there is no enable graph link presented in the UI. 6 | * 7 | * @author Ulli Hafner 8 | */ 9 | public class NullGraph extends EmptyGraph { 10 | @Override 11 | public String getId() { 12 | return "NULL"; 13 | } 14 | 15 | @Override 16 | public boolean isDeactivated() { 17 | return true; 18 | } 19 | 20 | @Override 21 | public boolean isSelectable() { 22 | return false; 23 | } 24 | } 25 | 26 | -------------------------------------------------------------------------------- /src/main/resources/util/repeatable.jelly: -------------------------------------------------------------------------------- 1 | 6 | 7 | 9 | with an additional div in order to simplify UI testing. 11 | ]]> 12 | 13 | 14 | Used for the data binding. 15 | 16 | 17 | 18 |
19 | 20 |
21 | 22 |
-------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/core/BuildResult/index.jelly: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 |

${it.header}

9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |
18 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/AbstractAnnotationsDetail/index.jelly: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |

${it.header}

12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 |
20 |
-------------------------------------------------------------------------------- /src/test/resources/hudson/plugins/analysis/util/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | base 7 | com.avaloq.adt 8 | 1.2.0-SNAPSHOT 9 | 10 | 4.0.0 11 | com.avaloq.adt.core 12 | ADT Business Logic 13 | source-plugin 14 | 15 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/dashboard/AbstractWarningsTablePortlet/config.jelly: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/SourceDetail/index.jelly: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 |

${%sourcedetail.header(it.fileName)}

10 | 11 | 12 | 13 |
14 |
15 |
-------------------------------------------------------------------------------- /src/main/resources/util/health.properties: -------------------------------------------------------------------------------- 1 | threshold.100.percent=100% 2 | threshold.0.percent=0% 3 | description.health.limit=Configure the thresholds for the build health. If left empty then no health report is created. \ 4 | If the actual number of warnings is between the provided thresholds then the build health is interpolated. 5 | description.health.priorities=Determines which warning priorities should be considered when evaluating the build health. 6 | description.healthy=Report health as 100% when the number of warnings is less than this value. 7 | description.unhealthy=Report health as 0% when the number of warnings is greater than this value. 8 | -------------------------------------------------------------------------------- /src/main/resources/util/summary.jelly: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 |
    8 | 9 | 10 |
  • 11 | ${%error.message(it.urlName)} 12 |
  • 13 |
    14 |
15 |
16 |
-------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/FixedWarningsDetail/index.jelly: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 |

${it.header}

8 | 9 |

${%Fixed Warnings}

10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |
18 | -------------------------------------------------------------------------------- /src/main/resources/util/defaultEncoding.jelly: -------------------------------------------------------------------------------- 1 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/ErrorDetail/index.jelly: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 |

${it.displayName}

8 | 9 |
    10 | 11 |
  1. ${error}
  2. 12 |
    13 |
14 | 15 |
16 |
17 |
18 | -------------------------------------------------------------------------------- /src/main/resources/util/advanced.jelly: -------------------------------------------------------------------------------- 1 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/util/Validator.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | import hudson.util.FormValidation; 4 | 5 | /** 6 | * Validator for string values. 7 | * 8 | * @author Ulli Hafner 9 | */ 10 | public interface Validator { 11 | /** 12 | * Validates the specified value. If the value is not valid then a 13 | * {@link FormValidation} exception must be thrown. 14 | * 15 | * @param value 16 | * the value to validate 17 | * @return a positive {@link FormValidation} object 18 | * @throws FormValidation 19 | * if the encoding is not valid 20 | */ 21 | FormValidation check(final String value) throws FormValidation; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /src/main/resources/util/sourceLink.jelly: -------------------------------------------------------------------------------- 1 | 7 | 8 | 11 | 12 | 13 | 14 | ${warning.shortFileName}:${warning.primaryLineNumber} 15 | 16 | ${warning.shortFileName}:${warning.primaryLineNumber} 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/dashboard/AbstractWarningsGraphPortlet/portlet.jelly: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | ${it.description} 8 | 9 | 10 | ${%no.results} 11 | 12 |
13 | 14 |
15 |
-------------------------------------------------------------------------------- /src/main/resources/util/failed_ja.properties: -------------------------------------------------------------------------------- 1 | description.canRunOnFailed=\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u3001\u3053\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u5b89\u5b9a\u30d3\u30eb\u30c9\u307e\u305f\u306f\u4e0d\u5b89\u5b9a\u30d3\u30eb\u30c9\u306b\u5bfe\u3057\u3066\u51e6\u7406\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u5931\u6557\u30d3\u30eb\u30c9\u306b\u5bfe\u3057\u3066\u306f\u4f55\u3082\u884c\u3044\u307e\u305b\u3093\u3002\ 2 | \u3082\u3057\u3001\u5931\u6557\u30d3\u30eb\u30c9\u306b\u5bfe\u3057\u3066\u3082\u51e6\u7406\u3092\u884c\u3046\u5834\u5408\u306b\u306f\u3001\u3053\u306e\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002 3 | Run\ always=\u5e38\u306b\u5b9f\u884c 4 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/dashboard/AbstractWarningsGraphPortlet/main.jelly: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | ${it.description} 8 | 9 | 10 | ${%no.results} 11 | 12 |
13 | 14 |
15 |
-------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/core/GlobalSettings/global.jelly: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/core/GlobalSettings/global_de.properties: -------------------------------------------------------------------------------- 1 | section.title=Statische Codeanalyse Plug-ins 2 | 3 | quietMode.title=Verberge Logger-Ausgabe 4 | quietMode.description=Falls aktiviert, werden keinerlei Logging Informationen mehr in der Console Ausgaben gezeigt. 5 | 6 | failOnCorrupt.title=Fehlschlag bei fehlerhaften Dateien 7 | failOnCorrupt.description=Falls aktiviert, wird der Build als fehlgeschlagen markiert, sobald eine zu parsende Datei \ 8 | nicht eingelesen werden kann (z.B. weil die Datei fehlerhaft ist). Andernfalls werden Fehler auf der Seite mit den Plug-in Ergebnissen dargestellt. 9 | 10 | noAuthors.title=Keine Autor und Commit Informationen 11 | noAuthors.description=Falls aktiviert, werden keinerlei Autor und Commit Informationen gespeichert. 12 | -------------------------------------------------------------------------------- /src/main/resources/util/advanced_ja.properties: -------------------------------------------------------------------------------- 1 | Detect\ modules=\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u691c\u51fa 2 | description.detectModules=\u8b66\u544a\u3092\u542b\u3080\u5168\u3066\u306e\u30d5\u30a1\u30a4\u30eb\u304b\u3089 Ant \u3084 Maven \u306e \u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u691c\u51fa\u3059\u3079\u304d\u304b\u3069\u3046\u304b\u3092\u6c7a\u3081\u307e\u3059\u3002 \ 3 | \u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6709\u52b9\u5316\u3059\u308b\u3068\u3001\u6b63\u78ba\u306a\u30e2\u30b8\u30e5\u30fc\u30eb\u540d\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u30ef\u30fc\u30af\u30b9\u30da\u30fc\u30b9\u5168\u4f53\u3092\u30b9\u30ad\u30e3\u30f3\u3057\u3066build.xml\u3084lpom.xml\u3092\u63a2\u3059\u3053\u3068\u306b\u306a\u308a\u3001 \ 4 | \u30d3\u30eb\u30c9\u6642\u9593\u304c\u9577\u304f\u306a\u308a\u307e\u3059\u3002 5 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/util/NullLogger.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | /** 4 | * Null logger. 5 | * 6 | * @author Ulli Hafner 7 | */ 8 | public final class NullLogger extends PluginLogger { 9 | /** 10 | * Creates a new instance of {@link NullLogger}. 11 | */ 12 | public NullLogger() { 13 | super("null"); 14 | } 15 | 16 | @Override 17 | public void log(final String message) { 18 | // do not log 19 | } 20 | 21 | @Override 22 | public void log(final Throwable throwable) { 23 | // do not log 24 | } 25 | 26 | @Override 27 | public void printStackTrace(final Throwable throwable) { 28 | // do not log 29 | } 30 | 31 | @Override 32 | public void logLines(final String lines) { 33 | // do not log 34 | } 35 | } -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/graph/TrendDetails/index.jelly: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/graph/GraphConfigurationView/index.properties: -------------------------------------------------------------------------------- 1 | description.domain=If set then the trend graph will show the average number of warnings per day, otherwise the warnings of all builds are shown. 2 | description.buildCount=If set only the specified number of builds are considered for the trend graph computation. 3 | description.dayCount=If set only the builds within the specified number of days are considered for the trend graph computation. 4 | description.parameterName=If set only builds with matching parameter name are considered for the trend graph computation. 5 | description.parameterValue=If set only builds with matching parameter value are considered for the trend graph computation. 6 | name.domain=Aggregate per day 7 | name.builds=# builds 8 | name.days=# days 9 | name.parameterName=Parameter name 10 | name.parameterValue=Parameter value 11 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/AuthorDetail/index.jelly: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |

12 | 13 | 14 | ${it.header} 15 | 16 | 17 | ${it.name} - ${it.displayName} 18 | 19 | 20 |

21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 |
29 |
-------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/dashboard/AbstractPortlet.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.dashboard; 2 | 3 | import hudson.plugins.analysis.core.AbstractProjectAction; 4 | import hudson.plugins.view.dashboard.DashboardPortlet; 5 | 6 | /** 7 | * A portlet that provides the plug-in name and project action type. 8 | * 9 | * @author Ulli Hafner 10 | */ 11 | public abstract class AbstractPortlet extends DashboardPortlet { 12 | /** 13 | * Creates a new instance of {@link AbstractPortlet}. 14 | * 15 | * @param name 16 | * the name of the portlet 17 | */ 18 | public AbstractPortlet(final String name) { 19 | super(name); 20 | } 21 | 22 | /** 23 | * Returns the type of action that persists the warnings results. 24 | * 25 | * @return the action type 26 | */ 27 | protected abstract Class> getAction(); 28 | } 29 | 30 | -------------------------------------------------------------------------------- /src/main/resources/util/graphtype.jelly: -------------------------------------------------------------------------------- 1 | 7 | 8 | 10 | 11 |

12 | 13 | 14 | 15 | 16 |

17 |

18 | 19 | 20 | 21 | 22 | 23 | 24 |

25 | 26 |
-------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/graph/GraphConfigurationView/index_ja.properties: -------------------------------------------------------------------------------- 1 | Configure\ the\ trend\ graph=\u63A8\u79FB\u30B0\u30E9\u30D5 2 | Width=\u5E45 3 | Height=\u9AD8\u3055 4 | Type=\u8868\u793A\u65B9\u6CD5 5 | Save=\u4FDD\u5B58 6 | 7 | description.buildCount=\u305D\u306E\u6570\u306E\u30D3\u30EB\u30C9\u306E\u307F\u30B0\u30E9\u30D5\u8868\u793A\u3055\u308C\u307E\u3059 8 | description.dayCount=\u904E\u53BB\u305D\u306E\u6307\u5B9A\u65E5\u6570\u306E\u9593\u306B\u5B9F\u884C\u3055\u308C\u305F\u30D3\u30EB\u30C9\u306E\u307F\u30B0\u30E9\u30D5\u8868\u793A\u3055\u308C\u307E\u3059 9 | name.builds=\u8868\u793A\u30D3\u30EB\u30C9\u6570 10 | name.days=\u8868\u793A\u65E5\u6570 11 | name.domain=\u65E5\u5358\u4F4D\u3067\u96C6\u7D04 12 | description.domain=\u65E5\u6BCE\u306E\u8B66\u544A\u6570\u306E\u5E73\u5747\u3092\u8868\u793A\u3057\u307E\u3059\u3002\u8A2D\u5B9A\u3057\u306A\u3051\u308C\u3070\u3001\u30D3\u30EB\u30C9\u306E\u8B66\u544A\u3092\u8868\u793A\u3057\u307E\u3059\u3002 13 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/core/UpgradeNotifier/message.jelly: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | The Static Analysis Plugin Suite is deprecated in favor of the new 6 | Warnings Next Generation Plugin. 8 | Please install the new plugin and convert your jobs, see 9 | documentation 11 | 12 | for details. 13 | Once all of your jobs use the new post build actions (or pipeline steps) you can safely remove the following 14 | plugins: 15 | analysis-core, analysis-collector, android-lint, checkstyle, dry, findbugs, pmd, open-tasks, and warnings. 16 |
17 | 18 |
-------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/util/model/AnnotationStream.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util.model; 2 | 3 | import hudson.util.HeapSpaceStringConverter; 4 | import hudson.util.XStream2; 5 | 6 | /** 7 | * An XStream for annotations. 8 | * 9 | * @author Ulli Hafner 10 | */ 11 | public class AnnotationStream extends XStream2 { 12 | private static final int HIGH_PRIORITY = 100; 13 | 14 | /** 15 | * Creates a new instance of AnnotationStream. 16 | */ 17 | public AnnotationStream() { 18 | super(); 19 | 20 | alias("annotation", FileAnnotation.class); 21 | alias("hudson.plugins.tasks.util.model.LineRange", LineRange.class); 22 | alias("range", LineRange.class); 23 | registerConverter(new HeapSpaceStringConverter(), HIGH_PRIORITY); 24 | registerConverter(new Priority.PriorityConverter(), HIGH_PRIORITY); 25 | addImmutableType(Priority.class); 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/core/AnalysisCorePlugin.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.core; 2 | 3 | import hudson.Plugin; 4 | 5 | /** 6 | * Provides unique keys for jelly scripts which can be accessed globally with 7 | * ${app.getPlugin('analysis-core')}. 8 | */ 9 | public class AnalysisCorePlugin extends Plugin { 10 | /** 11 | * A number that can be used to generate unique ids within a request. This 12 | * will not work for repeatable blocks, but should work for view elements 13 | * that are lazy loaded. 14 | */ 15 | private transient int counter; 16 | 17 | /** 18 | * Returns a new key. This number can be used to generate unique ids within 19 | * a request. 20 | * 21 | * @return a new key 22 | */ 23 | @SuppressWarnings("PMD.AvoidSynchronizedAtMethodLevel") 24 | public synchronized int getNewId() { 25 | if (counter == Integer.MAX_VALUE) { 26 | counter = 0; 27 | } 28 | return counter++; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/core/AnnotationParser.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.core; 2 | 3 | import java.io.File; 4 | import java.io.Serializable; 5 | import java.lang.reflect.InvocationTargetException; 6 | import java.util.Collection; 7 | 8 | import hudson.plugins.analysis.util.model.FileAnnotation; 9 | 10 | /** 11 | * A parser for annotations. 12 | * 13 | * @author Ulli Hafner 14 | */ 15 | public interface AnnotationParser extends Serializable { 16 | /** 17 | * Returns the annotations found in the specified file. 18 | * 19 | * @param file 20 | * the file to parse 21 | * @param moduleName 22 | * name of the maven module 23 | * @return the parsed result (stored in the module instance) 24 | * @throws InvocationTargetException 25 | * if the file could not be parsed (wrap your exception in this exception) 26 | */ 27 | Collection parse(final File file, final String moduleName) throws InvocationTargetException; 28 | } 29 | 30 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/tokens/AbstractResultTokenMacro.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.tokens; 2 | 3 | import hudson.plugins.analysis.core.BuildResult; 4 | import hudson.plugins.analysis.core.ResultAction; 5 | 6 | /** 7 | * Provides a token that evaluates to the plug-in build result. 8 | * 9 | * @author Ulli Hafner 10 | */ 11 | public class AbstractResultTokenMacro extends AbstractTokenMacro { 12 | /** 13 | * Creates a new instance of {@link AbstractResultTokenMacro}. 14 | * @param tokenName 15 | * the name of the token 16 | * @param resultActions 17 | * associated actions containing the build result 18 | */ 19 | public AbstractResultTokenMacro(final String tokenName, 20 | final Class>... resultActions) { 21 | super(tokenName, resultActions); 22 | } 23 | 24 | @Override 25 | protected String evaluate(final BuildResult result) { 26 | return result.getPluginResult().toString(); 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/dashboard/AbstractWarningsGraphPortlet/config.jelly: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/test/java/hudson/plugins/analysis/util/TrendReportHeightValidatorTest.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | import org.junit.Test; 4 | 5 | /** 6 | * Tests the class {@link TrendReportHeightValidator}. 7 | * 8 | * @author Ulli Hafner 9 | */ 10 | public class TrendReportHeightValidatorTest extends AbstractValidatorTest { 11 | /** 12 | * Test some valid encodings. 13 | */ 14 | @Test 15 | public void testValidEncodings() { 16 | assertThatInputIsValid("50"); 17 | assertThatInputIsValid("51"); 18 | assertThatInputIsValid("52"); 19 | assertThatInputIsValid("5000"); 20 | } 21 | 22 | /** 23 | * Test some invalid encodings. 24 | */ 25 | @Test 26 | public void testInvalidEncodings() { 27 | assertThatInputIsInvalid("NIX"); 28 | assertThatInputIsInvalid("-1"); 29 | assertThatInputIsInvalid("49"); 30 | } 31 | 32 | @Override 33 | protected Validator createValidator() { 34 | return new TrendReportHeightValidator(); 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/core/MavenProjectChecker.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.core; 2 | 3 | import hudson.maven.AbstractMavenProject; 4 | 5 | import hudson.model.AbstractProject; 6 | 7 | /** 8 | * Checks if the specified project is a maven job. Since the maven plug-in is optional, this method needs to be in a 9 | * separate class. 10 | * 11 | * @author Ulli Hafner 12 | */ 13 | public final class MavenProjectChecker { 14 | /** 15 | * Returns whether the specified job type is a maven job. 16 | * 17 | * @param jobType 18 | * the class of this job 19 | * @return true if the specified job type is a maven job, false otherwise 20 | */ 21 | public static boolean isMavenProject(@SuppressWarnings("rawtypes") final Class jobType) { 22 | return AbstractMavenProject.class.isAssignableFrom(jobType); 23 | } 24 | 25 | /** 26 | * Creates a new instance of {@link MavenProjectChecker}. 27 | */ 28 | private MavenProjectChecker() { 29 | // prevents instantiation 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/tokens/AbstractAnnotationsCountTokenMacro.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.tokens; 2 | 3 | import hudson.plugins.analysis.core.BuildResult; 4 | import hudson.plugins.analysis.core.ResultAction; 5 | 6 | /** 7 | * Provides a token that evaluates to the number of annotations found by a 8 | * plug-in. 9 | * 10 | * @author Ulli Hafner 11 | */ 12 | public class AbstractAnnotationsCountTokenMacro extends AbstractTokenMacro { 13 | /** 14 | * Creates a new instance of {@link AbstractAnnotationsCountTokenMacro}. 15 | * @param tokenName 16 | * the name of the token 17 | * @param resultActions 18 | * associated actions containing the build result 19 | */ 20 | public AbstractAnnotationsCountTokenMacro(final String tokenName, 21 | final Class>... resultActions) { 22 | super(tokenName, resultActions); 23 | } 24 | 25 | @Override 26 | protected String evaluate(final BuildResult result) { 27 | return String.valueOf(result.getNumberOfAnnotations()); 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/tokens/AbstractNewAnnotationsTokenMacro.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.tokens; 2 | 3 | import hudson.plugins.analysis.core.BuildResult; 4 | import hudson.plugins.analysis.core.ResultAction; 5 | 6 | /** 7 | * Provides a token that evaluates to the number of new annotations found by a 8 | * plug-in. 9 | * 10 | * @author Ulli Hafner 11 | */ 12 | public class AbstractNewAnnotationsTokenMacro extends AbstractTokenMacro { 13 | /** 14 | * Creates a new instance of {@link AbstractNewAnnotationsTokenMacro}. 15 | * @param tokenName 16 | * the name of the token 17 | * @param resultActions 18 | * associated actions containing the build result 19 | */ 20 | public AbstractNewAnnotationsTokenMacro(final String tokenName, 21 | final Class>... resultActions) { 22 | super(tokenName, resultActions); 23 | } 24 | 25 | @Override 26 | protected String evaluate(final BuildResult result) { 27 | return String.valueOf(result.getNumberOfNewWarnings()); 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/tokens/AbstractFixedAnnotationsTokenMacro.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.tokens; 2 | 3 | import hudson.plugins.analysis.core.BuildResult; 4 | import hudson.plugins.analysis.core.ResultAction; 5 | 6 | /** 7 | * Provides a token that evaluates to the number of fixed annotations found by a 8 | * plug-in. 9 | * 10 | * @author Ulli Hafner 11 | */ 12 | public class AbstractFixedAnnotationsTokenMacro extends AbstractTokenMacro { 13 | /** 14 | * Creates a new instance of {@link AbstractFixedAnnotationsTokenMacro}. 15 | * @param tokenName 16 | * the name of the token 17 | * @param resultActions 18 | * associated actions containing the build result 19 | */ 20 | public AbstractFixedAnnotationsTokenMacro(final String tokenName, 21 | final Class>... resultActions) { 22 | super(tokenName, resultActions); 23 | } 24 | 25 | @Override 26 | protected String evaluate(final BuildResult result) { 27 | return String.valueOf(result.getNumberOfFixedWarnings()); 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /src/main/resources/result/priorities-summary.jelly: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 |

${%Summary}

7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 28 | 29 | 30 | 31 |
${%Total}${priority.longLocalizedString}
${it.numberOfAnnotations} 19 |
20 | 21 | 0 22 | 23 | 24 | ${it.getNumberOfAnnotations(priority)} 25 | 26 |
27 |
32 |
-------------------------------------------------------------------------------- /Jenkinsfile.local: -------------------------------------------------------------------------------- 1 | node { 2 | stage ('Checkout') { 3 | checkout scm 4 | } 5 | 6 | stage ('Build') { 7 | def mvnHome = tool 'mvn-default' 8 | 9 | sh "${mvnHome}/bin/mvn --batch-mode -V -U -e clean verify -Dsurefire.useFile=false" 10 | 11 | junit testResults: '**/target/*-reports/TEST-*.xml' 12 | 13 | def java = scanForIssues tool: [$class: 'Java'] 14 | def javadoc = scanForIssues tool: [$class: 'JavaDoc'] 15 | 16 | publishIssues issues:[java, javadoc] 17 | } 18 | 19 | stage ('Analysis') { 20 | def mvnHome = tool 'mvn-default' 21 | 22 | sh "${mvnHome}/bin/mvn -batch-mode -V -U -e checkstyle:checkstyle findbugs:findbugs" 23 | 24 | def checkstyle = scanForIssues tool: [$class: 'CheckStyle'], pattern: '**/target/checkstyle-result.xml' 25 | publishIssues issues:[checkstyle] 26 | 27 | def findbugs = scanForIssues tool: [$class: 'FindBugs'], pattern: '**/target/findbugsXml.xml' 28 | publishIssues issues:[findbugs] 29 | 30 | def maven = scanForIssues tool: [$class: 'MavenConsole'] 31 | publishIssues issues:[maven] 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/test/java/hudson/plugins/analysis/core/SerializableSettingsTest.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.core; 2 | 3 | import static org.junit.Assert.*; 4 | import static org.mockito.Mockito.*; 5 | 6 | import org.junit.Test; 7 | 8 | /** 9 | * Tests the class {@link SerializableSettings}. 10 | * 11 | * @author Ulli Hafner 12 | */ 13 | public class SerializableSettingsTest { 14 | /** 15 | * Simple test to see that all values are stored. 16 | */ 17 | @Test 18 | public void testValues() { 19 | Settings original = mock(Settings.class); 20 | SerializableSettings copy; 21 | 22 | copy = new SerializableSettings(original); 23 | assertFalse("Wrong value for quiet: ", copy.getQuietMode()); 24 | assertFalse("Wrong value for fail: ", copy.getFailOnCorrupt()); 25 | 26 | when(original.getFailOnCorrupt()).thenReturn(true); 27 | when(original.getQuietMode()).thenReturn(true); 28 | 29 | copy = new SerializableSettings(original); 30 | assertTrue("Wrong value for quiet: ", copy.getQuietMode()); 31 | assertTrue("Wrong value for fail: ", copy.getFailOnCorrupt()); 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /License.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2008-2011 Dr. Ullrich Hafner 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/core/Settings.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.core; 2 | 3 | /** 4 | * Global settings for all static code analysis plug-ins. 5 | * 6 | * @author Ulli Hafner 7 | */ 8 | public interface Settings { 9 | /** 10 | * Returns whether the logger should be quite. If the logger is quite then the output is not shown in the 11 | * console log. 12 | * 13 | * @return on true no logging statements are written to the console log 14 | */ 15 | Boolean getQuietMode(); 16 | 17 | /** 18 | * Returns whether a build should be failed if the parsed input file is invalid or corrupted. 19 | * 20 | * @return on true the build will be failed, on false an error message is reported 21 | */ 22 | Boolean getFailOnCorrupt(); 23 | 24 | /** 25 | * Returns whether author and commit information should be omitted. 26 | * 27 | * @return on true the SCM will not be called to obtain author and commit information, 28 | * on false author and commit information are created 29 | */ 30 | Boolean getNoAuthors(); 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/util/model/JavaPackage.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util.model; 2 | 3 | /** 4 | * A serializable Java Bean class representing a Java package. 5 | * 6 | * @author Ulli Hafner 7 | */ 8 | public class JavaPackage extends AnnotationContainer { 9 | /** Unique identifier of this class. */ 10 | private static final long serialVersionUID = 4034932648975191723L; 11 | /** Name of this package. */ 12 | private String name; // NOPMD: backward compatibility 13 | 14 | /** 15 | * Creates a new instance of JavaPackage. 16 | * 17 | * @param packageName 18 | * the name of this package 19 | */ 20 | public JavaPackage(final String packageName) { 21 | super(packageName, Hierarchy.PACKAGE); 22 | } 23 | 24 | /** 25 | * Rebuilds the priorities mapping. 26 | * 27 | * @return the created object 28 | */ 29 | private Object readResolve() { 30 | setHierarchy(Hierarchy.PACKAGE); 31 | rebuildMappings(); 32 | if (name != null) { 33 | setName(name); 34 | } 35 | return this; 36 | } 37 | } 38 | 39 | -------------------------------------------------------------------------------- /src/main/resources/result/priority-graph.jelly: -------------------------------------------------------------------------------- 1 | 4 | 5 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 21 | 22 | 23 | 25 | 26 | 28 | 29 |
16 | 20 | 24 | 27 |
30 | 31 |
-------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/dashboard/DefaultGraph.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.dashboard; 2 | 3 | import hudson.plugins.analysis.graph.GraphConfiguration; 4 | 5 | /** 6 | * Provides the defaults for portlets with a trend graph. 7 | * 8 | * @author Ulli Hafner 9 | */ 10 | public final class DefaultGraph { 11 | /** Default day count. */ 12 | private static final int DEFAULT_DAY_COUNT = 30; 13 | /** The default width. */ 14 | private static final int DEFAULT_WIDTH = 500; 15 | /** The default height. */ 16 | private static final int DEFAULT_HEIGHT = 200; 17 | 18 | /** 19 | * Provides a default graph configuration for portlets. 20 | * 21 | * @return the graph configuration 22 | */ 23 | public static GraphConfiguration initialize() { 24 | GraphConfiguration configuration = GraphConfiguration.createDefault(); 25 | configuration.initializeFrom(DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_DAY_COUNT); 26 | 27 | return configuration; 28 | } 29 | 30 | /** 31 | * Creates a new instance of {@link DefaultGraph}. 32 | */ 33 | private DefaultGraph() { 34 | // prevents instantiation 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/details.jelly: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 16 | 17 | 18 | 26 | 27 |
10 | , 11 | ${warning.type}, ${%Priority}: ${warning.priority.localizedString} 12 | 13 | , ${%Category}: ${warning.category} 14 | 15 |
19 |

20 | 21 |

22 |

23 | 24 |

25 |
28 |
29 |
-------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/util/FileInputStreamFactory.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | import java.io.File; 4 | import java.io.FileNotFoundException; 5 | import java.io.InputStream; 6 | 7 | import org.apache.tools.ant.types.FileSet; 8 | 9 | /** 10 | * Factory to create an {@link InputStream} from an absolute filename. 11 | * 12 | * @author Ulli Hafner 13 | */ 14 | public interface FileInputStreamFactory { 15 | /** 16 | * Creates an {@link InputStream} from the specified filename. 17 | * 18 | * @param fileName 19 | * the file name 20 | * @return the input stream 21 | * @throws FileNotFoundException 22 | * if the file could not be found 23 | */ 24 | InputStream create(String fileName) throws FileNotFoundException; 25 | 26 | /** 27 | * Returns all file names that match the specified pattern. 28 | * 29 | * @param root 30 | * root directory to start the search from 31 | * @param pattern 32 | * the Ant {@link FileSet} pattern to search for 33 | * @return the found file names 34 | */ 35 | String[] find(File root, String pattern); 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/graph/ColorPalette.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.graph; 2 | 3 | import java.awt.Color; 4 | 5 | import com.google.common.collect.ImmutableList; 6 | 7 | /** 8 | * Replacement for Jenkins {@link hudson.util.ColorPalette} in order to get good 9 | * looking graphs even if the green balls plug-in is installed. 10 | * 11 | * @author Ulli Hafner 12 | */ 13 | @SuppressWarnings("javadoc") 14 | public final class ColorPalette { 15 | public static final Color RED = new Color(0xEF, 0x29, 0x29); // NOCHECKSTYLE 16 | public static final Color YELLOW = new Color(0xFC, 0xE9, 0x4F); // NOCHECKSTYLE 17 | public static final Color BLUE = new Color(0x72, 0x9F, 0xCF); // NOCHECKSTYLE 18 | public static final Color GREY = new Color(0xAB, 0xAB, 0xAB); // NOCHECKSTYLE 19 | 20 | /** 21 | * Color list usable for generating line charts. 22 | */ 23 | public static final ImmutableList LINE_GRAPH = ImmutableList.of( 24 | new Color(0xCC0000), new Color(0x3465a4), new Color(0x73d216), new Color(0xedd400)); 25 | 26 | /** 27 | * Creates a new instance of {@link ColorPalette}. 28 | */ 29 | private ColorPalette() { 30 | // prevents instantiation 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/util/AbstractPackageDetector.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | import java.io.File; 4 | import java.io.FileInputStream; 5 | import java.io.FileNotFoundException; 6 | 7 | import org.apache.commons.io.IOUtils; 8 | 9 | /** 10 | * Base class for package detectors. 11 | * 12 | * @author Ulli Hafner 13 | */ 14 | // FIXME: Add method that uses the specified encoding when reading the files 15 | public abstract class AbstractPackageDetector implements PackageDetector { 16 | /** Identifies an unknown package. */ 17 | protected static final String UNKNOWN_PACKAGE = "-"; 18 | 19 | @Override 20 | public String detectPackageName(final String fileName) { 21 | FileInputStream input = null; 22 | try { 23 | if (accepts(fileName)) { 24 | input = new FileInputStream(new File(fileName)); 25 | return detectPackageName(input); 26 | } 27 | } 28 | catch (FileNotFoundException exception) { 29 | // ignore and return empty string 30 | } 31 | finally { 32 | IOUtils.closeQuietly(input); 33 | } 34 | return UNKNOWN_PACKAGE; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/util/SaxSetup.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | import org.apache.xerces.parsers.SAXParser; 4 | 5 | /** 6 | * Registers the correct SAX driver if the environment variable is set. 7 | * 8 | * @Deprecated The usage of this class is discouraged, see JENKINS-27548 9 | */ 10 | @Deprecated 11 | public class SaxSetup { 12 | /** Property of SAX parser factory. */ 13 | public static final String SAX_DRIVER_PROPERTY = "org.xml.sax.driver"; 14 | 15 | private final String oldProperty; 16 | 17 | /** 18 | * Creates a new instance of {@link SaxSetup}. 19 | *

20 | * Registers a valid SAX driver. 21 | */ 22 | public SaxSetup() { 23 | oldProperty = System.getProperty(SAX_DRIVER_PROPERTY); 24 | if (oldProperty != null) { 25 | System.setProperty(SAX_DRIVER_PROPERTY, SAXParser.class.getName()); 26 | } 27 | } 28 | 29 | /** 30 | * Removes the registered SAX driver. 31 | */ 32 | public void cleanup() { 33 | if (oldProperty != null) { 34 | System.setProperty(SAX_DRIVER_PROPERTY, oldProperty); 35 | } 36 | else { 37 | System.clearProperty(SAX_DRIVER_PROPERTY); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/resources/util/health_ja.properties: -------------------------------------------------------------------------------- 1 | threshold.100.percent=100% 2 | threshold.0.percent=0% 3 | 4 | description.health.limit=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u7a7a\u6a21\u69d8\u306e\u95be\u5024\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u8b66\u544a\u306e\u6570\u304c\u4e21\u95be\u5024\u306e\u9593\u306b\u3042\u308b\u5834\u5408\u3001\u4e2d\u9593\u5024\u306b\u306a\u308a\u307e\u3059\u3002 5 | description.health.priorities=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u7a7a\u6a21\u69d8\u3092\u6c7a\u3081\u308b\u306e\u306b\u5229\u7528\u3059\u308b\u91cd\u8981\u5ea6 6 | 7 | description.healthy=\u8b66\u544a\u304c\u6307\u5b9a\u306e\u6570\u3088\u308a\u5c11\u306a\u3044\u5834\u5408\u306b\u306f\u3001\u72b6\u614b\u3092100%\u3068\u5831\u544a\u3057\u307e\u3059\u3002 8 | description.unhealthy=\u8b66\u544a\u304c\u6307\u5b9a\u306e\u6570\u3088\u308a\u591a\u3044\u5834\u5408\u306b\u306f\u3001\u72b6\u614b\u30920%\u3068\u5831\u544a\u3057\u307e\u3059\u3002 9 | 10 | Health\ thresholds=\u7a7a\u6a21\u69d8\u306e\u95be\u5024 11 | Health\ priorities=\u7a7a\u6a21\u69d8\u3092\u6c7a\u3081\u308b\u512a\u5148\u5ea6 12 | 13 | All\ priorities=\u5168\u3066\u306e\u91cd\u8981\u5ea6 14 | Only\ priority\ high=\u91cd\u8981\u5ea6High\u306e\u307f 15 | Priorities\ high\ and\ normal=\u91cd\u8981\u5ea6High\u3068Normal 16 | -------------------------------------------------------------------------------- /src/main/resources/result/priorities-summary_nl.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2004-2010, Sun Microsystems, Inc. 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | Summary=Samenvatting 24 | Total=Totaal 25 | -------------------------------------------------------------------------------- /src/main/resources/util/defaultEncoding_fr.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2004-2010, Sun Microsystems, Inc. 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | Default\ Encoding=Encodage par d\u00E9faut 24 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/core/AntBuilderCheck.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.core; 2 | 3 | import hudson.model.AbstractBuild; 4 | import hudson.model.Project; 5 | 6 | import hudson.tasks.Builder; 7 | import hudson.tasks.Ant; 8 | 9 | /** 10 | * Verifies if the build is an {@link Ant} task. 11 | * 12 | * @author Ulli Hafner 13 | */ 14 | public final class AntBuilderCheck { 15 | /** 16 | * Returns whether the current build uses ant. 17 | * 18 | * @param build 19 | * the current build 20 | * @return true if the current build uses ant, 21 | * false otherwise 22 | */ 23 | public static boolean isAntBuild(final AbstractBuild build) { 24 | if (build.getProject() instanceof Project) { 25 | Project project = (Project)build.getProject(); 26 | for (Builder builder : project.getBuilders()) { 27 | if (builder instanceof Ant) { 28 | return true; 29 | } 30 | } 31 | } 32 | return false; 33 | } 34 | 35 | /** 36 | * Creates a new instance of {@link AntBuilderCheck}. 37 | */ 38 | private AntBuilderCheck() { 39 | // prevent instantiation 40 | } 41 | } 42 | 43 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/core/SerializableSettings.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.core; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * Serializable settings that could be transferred to slaves. 7 | * 8 | * @author Ulli Hafner 9 | */ 10 | public class SerializableSettings implements Settings, Serializable { 11 | private static final long serialVersionUID = 2078877884081589761L; 12 | 13 | private final boolean failOnCorrupt; 14 | private final boolean quietMode; 15 | /** @Since 1.88 */ 16 | private final Boolean noAuthors; 17 | 18 | /** 19 | * Creates a new instance of {@link SerializableSettings}. 20 | * 21 | * @param original 22 | * the original settings 23 | */ 24 | public SerializableSettings(final Settings original) { 25 | failOnCorrupt = original.getFailOnCorrupt(); 26 | quietMode = original.getQuietMode(); 27 | noAuthors = original.getNoAuthors(); 28 | } 29 | 30 | @Override 31 | public Boolean getQuietMode() { 32 | return quietMode; 33 | } 34 | 35 | @Override 36 | public Boolean getFailOnCorrupt() { 37 | return failOnCorrupt; 38 | } 39 | 40 | @Override 41 | public Boolean getNoAuthors() { 42 | return noAuthors; 43 | } 44 | } 45 | 46 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/core/AbstractProjectAction/floatingBox_es_ES.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2004-2010, Sun Microsystems, Inc. 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | Configure=Configurar 24 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/core/AbstractProjectAction/floatingBox_fr.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2004-2010, Sun Microsystems, Inc. 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | Configure=Configurer 24 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/core/AbstractProjectAction/floatingBox_nl.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2004-2010, Sun Microsystems, Inc. 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | Configure=Configureer 24 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/core/AbstractProjectAction/floatingBox_nb_NO.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2004-2010, Sun Microsystems, Inc. 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | Configure=Konfigurere 24 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/core/AbstractProjectAction/floatingBox_sv_SE.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2004-2010, Sun Microsystems, Inc. 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | Configure=Konfigurera 24 | -------------------------------------------------------------------------------- /src/main/resources/result/priorities-summary_zh_TW.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2013, Chunghwa Telecom Co., Ltd., Pei-Tang Huang 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | Summary=\u6458\u8981 24 | Total=\u7e3d\u8a08 25 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/packages_zh_TW.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2013, Chunghwa Telecom Co., Ltd., Pei-Tang Huang 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | Total=\u7e3d\u8a08 24 | Distribution=\u5206\u4f48 25 | -------------------------------------------------------------------------------- /src/main/resources/result/trend-summary.jelly: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 |

${%Warnings Trend}

7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 25 | 33 | 34 | 35 |
${%All Warnings}${%New Warnings}${%Fixed Warnings}
${it.numberOfAnnotations} 18 | 19 | 0 20 | 21 | 22 | ${it.numberOfNewWarnings} 23 | 24 | 26 | 27 | 0 28 | 29 | 30 | ${it.numberOfFixedWarnings} 31 | 32 |
36 | 37 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/FixedWarningsDetail/index_zh_TW.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2013, Chunghwa Telecom Co., Ltd., Pei-Tang Huang 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | Fixed\ Warnings=\u4fee\u6b63\u7684\u8b66\u544a 24 | -------------------------------------------------------------------------------- /src/main/resources/util/summary_zh_TW.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2013, Chunghwa Telecom Co., Ltd., Pei-Tang Huang 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | error.message=\u5256\u6790\u6642\u767c\u751f\u932f\u8aa4\u3002 24 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/core/AbstractProjectAction/floatingBox.jelly: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 |
6 |
7 | ${from.trendName} 8 |
9 |
10 | 12 | 13 |
14 |
15 | ${%Enlarge} 16 | 17 | ${%Configure} 18 |
19 |
20 |
21 | 22 | 25 | 26 |
27 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/SourceDetail/index_zh_TW.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2013, Chunghwa Telecom Co., Ltd., Pei-Tang Huang 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | sourcedetail.header=\u6a94\u6848 {0} \u7684\u5167\u5bb9 24 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/details_zh_TW.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2013, Chunghwa Telecom Co., Ltd., Pei-Tang Huang 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | Priority=\u512a\u5148\u9806\u5e8f 24 | Category=\u985e\u5225 25 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/files_zh_TW.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2013, Chunghwa Telecom Co., Ltd., Pei-Tang Huang 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | File=\u6a94\u6848 24 | Total=\u7e3d\u8a08 25 | Distribution=\u5206\u4f48 26 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/types_zh_TW.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2013, Chunghwa Telecom Co., Ltd., Pei-Tang Huang 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | Type=\u985e\u578b 24 | Total=\u7e3d\u8a08 25 | Distribution=\u5206\u4f48 26 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/modules_zh_TW.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2013, Chunghwa Telecom Co., Ltd., Pei-Tang Huang 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | Module=\u6a21\u7d44 24 | Total=\u7e3d\u8a08 25 | Distribution=\u5206\u4f48 26 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/categories_zh_TW.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2013, Chunghwa Telecom Co., Ltd., Pei-Tang Huang 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | Category=\u985e\u5225 24 | Total=\u7e3d\u8a08 25 | Distribution=\u5206\u4f48 26 | -------------------------------------------------------------------------------- /src/main/resources/result/trend-summary_nl.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2004-2010, Sun Microsystems, Inc. 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | All\ Warnings=Alle waarschuwingen 24 | Fixed\ Warnings=Verbeterde waarschuwingen 25 | New\ Warnings=Nieuwe waarschuwingen 26 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/core/HealthDescriptor.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.core; 2 | 3 | import java.io.Serializable; 4 | 5 | import hudson.plugins.analysis.util.model.Priority; 6 | 7 | /** 8 | * A health descriptor defines the parameters to create the build health. 9 | * 10 | * @author Ulli Hafner 11 | */ 12 | public interface HealthDescriptor extends Serializable { 13 | /** 14 | * Returns the threshold of all annotations to be reached if a build should 15 | * be considered as unstable or failed, resp. 16 | * 17 | * @return the threshold 18 | */ 19 | Thresholds getThresholds(); 20 | 21 | /** 22 | * Returns the healthy threshold, i.e. when health is reported as 100%. 23 | * 24 | * @return the 100% healthiness 25 | */ 26 | String getHealthy(); 27 | 28 | /** 29 | * Returns the unhealthy threshold, i.e. when health is reported as 0%. 30 | * 31 | * @return the 0% unhealthiness 32 | */ 33 | String getUnHealthy(); 34 | 35 | /** 36 | * Returns the minimum priority that should be considered when computing 37 | * build health. E.g., if {@link Priority#NORMAL} is returned, then 38 | * annotations with priority {@link Priority#LOW} are ignored. 39 | * 40 | * @return the minimum priority to consider 41 | */ 42 | Priority getMinimumPriority(); 43 | } 44 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/core/AbstractProjectAction/floatingBox_zh_TW.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2013, Chunghwa Telecom Co., Ltd., Pei-Tang Huang 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | Enlarge=\u653e\u5927 24 | Configure=\u8a2d\u5b9a 25 | enable.graph=\u555f\u7528 {0} 26 | -------------------------------------------------------------------------------- /src/main/resources/result/trend-summary_fr.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2004-2010, Sun Microsystems, Inc. 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | All\ Warnings=Toutes les Alertes 24 | Fixed\ Warnings=Alertes r\u00E9solues 25 | New\ Warnings=Nouvelles Alertes 26 | Warnings\ Trend=Tendance des Alertes 27 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/util/PackageDetector.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | import java.io.InputStream; 4 | 5 | /** 6 | * Detects the package or namespace name of a file. 7 | * 8 | * @author Ulli Hafner 9 | */ 10 | public interface PackageDetector { 11 | /** 12 | * Detects the package or namespace name of the specified input stream. The 13 | * stream must be closed afterwards. 14 | * 15 | * @param stream 16 | * the content of the file to scan 17 | * @return the detected package or namespace name 18 | */ 19 | String detectPackageName(final InputStream stream); 20 | 21 | /** 22 | * Detects the package or namespace name of the specified input stream. The 23 | * stream must be closed afterwards. 24 | * 25 | * @param fileName 26 | * the file name of the file to scan 27 | * @return the detected package or namespace name 28 | */ 29 | String detectPackageName(final String fileName); 30 | 31 | /** 32 | * Returns whether this classifier accepts the specified file for 33 | * processing. 34 | * 35 | * @param fileName 36 | * the file name 37 | * @return true if the classifier accepts the specified file 38 | * for processing. 39 | */ 40 | boolean accepts(String fileName); 41 | } 42 | -------------------------------------------------------------------------------- /src/main/resources/result/priorities-summary_fr.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2004-2010, Sun Microsystems, Inc. 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | High\ Priority=Haute priorit\u00E9 24 | Low\ Priority=Basse priorit\u00E9 25 | Normal\ Priority=Priorit\u00E9 normale 26 | Summary=R\u00E9sum\u00E9 27 | Total=Total 28 | -------------------------------------------------------------------------------- /src/main/resources/util/trend_zh_TW.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2013, Chunghwa Telecom Co., Ltd., Pei-Tang Huang 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | Trend\ graph=\u8da8\u52e2\u5716 24 | configure=\u60a8\u53ef\u4ee5\u5728\u7368\u7acb\u8996\u666f\u4e2d\u8a2d\u5b9a\u8da8\u52e2\u5716\u7684\u9810\u8a2d\u503c\u3002 25 | -------------------------------------------------------------------------------- /src/test/java/hudson/plugins/analysis/core/IsOverriddenTest.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.core; 2 | 3 | import static org.junit.Assert.*; 4 | 5 | import org.junit.Test; 6 | 7 | import hudson.plugins.analysis.util.Compatibility; 8 | 9 | /** 10 | * Test for {@link Compatibility.isOverridden} method. 11 | */ 12 | public class IsOverriddenTest { 13 | 14 | /** 15 | * Test that a method is found by isOverridden even when it is inherited from an intermediate class. 16 | */ 17 | @Test 18 | public void isOverriddenTest() { 19 | assertTrue(Compatibility.isOverridden(Base.class, Derived.class, "method")); 20 | assertTrue(Compatibility.isOverridden(Base.class, Intermediate.class, "method")); 21 | assertFalse(Compatibility.isOverridden(Base.class, Base.class, "method")); 22 | } 23 | 24 | /** 25 | * Negative test. 26 | * Trying to check for a method which does not exist in the hierarchy, 27 | */ 28 | @Test(expected = AssertionError.class) 29 | public void isOverriddenNegativeTest() { 30 | Compatibility.isOverridden(Base.class, Derived.class, "method2"); 31 | } 32 | 33 | public abstract class Base { 34 | protected abstract void method(); 35 | } 36 | public abstract class Intermediate extends Base { 37 | protected void method() {} 38 | } 39 | public class Derived extends Intermediate {} 40 | 41 | } 42 | 43 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/dashboard/AbstractWarningsTablePortlet/config_zh_TW.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2013, Chunghwa Telecom Co., Ltd., Pei-Tang Huang 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | Name=\u540d\u7a31 24 | Hide\ zero\ warnings\ projects=\u96b1\u85cf\u6c92\u6709\u8b66\u544a\u7684\u5c08\u6848 25 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/dashboard/AbstractWarningsTablePortlet/portlet_zh_TW.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2013, Chunghwa Telecom Co., Ltd., Pei-Tang Huang 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | Job=\u4f5c\u696d 24 | Total=\u7e3d\u8a08 25 | 26 | High=\u9ad8 27 | Normal=\u4e00\u822c 28 | Low=\u4f4e 29 | -------------------------------------------------------------------------------- /src/main/resources/util/trend_fr.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2004-2010, Sun Microsystems, Inc. 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | Trend\ graph=Graphique de la tendance 24 | configure=Vous pouvez d\u00E9finir les valeurs par d\u00E9faut pour le graphe illustrant la tendance actuelle dans une vue s\u00E9par\u00E9e. 25 | -------------------------------------------------------------------------------- /src/main/resources/result/fixed_zh_TW.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2013, Chunghwa Telecom Co., Ltd., Pei-Tang Huang 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | File=\u6a94\u6848 24 | Line=\u884c 25 | Warning\ Type=\u8b66\u544a\u985e\u578b 26 | Priority=\u512a\u5148\u9806\u5e8f 27 | Type=\u985e\u578b 28 | Category=\u985e\u5225 29 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/graph/EmptyGraph.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.graph; 2 | 3 | import java.util.Collection; 4 | 5 | import org.jfree.chart.JFreeChart; 6 | import org.jfree.data.xy.XYSeriesCollection; 7 | 8 | import hudson.plugins.analysis.Messages; 9 | import hudson.plugins.analysis.core.BuildResult; 10 | import hudson.plugins.analysis.core.ResultAction; 11 | 12 | /** 13 | * Empty graph. Null object: this graph does not render anything. 14 | * 15 | * @author Ulli Hafner 16 | */ 17 | public class EmptyGraph extends BuildResultGraph { 18 | @Override 19 | public String getId() { 20 | return "NONE"; 21 | } 22 | 23 | @Override 24 | public String getLabel() { 25 | return Messages.Trend_type_none(); 26 | } 27 | 28 | @Override 29 | public JFreeChart create(final GraphConfiguration configuration, 30 | final ResultAction resultAction, final String pluginName) { 31 | return createXYChart(new XYSeriesCollection()); 32 | } 33 | 34 | @Override 35 | public JFreeChart createAggregation(final GraphConfiguration configuration, 36 | final Collection> resultActions, final String pluginName) { 37 | return createXYChart(new XYSeriesCollection()); 38 | } 39 | 40 | @Override 41 | public boolean isVisible() { 42 | return false; 43 | } 44 | } 45 | 46 | -------------------------------------------------------------------------------- /src/test/resources/hudson/plugins/analysis/views/AbortException.txt: -------------------------------------------------------------------------------- 1 | package hudson.plugins.findbugs.util; 2 | 3 | /** 4 | * Indicates an orderly abortion of the processing. 5 | */ 6 | public final class AbortException extends RuntimeException { 7 | /** Generated ID. */ 8 | private static final long serialVersionUID = -5897876033901702893L; 9 | 10 | /** 11 | * Constructs a new exception with the specified detail message. 12 | * 13 | * @param message 14 | * the detail message (which is saved for later retrieval by the 15 | * {@link #getMessage()} method). 16 | */ 17 | public AbortException(final String message) { 18 | super(message); 19 | } 20 | 21 | /** 22 | * Constructs a new exception with the specified detail message and cause. 23 | * 24 | * @param message 25 | * the detail message (which is saved for later retrieval by the 26 | * {@link #getMessage()} method). 27 | * @param cause 28 | * the cause (which is saved for later retrieval by the 29 | * {@link #getCause()} method). (A null value is 30 | * permitted, and indicates that the cause is nonexistent or 31 | * unknown.) 32 | */ 33 | public AbortException(final String message, final Throwable cause) { 34 | super(message, cause); 35 | } 36 | } -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/graph/GraphConfigurationView/index_fr.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2004-2010, Sun Microsystems, Inc. 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | Configure\ the\ trend\ graph=Configurer le graphique de tendance 24 | Height=Hauteur 25 | Save=Sauvegarder 26 | Type=Type 27 | Width=Largeur 28 | name.days=# jours 29 | -------------------------------------------------------------------------------- /src/main/resources/result/trend-summary_zh_TW.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2013, Chunghwa Telecom Co., Ltd., Pei-Tang Huang 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | Warnings\ Trend=\u8b66\u544a\u8da8\u52e2 24 | All\ Warnings=\u6240\u6709\u8b66\u544a 25 | New\ Warnings=\u65b0\u589e\u7684\u8b66\u544a 26 | Fixed\ Warnings=\u4fee\u6b63\u7684\u8b66\u544a 27 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/util/PackageDetectors.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | import java.util.Arrays; 4 | import java.util.List; 5 | 6 | /** 7 | * Provides convenient methods to determine the package or namespace names of a 8 | * file. 9 | * 10 | * @author Ulli Hafner 11 | */ 12 | public final class PackageDetectors { 13 | /** If no package could be assigned this value is used as package name. */ 14 | public static final String UNDEFINED_PACKAGE = "-"; 15 | 16 | private static final List DETECTORS = Arrays.asList( 17 | new JavaPackageDetector(), new CsharpNamespaceDetector()); 18 | 19 | /** 20 | * Detects the package name of the specified file based on several detector 21 | * strategies. 22 | * 23 | * @param fileName 24 | * the filename of the file to scan 25 | * @return the package name or an empty string 26 | */ 27 | public static String detectPackageName(final String fileName) { 28 | for (PackageDetector detector : DETECTORS) { 29 | if (detector.accepts(fileName)) { 30 | return detector.detectPackageName(fileName); 31 | } 32 | } 33 | return UNDEFINED_PACKAGE; 34 | } 35 | 36 | /** 37 | * Creates a new instance of {@link PackageDetectors}. 38 | */ 39 | private PackageDetectors() { 40 | // prevents instantiation 41 | } 42 | } 43 | 44 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/modules.jelly: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 21 | 24 | 25 | 26 | 27 | 28 | 29 | 31 | 32 |
${%Module}${%Total}${%Distribution}
17 | ${container.name} 18 | ${container.numberOfAnnotations} 20 | 22 | 23 |
${%Total}${it.container.numberOfAnnotations} 30 |
33 |
-------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/warnings_zh_TW.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2013, Chunghwa Telecom Co., Ltd., Pei-Tang Huang 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | File=\u6a94\u6848 24 | Module=\u6a21\u7d44 25 | Package=\u5957\u4ef6 26 | Line=\u884c 27 | Priority=\u512a\u5148\u9806\u5e8f 28 | Type=\u985e\u578b 29 | Category=\u985e\u5225 30 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/files.jelly: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 21 | 24 | 25 | 26 | 27 | 28 | 29 | 31 | 32 |
${%File}${%Total}${%Distribution}
17 | ${container.shortName} 18 | ${container.numberOfAnnotations} 20 | 22 | 23 |
${%Total}${it.container.numberOfAnnotations} 30 |
33 |
34 | 35 | -------------------------------------------------------------------------------- /src/test/resources/hudson/plugins/analysis/util/complicated-package-declaration.txt: -------------------------------------------------------------------------------- 1 | package hudson.plugins.findbugs.util ; // NOPMD 2 | 3 | /** 4 | * Indicates an orderly abortion of the processing. 5 | */ 6 | public final class AbortException extends RuntimeException { 7 | /** Generated ID. */ 8 | private static final long serialVersionUID = -5897876033901702893L; 9 | 10 | /** 11 | * Constructs a new exception with the specified detail message. 12 | * 13 | * @param message 14 | * the detail message (which is saved for later retrieval by the 15 | * {@link #getMessage()} method). 16 | */ 17 | public AbortException(final String message) { 18 | super(message); 19 | } 20 | 21 | /** 22 | * Constructs a new exception with the specified detail message and cause. 23 | * 24 | * @param message 25 | * the detail message (which is saved for later retrieval by the 26 | * {@link #getMessage()} method). 27 | * @param cause 28 | * the cause (which is saved for later retrieval by the 29 | * {@link #getCause()} method). (A null value is 30 | * permitted, and indicates that the cause is nonexistent or 31 | * unknown.) 32 | */ 33 | public AbortException(final String message, final Throwable cause) { 34 | super(message, cause); 35 | } 36 | } -------------------------------------------------------------------------------- /src/test/resources/hudson/plugins/analysis/util/MavenJavaTest.txt: -------------------------------------------------------------------------------- 1 | package hudson.plugins.tasks.util; 2 | 3 | /** 4 | * Indicates an orderly abortion of the processing. 5 | */ 6 | // FIXME: here is something to fix 7 | public final class AbortException extends RuntimeException { 8 | /** Generated ID. */ 9 | private static final long serialVersionUID = -5897876033901702893L; 10 | 11 | /** 12 | * Constructs a new exception with the specified detail message. 13 | * 14 | * @param message 15 | * the detail message (which is saved for later retrieval by the 16 | * {@link #getMessage()} method). 17 | */ 18 | public AbortException(final String message) { 19 | super(message); 20 | } 21 | 22 | /** 23 | * Constructs a new exception with the specified detail message and cause. 24 | * 25 | * @param message 26 | * the detail message (which is saved for later retrieval by the 27 | * {@link #getMessage()} method). 28 | * @param cause 29 | * the cause (which is saved for later retrieval by the 30 | * {@link #getCause()} method). (A null value is 31 | * permitted, and indicates that the cause is nonexistent or 32 | * unknown.) 33 | */ 34 | public AbortException(final String message, final Throwable cause) { 35 | super(message, cause); 36 | } 37 | } -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/util/ToolTipAreaRenderer.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | import org.jfree.chart.renderer.category.StackedAreaRenderer; 4 | import org.jfree.data.category.CategoryDataset; 5 | 6 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 7 | 8 | import hudson.util.StackedAreaRenderer2; 9 | 10 | /** 11 | * {@link StackedAreaRenderer} that delegates tooltip generation to 12 | * a separate object. 13 | * 14 | * @author Ulli Hafner 15 | */ 16 | @SuppressFBWarnings("Eq") 17 | public class ToolTipAreaRenderer extends StackedAreaRenderer2 { 18 | /** Unique identifier of this class. */ 19 | private static final long serialVersionUID = -7373322043128362094L; 20 | /** The tooltip generator for the clickable map. */ 21 | private final SerializableToolTipGenerator toolTipGenerator; 22 | 23 | /** 24 | * Creates a new instance of {@link ToolTipAreaRenderer}. 25 | * 26 | * @param toolTipGenerator 27 | * the tooltip generator for the clickable map 28 | */ 29 | public ToolTipAreaRenderer(final SerializableToolTipGenerator toolTipGenerator) { 30 | super(); 31 | this.toolTipGenerator = toolTipGenerator; 32 | } 33 | 34 | @Override 35 | public String generateToolTip(final CategoryDataset dataset, final int row, final int column) { 36 | return toolTipGenerator.generateToolTip(dataset, row, column); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/authors.jelly: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 21 | 24 | 25 | 26 | 27 | 28 | 29 | 31 | 32 |
Author${%Total}${%Distribution}
17 | ${container.displayName} 18 | ${container.numberOfAnnotations} 20 | 22 | 23 |
${%Total}${it.container.numberOfAnnotations} 30 |
33 |
34 | 35 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/packages.jelly: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 21 | 24 | 25 | 26 | 27 | 28 | 29 | 31 | 32 |
${it.container.packageCategoryName}${%Total}${%Distribution}
17 | ${container.name} 18 | ${container.numberOfAnnotations} 20 | 22 | 23 |
${%Total}${it.container.numberOfAnnotations} 30 |
33 |
-------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/util/StringPluginLogger.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | import java.io.ByteArrayOutputStream; 4 | import java.io.PrintStream; 5 | import java.io.UnsupportedEncodingException; 6 | 7 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 8 | 9 | /** 10 | * A logger that prints to a string buffer. The logged message are available 11 | * using the {@link #toString()} method. 12 | * 13 | * @author Ulli Hafner 14 | */ 15 | @SuppressFBWarnings("DM") 16 | public class StringPluginLogger extends PluginLogger { 17 | private static final String ENCODING = "UTF-8"; 18 | private final ByteArrayOutputStream stream = new ByteArrayOutputStream(); 19 | 20 | /** 21 | * Creates a new instance of {@link StringPluginLogger}. 22 | * 23 | * @param pluginName 24 | * the name of the plug-in 25 | */ 26 | public StringPluginLogger(final String pluginName) { 27 | super(pluginName); 28 | 29 | try { 30 | setLogger(new PrintStream(stream, true, ENCODING)); 31 | } 32 | catch (UnsupportedEncodingException exception) { 33 | setLogger(new PrintStream(stream)); 34 | } 35 | } 36 | 37 | @Override 38 | public String toString() { 39 | try { 40 | return stream.toString(ENCODING); 41 | } 42 | catch (UnsupportedEncodingException exception) { 43 | return stream.toString(); 44 | } 45 | } 46 | } 47 | 48 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/dashboard/AbstractWarningsGraphPortlet/main_zh_TW.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2013, Chunghwa Telecom Co., Ltd., Pei-Tang Huang 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | no.results=\u6c92\u6709\u7d50\u679c\u53ef\u4ee5\u986f\u793a\u3002\u60a8\u6709\u5728\u4f5c\u696d\u4e2d\u555f\u7528\u8da8\u52e2\u5716\u8cc7\u6599\u4f86\u6e90\u7684\u5916\u639b\u7a0b\u5f0f\u55ce? 24 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/dashboard/AbstractWarningsGraphPortlet/portlet_zh_TW.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2013, Chunghwa Telecom Co., Ltd., Pei-Tang Huang 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | no.results=\u6c92\u6709\u7d50\u679c\u53ef\u4ee5\u986f\u793a\u3002\u60a8\u6709\u5728\u4f5c\u696d\u4e2d\u555f\u7528\u8da8\u52e2\u5716\u8cc7\u6599\u4f86\u6e90\u7684\u5916\u639b\u7a0b\u5f0f\u55ce? 24 | -------------------------------------------------------------------------------- /src/main/resources/result/fixed.jelly: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |
${%File}${%Line}${%Priority}${%Type}${%Category}
${warning.shortFileName} 21 | 22 | 23 | - 24 | 25 | 26 | ${warning.primaryLineNumber} 27 | 28 | 29 | ${warning.priority.localizedString} ${warning.type} ${warning.category}
37 |
-------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/util/AreaRenderer.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | import org.jfree.chart.renderer.category.StackedAreaRenderer; 4 | import org.jfree.data.category.CategoryDataset; 5 | 6 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 7 | 8 | /** 9 | * {@link StackedAreaRenderer} that delegates tooltip and URL generation to 10 | * separate objects. 11 | * 12 | * @author Ulli Hafner 13 | */ 14 | @SuppressFBWarnings("Eq") 15 | public class AreaRenderer extends ToolTipAreaRenderer { 16 | /** Unique identifier of this class. */ 17 | private static final long serialVersionUID = -6802385549191651555L; 18 | /** The URL generator for the clickable map. */ 19 | private final SerializableUrlGenerator urlGenerator; 20 | 21 | /** 22 | * Creates a new instance of {@link AreaRenderer}. 23 | * 24 | * @param urlGenerator 25 | * the URL generator for the clickable map 26 | * @param toolTipGenerator 27 | * the tooltip generator for the clickable map 28 | */ 29 | public AreaRenderer(final SerializableUrlGenerator urlGenerator, final SerializableToolTipGenerator toolTipGenerator) { 30 | super(toolTipGenerator); 31 | this.urlGenerator = urlGenerator; 32 | } 33 | 34 | @Override 35 | public final String generateURL(final CategoryDataset dataset, final int row, final int column) { 36 | return urlGenerator.generateURL(dataset, row, column); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/resources/util/defaultEncoding_zh_TW.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2013, Chunghwa Telecom Co., Ltd., Pei-Tang Huang 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | Default\ Encoding=\u9810\u8a2d\u7de8\u78bc 24 | description.defaultEncoding=\u5256\u6790\u6216\u662f\u986f\u793a\u6a94\u6848\u6642\u7684\u9810\u8a2d\u7de8\u78bc\u3002\ 25 | \u4e0d\u8a2d\u5b9a\u7684\u8a71\u8868\u793a\u8981\u4f7f\u7528\u5e73\u53f0\u9810\u8a2d\u7de8\u78bc\u3002 26 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/util/ToolTipBoxRenderer.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | import org.jfree.chart.labels.CategoryToolTipGenerator; 4 | import org.jfree.chart.renderer.category.StackedBarRenderer; 5 | import org.jfree.data.category.CategoryDataset; 6 | 7 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 8 | 9 | /** 10 | * {@link StackedBarRenderer} that delegates tooltip and URL generation to 11 | * separate objects. 12 | * 13 | * @author Ulli Hafner 14 | */ 15 | @SuppressFBWarnings("Eq") 16 | public class ToolTipBoxRenderer extends StackedBarRenderer implements CategoryToolTipGenerator { 17 | /** Unique identifier of this class. */ 18 | private static final long serialVersionUID = 3270603409987078410L; 19 | /** The tooltip generator for the clickable map. */ 20 | private final SerializableToolTipGenerator toolTipGenerator; 21 | 22 | /** 23 | * Creates a new instance of {@link ToolTipBoxRenderer}. 24 | * 25 | * @param toolTipGenerator 26 | * the tooltip generator for the clickable map 27 | */ 28 | public ToolTipBoxRenderer(final SerializableToolTipGenerator toolTipGenerator) { 29 | super(); 30 | this.toolTipGenerator = toolTipGenerator; 31 | setToolTipGenerator(this); 32 | } 33 | 34 | @Override 35 | public String generateToolTip(final CategoryDataset dataset, final int row, final int column) { 36 | return toolTipGenerator.generateToolTip(dataset, row, column); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/dashboard/AbstractWarningsGraphPortlet/config_zh_TW.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2013, Chunghwa Telecom Co., Ltd., Pei-Tang Huang 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | Name=\u540d\u7a31 24 | Width=\u5bec\u5ea6 25 | Height=\u9ad8\u5ea6 26 | description.dayCount=\u8a2d\u5b9a\u5f8c\uff0c\u8da8\u52e2\u5716\u5c07\u53ea\u6703\u986f\u793a\u6307\u5b9a\u5929\u6578\u5167\u7684\u5efa\u7f6e\u5167\u5bb9\u3002 27 | name.days=\u5929\u6578 28 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/util/SecureDigester.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | import java.io.IOException; 4 | 5 | import org.apache.commons.digester3.Digester; 6 | import org.xml.sax.EntityResolver; 7 | import org.xml.sax.InputSource; 8 | import org.xml.sax.SAXException; 9 | 10 | /** 11 | * A secure {@link Digester} implementation that does not resolve external entities. 12 | * 13 | * @author Ullrich Hafner 14 | */ 15 | public class SecureDigester extends Digester { 16 | /** 17 | * Creates a new {@link Digester} instance that does not resolve external entities. 18 | * 19 | * @param classWithClassLoader the class to get the class loader from 20 | */ 21 | public SecureDigester(Class classWithClassLoader) { 22 | setClassLoader(classWithClassLoader.getClassLoader()); 23 | setValidating(false); 24 | disableFeature("external-general-entities"); 25 | disableFeature("external-parameter-entities"); 26 | setEntityResolver(new EntityResolver() { 27 | @Override 28 | public InputSource resolveEntity(final String publicId, final String systemId) throws SAXException, IOException { 29 | return new InputSource(); 30 | } 31 | }); 32 | } 33 | 34 | @SuppressWarnings("all") 35 | private void disableFeature(final String feature) { 36 | try { 37 | setFeature("http://xml.org/sax/features/" + feature, false); 38 | } 39 | catch (Exception ignored) { 40 | // ignore and continue 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/core/UpgradeNotifier.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.core; 2 | 3 | import java.io.IOException; 4 | 5 | import org.kohsuke.stapler.StaplerRequest; 6 | import org.kohsuke.stapler.StaplerResponse; 7 | import org.kohsuke.stapler.interceptor.RequirePOST; 8 | 9 | import jenkins.model.Jenkins; 10 | 11 | import hudson.Extension; 12 | import hudson.model.AdministrativeMonitor; 13 | 14 | /** 15 | * Notifies administrators that the old analysis plugins are end-of-life and that the 16 | * new warnings plugin must be installed. 17 | * 18 | * @author Ullrich Hafner 19 | */ 20 | @Extension 21 | public class UpgradeNotifier extends AdministrativeMonitor { 22 | @Override 23 | public boolean isActivated() { 24 | Jenkins instance = Jenkins.getInstance(); 25 | 26 | return instance == null || instance.getPlugin("warnings-ng") == null; 27 | } 28 | 29 | /** 30 | * Depending on whether the user said "yes" or "no", send him to the right place. 31 | * 32 | * @param request stapler request 33 | * @param response stapler response 34 | * @throws IOException if the request cannot be redirected 35 | */ 36 | @RequirePOST 37 | public void doAct(StaplerRequest request, StaplerResponse response) throws IOException { 38 | if (request.hasParameter("dismiss")) { 39 | disable(true); 40 | response.sendRedirect(request.getContextPath() + "/manage"); 41 | } 42 | else if (request.hasParameter("help")) { 43 | response.sendRedirect("https://wiki.jenkins.io/x/1YTeCQ"); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/util/LoggerFactory.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | import java.io.PrintStream; 4 | 5 | import hudson.plugins.analysis.core.Settings; 6 | import hudson.plugins.analysis.core.GlobalSettings; 7 | 8 | /** 9 | * Provides a Mechanism to create a PluginLogger which depends on the QuietMode. QuietMode can be set in GlobalSettings. 10 | * 11 | * @author Sebastian Seidl 12 | */ 13 | public class LoggerFactory { 14 | private final Settings settings; 15 | 16 | /** 17 | * Creates a new instance of {@link LoggerFactory}. 18 | */ 19 | public LoggerFactory() { 20 | this(GlobalSettings.instance()); 21 | } 22 | 23 | /** 24 | * Creates a new instance of {@link LoggerFactory}. 25 | * 26 | * @param settings 27 | * the settings to use 28 | */ 29 | public LoggerFactory(final Settings settings) { 30 | this.settings = settings; 31 | } 32 | 33 | /** 34 | * Creates a new instance of {@link PluginLogger}. 35 | * 36 | * @param logger 37 | * the actual print stream to log to 38 | * @param pluginName 39 | * the plug-in name 40 | * @return the PluginLogger to use 41 | */ 42 | public PluginLogger createLogger(final PrintStream logger, final String pluginName) { 43 | if (isQuiet()) { 44 | return new NullLogger(); 45 | } 46 | else { 47 | return new PluginLogger(logger, pluginName); 48 | } 49 | } 50 | 51 | private boolean isQuiet() { 52 | return settings.getQuietMode(); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/util/ToolTipBuilder.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | import org.jfree.data.category.CategoryDataset; 4 | 5 | /** 6 | * Builds tooltips for items. 7 | * 8 | * @author Ulli Hafner 9 | */ 10 | public abstract class ToolTipBuilder implements SerializableToolTipGenerator { 11 | /** Unique ID of this class. */ 12 | private static final long serialVersionUID = 881869231153090533L; 13 | /** Delegate to get the actual tooltips. */ 14 | private final ToolTipProvider provider; 15 | 16 | /** 17 | * Creates a new instance of ToolTipBuilder. 18 | * 19 | * @param provider 20 | * the tool tip provider to use 21 | */ 22 | public ToolTipBuilder(final ToolTipProvider provider) { 23 | this.provider = provider; 24 | } 25 | 26 | @Override 27 | public String generateToolTip(final CategoryDataset dataset, final int row, final int column) { 28 | StringBuilder tooltip = new StringBuilder(); 29 | tooltip.append(provider.getTooltip(dataset.getValue(row, column).intValue())); 30 | tooltip.append(' '); 31 | tooltip.append(getShortDescription(row)); 32 | 33 | return tooltip.toString(); 34 | } 35 | 36 | /** 37 | * Returns a short description for of the selected row. This text is 38 | * appended to the number of elements message. 39 | * 40 | * @param row 41 | * the selected row 42 | * @return a short description 43 | */ 44 | protected abstract String getShortDescription(int row); 45 | } 46 | 47 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/util/BoxRenderer.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | import org.jfree.chart.renderer.category.StackedBarRenderer; 4 | import org.jfree.chart.urls.CategoryURLGenerator; 5 | import org.jfree.data.category.CategoryDataset; 6 | 7 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 8 | 9 | /** 10 | * {@link StackedBarRenderer} that delegates tooltip and URL generation to 11 | * separate objects. 12 | * 13 | * @author Ulli Hafner 14 | */ 15 | @SuppressFBWarnings("Eq") 16 | public class BoxRenderer extends ToolTipBoxRenderer implements CategoryURLGenerator { 17 | /** Unique identifier of this class. */ 18 | private static final long serialVersionUID = 1827457945114238470L; 19 | /** The URL generator for the clickable map. */ 20 | private final SerializableUrlGenerator urlGenerator; 21 | 22 | /** 23 | * Creates a new instance of {@link BoxRenderer}. 24 | * 25 | * @param urlGenerator 26 | * the URL generator for the clickable map 27 | * @param toolTipGenerator 28 | * the tooltip generator for the clickable map 29 | */ 30 | public BoxRenderer(final SerializableUrlGenerator urlGenerator, final SerializableToolTipGenerator toolTipGenerator) { 31 | super(toolTipGenerator); 32 | this.urlGenerator = urlGenerator; 33 | setItemURLGenerator(this); 34 | } 35 | 36 | @Override 37 | public final String generateURL(final CategoryDataset dataset, final int row, final int column) { 38 | return urlGenerator.generateURL(dataset, row, column); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/util/CsharpNamespaceDetector.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | 6 | import org.apache.commons.io.IOUtils; 7 | import org.apache.commons.io.LineIterator; 8 | import org.apache.commons.lang.StringUtils; 9 | 10 | /** 11 | * Detects the namespace of a C# workspace file. 12 | * 13 | * @author Ulli Hafner 14 | */ 15 | // CHECKSTYLE:CONSTANTS-OFF 16 | public class CsharpNamespaceDetector extends AbstractPackageDetector { 17 | @Override 18 | public boolean accepts(final String fileName) { 19 | return fileName.endsWith(".cs"); 20 | } 21 | 22 | /** {@inheritDoc}*/ 23 | @Override 24 | public String detectPackageName(final InputStream stream) { 25 | try { 26 | LineIterator iterator = IOUtils.lineIterator(stream, "UTF-8"); 27 | while (iterator.hasNext()) { 28 | String line = iterator.nextLine(); 29 | if (line.matches("^namespace .*$")) { 30 | if (line.contains("{")) { 31 | return StringUtils.substringBetween(line, " ", "{").trim(); 32 | } 33 | else { 34 | return StringUtils.substringAfter(line, " ").trim(); 35 | } 36 | } 37 | } 38 | } 39 | catch (IOException exception) { 40 | // ignore 41 | } 42 | finally { 43 | IOUtils.closeQuietly(stream); 44 | } 45 | return UNKNOWN_PACKAGE; 46 | } 47 | } 48 | 49 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/types.jelly: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 25 | 27 | 30 | 31 | 32 | 33 | 34 | 35 | 37 | 38 |
${%Type}${%Total}${%Distribution}
17 | 18 | 19 | 20 | 21 | 22 | ${name} 23 | 24 | ${container.numberOfAnnotations} 26 | 28 | 29 |
${%Total}${it.container.numberOfAnnotations} 36 |
39 |
-------------------------------------------------------------------------------- /src/main/resources/util/failed_zh_TW.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2013, Chunghwa Telecom Co., Ltd., Pei-Tang Huang 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | Run\ always=\u6c38\u9060\u57f7\u884c 24 | description.canRunOnFailed=\u9810\u8a2d\u60c5\u6cc1\u4e0b\uff0c\u672c\u5916\u639b\u7a0b\u5f0f\u53ea\u6703\u5728\u7a69\u5b9a\u6216\u662f\u4e0d\u7a69\u5b9a\u7684\u5efa\u7f6e\u4e0a\u8dd1\uff0c\u4e0d\u6703\u5728\u5931\u6557\u7684\u5efa\u7f6e\u4e0a\u57f7\u884c\u3002\ 25 | \u8981\u662f\u5c31\u7b97\u5efa\u7f6e\u5931\u6557\u4e5f\u8981\u57f7\u884c\uff0c\u8acb\u555f\u7528\u672c\u529f\u80fd\u3002 26 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/util/Compatibility.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | import java.lang.reflect.Method; 4 | 5 | import javax.annotation.Nonnull; 6 | 7 | /** 8 | * Compatibility utilities. 9 | */ 10 | public final class Compatibility { 11 | 12 | /** 13 | * Util.isOverridden does not work on non-public methods, that's why this one is used here. 14 | */ 15 | public static boolean isOverridden(@Nonnull Class base, @Nonnull Class derived, @Nonnull String methodName, @Nonnull Class... types) { 16 | try { 17 | return !getMethod(base, methodName, types).equals(getMethod(derived, methodName, types)); 18 | } catch (NoSuchMethodException e) { 19 | throw new AssertionError(e); 20 | } 21 | } 22 | 23 | private static Method getMethod(@Nonnull Class clazz, @Nonnull String methodName, @Nonnull Class... types) throws NoSuchMethodException { 24 | Method res = null; 25 | try { 26 | res = clazz.getDeclaredMethod(methodName, types); 27 | } catch (NoSuchMethodException e) { 28 | // Method not found in clazz, let's search in superclasses 29 | Class superclass = clazz.getSuperclass(); 30 | if (superclass != null) { 31 | res = getMethod(superclass, methodName, types); 32 | } 33 | } catch (SecurityException e) { 34 | throw new AssertionError(e); 35 | } 36 | if (res == null) { 37 | throw new NoSuchMethodException("Method " + methodName + " not found in " + clazz.getName()); 38 | } 39 | return res; 40 | } 41 | 42 | private Compatibility() {} 43 | } 44 | 45 | -------------------------------------------------------------------------------- /src/main/resources/hudson/plugins/analysis/views/TabDetail/categories.jelly: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 25 | 27 | 30 | 31 | 32 | 33 | 34 | 35 | 37 | 38 |
${%Category}${%Total}${%Distribution}
17 | 18 | 19 | 20 | 21 | 22 | ${name} 23 | 24 | ${container.numberOfAnnotations} 26 | 28 | 29 |
${%Total}${it.container.numberOfAnnotations} 36 |
39 |
-------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/graph/TotalsGraph.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.graph; 2 | 3 | import java.awt.Color; 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | 7 | import org.jfree.chart.JFreeChart; 8 | import org.jfree.chart.renderer.category.CategoryItemRenderer; 9 | import org.jfree.data.category.CategoryDataset; 10 | 11 | import hudson.plugins.analysis.Messages; 12 | import hudson.plugins.analysis.core.BuildResult; 13 | import hudson.plugins.analysis.util.ToolTipProvider; 14 | 15 | /** 16 | * Builds a graph showing the total of warnings in a scaled line graph. 17 | * 18 | * @author Ulli Hafner 19 | * @since 1.23 20 | */ 21 | public class TotalsGraph extends CategoryBuildResultGraph { 22 | @Override 23 | public String getId() { 24 | return "TOTALS"; 25 | } 26 | 27 | @Override 28 | public String getLabel() { 29 | return Messages.Trend_type_totals(); 30 | } 31 | 32 | @Override 33 | protected List computeSeries(final BuildResult current) { 34 | List series = new ArrayList(); 35 | series.add(current.getNumberOfWarnings()); 36 | return series; 37 | } 38 | 39 | @Override 40 | protected JFreeChart createChart(final CategoryDataset dataSet) { 41 | return createLineGraph(dataSet, false); 42 | } 43 | 44 | @Override 45 | protected Color[] getColors() { 46 | return new Color[] {ColorPalette.BLUE}; 47 | } 48 | 49 | @Override 50 | protected CategoryItemRenderer createRenderer(final GraphConfiguration configuration, final String pluginName, final ToolTipProvider toolTipProvider) { 51 | return createLineRenderer(); 52 | } 53 | } 54 | 55 | -------------------------------------------------------------------------------- /src/test/java/hudson/plugins/analysis/util/LoggerFactoryTest.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | import static org.junit.Assert.*; 4 | import static org.mockito.Mockito.*; 5 | 6 | import java.io.PrintStream; 7 | 8 | import org.junit.Test; 9 | 10 | import hudson.plugins.analysis.core.Settings; 11 | 12 | /** 13 | * TestCases for {@link PluginLogger}. 14 | * 15 | * @author Sebastian Seidl 16 | */ 17 | public class LoggerFactoryTest { 18 | 19 | /** 20 | * Tests if a "true" PluginLogger is created, when the Quiet Mode is deactivated. 21 | */ 22 | @Test 23 | public void quietModeDeactivated() { 24 | // Given 25 | Settings settings = mock(Settings.class); 26 | LoggerFactory loggerFactory = new LoggerFactory(settings); 27 | 28 | // When 29 | when(settings.getQuietMode()).thenReturn(false); 30 | PluginLogger logger = loggerFactory.createLogger(mock(PrintStream.class), ""); 31 | 32 | // Then 33 | assertFalse("LogMode is not Quiet but LoggerFactory creates a NullLogger!", logger instanceof NullLogger); 34 | } 35 | 36 | /** 37 | * Tests if a NullLogger is created, when the Quiet Mode is active. 38 | */ 39 | @Test 40 | public void quietModeActivated() { 41 | // Given 42 | Settings settings = mock(Settings.class); 43 | LoggerFactory lf = new LoggerFactory(settings); 44 | 45 | // When 46 | when(settings.getQuietMode()).thenReturn(true); 47 | PluginLogger logger = lf.createLogger(mock(PrintStream.class), ""); 48 | 49 | // Then 50 | assertTrue("LogMode is Quiet but LoggerFactory creates not a NullLogger!", logger instanceof NullLogger); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/graph/LocalDateLabel.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.graph; 2 | 3 | import org.joda.time.LocalDate; 4 | 5 | /** 6 | * Graph label showing the build date. 7 | * 8 | * @author Ulli Hafner 9 | */ 10 | public class LocalDateLabel implements Comparable { 11 | private final LocalDate date; 12 | 13 | /** 14 | * Creates a new instance of {@link LocalDateLabel}. 15 | * 16 | * @param date 17 | * the date of the build 18 | */ 19 | public LocalDateLabel(final LocalDate date) { 20 | this.date = date; 21 | } 22 | 23 | @Override 24 | public int compareTo(final LocalDateLabel o) { 25 | return date.compareTo(o.date); 26 | } 27 | 28 | @Override 29 | public String toString() { 30 | return date.toString("MM-dd"); 31 | } 32 | 33 | @Override 34 | public int hashCode() { 35 | int prime = 31; 36 | int result = 1; 37 | result = prime * result + ((date == null) ? 0 : date.hashCode()); 38 | return result; 39 | } 40 | 41 | @Override 42 | public boolean equals(final Object obj) { 43 | if (this == obj) { 44 | return true; 45 | } 46 | if (obj == null) { 47 | return false; 48 | } 49 | if (getClass() != obj.getClass()) { 50 | return false; 51 | } 52 | LocalDateLabel other = (LocalDateLabel)obj; 53 | if (date == null) { 54 | if (other.date != null) { 55 | return false; 56 | } 57 | } 58 | else if (!date.equals(other.date)) { 59 | return false; 60 | } 61 | return true; 62 | } 63 | } 64 | 65 | -------------------------------------------------------------------------------- /src/test/java/hudson/plugins/analysis/util/HtmlPrinterTest.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | import static org.junit.Assert.*; 4 | 5 | import org.junit.Test; 6 | 7 | /** 8 | * Tests the class {@link HtmlPrinter}. 9 | * 10 | * @author Ulli Hafner 11 | */ 12 | public class HtmlPrinterTest { 13 | private static final String DUMMY_LINK = "http://link.de"; 14 | private static final String DUMMY_TEXT = "Text"; 15 | 16 | /** 17 | * Test creation of li. 18 | */ 19 | @Test 20 | public void testItem() { 21 | HtmlPrinter printer = new HtmlPrinter(); 22 | 23 | assertEquals("Wrong list item output", "
  • Text
  • ", printer.item(DUMMY_TEXT)); 24 | } 25 | 26 | /** 27 | * Test creation of href. 28 | */ 29 | @Test 30 | public void testHRefItem() { 31 | HtmlPrinter printer = new HtmlPrinter(); 32 | 33 | assertEquals("Wrong list item output", "Text", printer.link(DUMMY_LINK, DUMMY_TEXT)); 34 | } 35 | 36 | /** 37 | * Test recursion. 38 | */ 39 | @Test 40 | public void testComplex() { 41 | HtmlPrinter printer = new HtmlPrinter(); 42 | 43 | assertEquals("Wrong list item output", "
  • Text
  • ", printer.item(printer.link(DUMMY_LINK, DUMMY_TEXT))); 44 | } 45 | 46 | /** 47 | * Tests that we can store the text in a buffer. 48 | */ 49 | @Test 50 | public void testBuffer() { 51 | HtmlPrinter printer = new HtmlPrinter(); 52 | printer.append(DUMMY_TEXT); 53 | printer.append(printer.item(printer.link(DUMMY_LINK, DUMMY_TEXT))); 54 | 55 | assertEquals("Wrong list item output", "Text
  • Text
  • ", printer.toString()); 56 | } 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/main/resources/util/advanced_zh_TW.properties: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | # 3 | # Copyright (c) 2013, Chunghwa Telecom Co., Ltd., Pei-Tang Huang 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | Detect\ modules=\u5075\u6e2c\u6a21\u7d44 24 | description.detectModules=\u6c7a\u5b9a\u662f\u5426\u8981\u5075\u6e2c Ant \u6216 Maven \u7684\u6a21\u7d44\uff0c\u53d6\u5f97\u6240\u6709\u5305\u542b\u8b66\u544a\u7684\u6a94\u6848\u3002\ 25 | \u958b\u555f\u9019\u500b\u9078\u9805\u5f8c\u53ef\u80fd\u6703\u589e\u52a0\u60a8\u7684\u5efa\u7f6e\u6642\u9593\uff0c\u56e0\u70ba\u5075\u6e2c\u7a0b\u5f0f\u6703\u6383\u63cf\u6574\u500b\u5de5\u4f5c\u5340\u88e1\u7684 ''build.xml'' \ 26 | \u6216 ''pom.xml'' \u6a94\uff0c\u4ee5\u4fbf\u6307\u5b9a\u6b63\u78ba\u7684\u6a21\u7d44\u540d\u7a31\u3002 27 | -------------------------------------------------------------------------------- /src/main/resources/util/health.jelly: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 18 | 21 | 25 | 28 | 29 | 30 |
    16 | 100% ${%threshold.100.percent} 17 | 19 | 20 | 22 | 23 | 0% ${%threshold.0.percent} 24 | 26 | 27 |
    31 |
    32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |
    40 | -------------------------------------------------------------------------------- /src/test/java/hudson/plugins/analysis/util/EncodingValidatorTest.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | import static org.junit.Assert.*; 4 | 5 | import java.nio.charset.Charset; 6 | 7 | import org.junit.Test; 8 | 9 | /** 10 | * Tests the class {@link EncodingValidator}. 11 | * 12 | * @author Ulli Hafner 13 | */ 14 | public class EncodingValidatorTest extends AbstractValidatorTest { 15 | /** 16 | * Test some valid encodings. 17 | */ 18 | @Test 19 | public void testValidEncodings() { 20 | assertThatInputIsValid(""); 21 | assertThatInputIsValid("UTF8"); 22 | assertThatInputIsValid("UTF-8"); 23 | assertThatInputIsValid("CP1252"); 24 | assertThatInputIsValid("ISO-8859-1"); 25 | assertThatInputIsValid("ISO-8859-5"); 26 | assertThatInputIsValid("ISO-8859-9"); 27 | } 28 | 29 | /** 30 | * Test some invalid encodings. 31 | */ 32 | @Test 33 | public void testInvalidEncodings() { 34 | assertThatInputIsInvalid("NIX"); 35 | assertThatInputIsInvalid("UTF-9"); 36 | assertThatInputIsInvalid("ISO-8859-42"); 37 | } 38 | 39 | /** 40 | * Verifies that the platform encoding is used if encoding is invalid. 41 | */ 42 | @Test 43 | public void testDefaultEncoding() { 44 | assertEquals("Wrong encoding used", "UTF-8", EncodingValidator.getEncoding("UTF-8")); 45 | String osCharset = Charset.defaultCharset().name(); 46 | assertEquals("Wrong encoding used", osCharset, EncodingValidator.getEncoding("")); 47 | assertEquals("Wrong encoding used", osCharset, EncodingValidator.getEncoding(null)); 48 | } 49 | 50 | @Override 51 | protected Validator createValidator() { 52 | return new EncodingValidator(); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/test/resources/hudson/plugins/analysis/util/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-SymbolicName: de.faktorlogik.prototyp; singleton:=true 4 | Bundle-Version: 1.0.0.qualifier 5 | Bundle-Activator: de.faktorlogik.prototyp.internal.Activator 6 | Bundle-Vendor: %Bundle-Vendor 7 | Require-Bundle: org.eclipse.ui;bundle-version="3.6.0", 8 | org.eclipse.core.runtime;bundle-version="3.6.0", 9 | org.eclipse.core.databinding;bundle-version="1.3.100", 10 | org.eclipse.core.databinding.beans;bundle-version="1.2.100", 11 | org.eclipse.core.databinding.observable;bundle-version="1.3.0", 12 | org.eclipse.core.databinding.property;bundle-version="1.3.0", 13 | org.eclipse.jface.databinding;bundle-version="1.4.0", 14 | org.eclipse.zest.core;bundle-version="1.1.0", 15 | org.eclipse.zest.layouts;bundle-version="1.1.0", 16 | com.ibm.icu;bundle-version="4.2.1", 17 | com.google.guava;bundle-version="1.0.0", 18 | findbugs.annotations;bundle-version="1.3.9", 19 | findbugs.jsr305;bundle-version="1.3.9", 20 | net.ffxml.swtforms;bundle-version="0.9.1", 21 | commons-io;bundle-version="1.4.0", 22 | commons-lang;bundle-version="2.4.0", 23 | owlapiv3;bundle-version="2.2.2", 24 | aterm;bundle-version="2.2.2", 25 | xsdlib;bundle-version="2.2.2", 26 | relaxngDatatype;bundle-version="2.2.2", 27 | jgrapht;bundle-version="2.2.2", 28 | pellet-core;bundle-version="2.2.2", 29 | pellet-datatypes;bundle-version="2.2.2", 30 | pellet-el;bundle-version="2.2.2", 31 | pellet-modularity;bundle-version="2.2.2", 32 | pellet-owlapiv3;bundle-version="2.2.2", 33 | pellet-query;bundle-version="2.2.2", 34 | pellet-rules;bundle-version="2.2.2", 35 | de.faktorlogik.util;bundle-version="1.0.0", 36 | de.faktorlogik.eclipse.ui;bundle-version="1.0.0", 37 | de.faktorlogik.core;bundle-version="1.0.0" 38 | Bundle-RequiredExecutionEnvironment: JavaSE-1.6 39 | Bundle-ActivationPolicy: lazy 40 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/util/JavaPackageDetector.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | import java.io.InputStream; 4 | import java.io.InputStreamReader; 5 | import java.nio.charset.Charset; 6 | import java.util.regex.Matcher; 7 | import java.util.regex.Pattern; 8 | 9 | import org.apache.commons.io.Charsets; 10 | import org.apache.commons.io.IOUtils; 11 | import org.apache.commons.io.LineIterator; 12 | 13 | /** 14 | * Detects the package name of a Java file. 15 | * 16 | * @author Ulli Hafner 17 | */ 18 | public class JavaPackageDetector extends AbstractPackageDetector { 19 | /** Package pattern. */ 20 | private final Pattern pattern; 21 | 22 | /** 23 | * Creates a new instance of {@link JavaPackageDetector}. 24 | */ 25 | public JavaPackageDetector() { 26 | super(); 27 | 28 | pattern = Pattern.compile("^\\s*package\\s*([a-z]+(\\.[a-zA-Z_][a-zA-Z0-9_]*)*)\\s*;.*"); 29 | } 30 | 31 | /** {@inheritDoc}*/ 32 | @Override 33 | public String detectPackageName(final InputStream stream) { 34 | try { 35 | LineIterator iterator = new LineIterator(new InputStreamReader(stream, 36 | Charsets.toCharset(Charset.defaultCharset()))); 37 | 38 | while (iterator.hasNext()) { 39 | String line = iterator.nextLine(); 40 | Matcher matcher = pattern.matcher(line); 41 | if (matcher.matches()) { 42 | return matcher.group(1); 43 | } 44 | } 45 | } 46 | finally { 47 | IOUtils.closeQuietly(stream); 48 | } 49 | return UNKNOWN_PACKAGE; 50 | } 51 | 52 | @Override 53 | public boolean accepts(final String fileName) { 54 | return fileName.endsWith(".java"); 55 | } 56 | } 57 | 58 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/core/ResultAction.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.core; 2 | 3 | import hudson.model.Run; 4 | import hudson.model.Action; 5 | import hudson.model.Result; 6 | 7 | import hudson.plugins.analysis.util.ToolTipProvider; 8 | 9 | /** 10 | * Defines an action that is responsible for handling results of the given type 11 | * T. 12 | * 13 | * @param 14 | * type of the result 15 | * @author Ulli Hafner 16 | */ 17 | public interface ResultAction extends Action { 18 | /** 19 | * Returns the current result of this action. 20 | * 21 | * @return the current result 22 | */ 23 | T getResult(); 24 | 25 | /** 26 | * Sets the result for this build. 27 | * 28 | * @param result the result to set 29 | */ 30 | void setResult(final T result); 31 | 32 | /** 33 | * Returns the associated build of this action. 34 | * 35 | * @return the associated build of this action 36 | */ 37 | Run getBuild(); 38 | 39 | /** 40 | * Returns the associated tool tip provider. 41 | * 42 | * @return the tool tip provider 43 | */ 44 | ToolTipProvider getToolTipProvider(); 45 | 46 | /** 47 | * Gets the associated health descriptor. 48 | * 49 | * @return the health descriptor 50 | */ 51 | AbstractHealthDescriptor getHealthDescriptor(); 52 | 53 | /** 54 | * Returns whether this build is successful with respect to the 55 | * {@link HealthDescriptor} of this action. 56 | * 57 | * @return true if the build is successful, false 58 | * if the build has been set to {@link Result#UNSTABLE} or 59 | * {@link Result#FAILURE} by this action. 60 | */ 61 | boolean isSuccessful(); 62 | } 63 | -------------------------------------------------------------------------------- /src/test/resources/hudson/plugins/analysis/util/MANIFEST-NAME.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: %Bundle-Name 4 | Bundle-SymbolicName: de.faktorlogik.prototyp; singleton:=true 5 | Bundle-Version: 1.0.0.qualifier 6 | Bundle-Activator: de.faktorlogik.prototyp.internal.Activator 7 | Bundle-Vendor: %Bundle-Vendor 8 | Require-Bundle: org.eclipse.ui;bundle-version="3.6.0", 9 | org.eclipse.core.runtime;bundle-version="3.6.0", 10 | org.eclipse.core.databinding;bundle-version="1.3.100", 11 | org.eclipse.core.databinding.beans;bundle-version="1.2.100", 12 | org.eclipse.core.databinding.observable;bundle-version="1.3.0", 13 | org.eclipse.core.databinding.property;bundle-version="1.3.0", 14 | org.eclipse.jface.databinding;bundle-version="1.4.0", 15 | org.eclipse.zest.core;bundle-version="1.1.0", 16 | org.eclipse.zest.layouts;bundle-version="1.1.0", 17 | com.ibm.icu;bundle-version="4.2.1", 18 | com.google.guava;bundle-version="1.0.0", 19 | findbugs.annotations;bundle-version="1.3.9", 20 | findbugs.jsr305;bundle-version="1.3.9", 21 | net.ffxml.swtforms;bundle-version="0.9.1", 22 | commons-io;bundle-version="1.4.0", 23 | commons-lang;bundle-version="2.4.0", 24 | owlapiv3;bundle-version="2.2.2", 25 | aterm;bundle-version="2.2.2", 26 | xsdlib;bundle-version="2.2.2", 27 | relaxngDatatype;bundle-version="2.2.2", 28 | jgrapht;bundle-version="2.2.2", 29 | pellet-core;bundle-version="2.2.2", 30 | pellet-datatypes;bundle-version="2.2.2", 31 | pellet-el;bundle-version="2.2.2", 32 | pellet-modularity;bundle-version="2.2.2", 33 | pellet-owlapiv3;bundle-version="2.2.2", 34 | pellet-query;bundle-version="2.2.2", 35 | pellet-rules;bundle-version="2.2.2", 36 | de.faktorlogik.util;bundle-version="1.0.0", 37 | de.faktorlogik.eclipse.ui;bundle-version="1.0.0", 38 | de.faktorlogik.core;bundle-version="1.0.0" 39 | Bundle-RequiredExecutionEnvironment: JavaSE-1.6 40 | Bundle-ActivationPolicy: lazy 41 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/util/HtmlPrinter.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | /** 4 | * Simple wrapper of a {@link StringBuffer} that is capable of writing HTML sequences used in Jelly scripts. 5 | * 6 | * @author Ulli Hafner 7 | */ 8 | public class HtmlPrinter { 9 | private final StringBuilder buffer = new StringBuilder(); 10 | 11 | /** 12 | * Adds a list item. 13 | * 14 | * @param text 15 | * the item text 16 | * @return HTML item 17 | */ 18 | public String item(final String text) { 19 | return String.format("
  • %s
  • ", text); 20 | } 21 | 22 | /** 23 | * Adds a table line. A line is a row with one column. 24 | * 25 | * @param text 26 | * the line text 27 | * @return table line 28 | */ 29 | public String line(final String text) { 30 | return String.format("%s", text); 31 | } 32 | 33 | @Override 34 | public String toString() { 35 | return buffer.toString(); 36 | } 37 | 38 | /** 39 | * Adds a hyperlink. 40 | * 41 | * @param url 42 | * the link URL 43 | * @param text 44 | * the text describing the link 45 | * @return HTML link 46 | */ 47 | public String link(final String url, final String text) { 48 | return String.format("%s", url, text); 49 | } 50 | 51 | /** 52 | * Appends the specified text to the buffer. 53 | * 54 | * @param text 55 | * the text 56 | */ 57 | public void append(final String text) { 58 | buffer.append(text); 59 | } 60 | 61 | /** 62 | * Appends the textual representation of the specified object to the buffer. 63 | * 64 | * @param object 65 | * the object 66 | */ 67 | public void append(final Object object) { 68 | buffer.append(object); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/core/AnnotationsClassifier.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.core; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | 6 | import jenkins.MasterToSlaveFileCallable; 7 | 8 | import hudson.plugins.analysis.util.ContextHashCode; 9 | import hudson.plugins.analysis.util.model.FileAnnotation; 10 | 11 | import hudson.remoting.VirtualChannel; 12 | 13 | /** 14 | * Reads the content of each file with warnings and creates a unique hash code 15 | * of the warning to enable a more flexible new and fixed warnings detection. 16 | * 17 | * @author Ulli Hafner 18 | */ 19 | public class AnnotationsClassifier extends MasterToSlaveFileCallable { 20 | /** Generated ID. */ 21 | private static final long serialVersionUID = 5152042155205600031L; 22 | /** All annotations. */ 23 | private final ParserResult result; 24 | /** The default encoding to be used when reading and parsing files. */ 25 | private final String defaultEncoding; 26 | 27 | /** 28 | * Creates a new instance of {@link AnnotationsClassifier}. 29 | * 30 | * @param result 31 | * the annotations to assign a module for 32 | * @param defaultEncoding 33 | * the default encoding to be used when reading and parsing files 34 | */ 35 | public AnnotationsClassifier(final ParserResult result, final String defaultEncoding) { 36 | this.result = result; 37 | this.defaultEncoding = defaultEncoding; 38 | } 39 | 40 | @Override 41 | public ParserResult invoke(final File workspace, final VirtualChannel channel) throws IOException { 42 | ContextHashCode contextHashCode = new ContextHashCode(); 43 | for (FileAnnotation annotation : result.getAnnotations()) { 44 | annotation.setContextHashCode(contextHashCode.compute( 45 | annotation.getFileName(), annotation.getPrimaryLineNumber(), defaultEncoding)); 46 | } 47 | return result; 48 | } 49 | } -------------------------------------------------------------------------------- /src/main/java/hudson/plugins/analysis/util/TrendReportHeightValidator.java: -------------------------------------------------------------------------------- 1 | package hudson.plugins.analysis.util; 2 | 3 | import org.apache.commons.lang.StringUtils; 4 | 5 | import hudson.plugins.analysis.Messages; 6 | 7 | import hudson.util.FormValidation; 8 | 9 | /** 10 | * Controls the size of a trend report. 11 | * 12 | * @author Ulli Hafner 13 | */ 14 | public class TrendReportHeightValidator implements Validator { 15 | /** Default height of the graph. */ 16 | private static final int HEIGHT = 200; 17 | /** Minimum height of the graph. */ 18 | private static final int MINIMUM_HEIGHT = 50; 19 | 20 | /** 21 | * Returns a normalized height for the trend graph (always greater than 50). 22 | * 23 | * @param height 24 | * the input height value to normalize 25 | * @return a normalized height for the trend graph. 26 | */ 27 | public static int defaultHeight(final String height) { 28 | int actualHeight = HEIGHT; 29 | if (!StringUtils.isEmpty(height)) { 30 | try { 31 | actualHeight = Math.max(MINIMUM_HEIGHT, Integer.valueOf(height)); 32 | } 33 | catch (NumberFormatException exception) { 34 | // nothing to do, we use the default value 35 | } 36 | } 37 | return actualHeight; 38 | } 39 | 40 | @Override 41 | public FormValidation check(final String value) throws FormValidation { 42 | if (!StringUtils.isEmpty(value)) { 43 | try { 44 | int integer = Integer.parseInt(value); 45 | if (integer < MINIMUM_HEIGHT) { 46 | throw FormValidation.error(Messages.FieldValidator_Error_TrendHeight(MINIMUM_HEIGHT)); 47 | } 48 | } 49 | catch (NumberFormatException exception) { 50 | throw FormValidation.error(Messages.FieldValidator_Error_TrendHeight(MINIMUM_HEIGHT)); // NOPMD 51 | } 52 | } 53 | 54 | return FormValidation.ok(); 55 | } 56 | } 57 | 58 | --------------------------------------------------------------------------------