From 8289e101a3669a069458381feaafc5e5a4d487de Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Thu, 1 May 2025 15:37:12 -0600 Subject: [PATCH 1/2] Enable spotless check https://github.com/jenkinsci/plot-plugin/pull/175 intentionally disabled spotless checking so that the parent pom update could be merged. Enable spotless checking again. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9c35e61..bfdfbe5 100644 --- a/pom.xml +++ b/pom.xml @@ -29,7 +29,7 @@ 2.479 ${jenkins.baseline}.3 - true + false From 95b7a51c47515c663c0d5cab71cb621f806d0f51 Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Thu, 1 May 2025 16:12:14 -0600 Subject: [PATCH 2/2] Skip spotless formatting in two problem areas --- pom.xml | 2 +- src/main/java/hudson/plugins/plot/CSVSeries.java | 2 ++ src/main/java/hudson/plugins/plot/Plot.java | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bfdfbe5..b960dde 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.jenkins-ci.plugins plugin - 5.12 + 5.13 diff --git a/src/main/java/hudson/plugins/plot/CSVSeries.java b/src/main/java/hudson/plugins/plot/CSVSeries.java index b9b7515..a4b89da 100644 --- a/src/main/java/hudson/plugins/plot/CSVSeries.java +++ b/src/main/java/hudson/plugins/plot/CSVSeries.java @@ -279,6 +279,7 @@ private boolean excludePoint(final String label, int index) { } boolean retVal = + // spotless:off switch (inclusionFlag) { case INCLUDE_BY_STRING -> !checkExclusionSet(label); // if the set contains it, don't exclude it. case EXCLUDE_BY_STRING -> checkExclusionSet(label); // if the set doesn't contain it, exclude it. @@ -288,6 +289,7 @@ private boolean excludePoint(final String label, int index) { colExclusionSet.contains(index); // if the set doesn't contain it, don't exclude it. default -> false; }; + // spotless:on if (LOGGER.isLoggable(Level.FINEST)) { LOGGER.finest(((retVal) ? "excluded" : "included") + " CSV Column: " + index + " : " + label); diff --git a/src/main/java/hudson/plugins/plot/Plot.java b/src/main/java/hudson/plugins/plot/Plot.java index 8c7acea..d283686 100644 --- a/src/main/java/hudson/plugins/plot/Plot.java +++ b/src/main/java/hudson/plugins/plot/Plot.java @@ -895,6 +895,7 @@ private void generatePlot(boolean forceGenerate) { * Creates a Chart of the style indicated by getUrlStyle() using the given * dataset. Defaults to using createLineChart. */ + // spotless:off private JFreeChart createChart(PlotCategoryDataset dataset) { return switch (ChartStyle.forName(getUrlStyle())) { case AREA -> @@ -929,6 +930,7 @@ private JFreeChart createChart(PlotCategoryDataset dataset) { getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false); }; } + // spotless:on /** * Returns a trimmed description string for the build specified by the given