Skip to content

Commit

Permalink
Merge branch 'pmd:master' into feature/swift-5.9-support
Browse files Browse the repository at this point in the history
  • Loading branch information
kenji21 committed Nov 28, 2023
2 parents 4aacc54 + f030d7f commit a671bbe
Show file tree
Hide file tree
Showing 7 changed files with 148 additions and 133 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Expand Up @@ -7296,6 +7296,15 @@
"contributions": [
"doc"
]
},
{
"login": "219sansim",
"name": "219sansim",
"avatar_url": "https://avatars.githubusercontent.com/u/108684604?v=4",
"profile": "https://github.com/219sansim",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
Expand Down
15 changes: 6 additions & 9 deletions .ci/build.sh
Expand Up @@ -36,7 +36,7 @@ function build() {

if pmd_ci_utils_is_fork_or_pull_request; then
pmd_ci_log_group_start "Build with mvnw"
./mvnw clean install --show-version --errors --batch-mode "${PMD_MAVEN_EXTRA_OPTS[@]}"
./mvnw clean install -Pcli-dist --show-version --errors --batch-mode "${PMD_MAVEN_EXTRA_OPTS[@]}"
pmd_ci_log_group_end

# Execute danger and dogfood only for pull requests in our own repository
Expand Down Expand Up @@ -70,7 +70,7 @@ function build() {

if [ "$(pmd_ci_utils_get_os)" != "linux" ]; then
pmd_ci_log_group_start "Build with mvnw"
./mvnw clean verify --show-version --errors --batch-mode "${PMD_MAVEN_EXTRA_OPTS[@]}"
./mvnw clean verify -Pcli-dist --show-version --errors --batch-mode "${PMD_MAVEN_EXTRA_OPTS[@]}"
pmd_ci_log_group_end

pmd_ci_log_info "Stopping build here, because os is not linux"
Expand All @@ -87,7 +87,7 @@ function build() {

if [ "${PMD_CI_BRANCH}" = "experimental-apex-parser" ]; then
pmd_ci_log_group_start "Build with mvnw"
./mvnw clean install --show-version --errors --batch-mode "${PMD_MAVEN_EXTRA_OPTS[@]}"
./mvnw clean install -Pcli-dist --show-version --errors --batch-mode "${PMD_MAVEN_EXTRA_OPTS[@]}"
pmd_ci_log_group_end

pmd_ci_log_group_start "Creating new baseline for regression tester"
Expand Down Expand Up @@ -321,19 +321,16 @@ ${rendered_release_notes}"
#
function pmd_ci_dogfood() {
local mpmdVersion=()
./mvnw versions:set -DnewVersion="${PMD_CI_MAVEN_PROJECT_VERSION}-dogfood" -DgenerateBackupPoms=false
./mvnw versions:set -DnewVersion="${PMD_CI_MAVEN_PROJECT_VERSION}-dogfood" -DgenerateBackupPoms=false -Pcli-dist
sed -i 's/<version>[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}.*<\/version>\( *<!-- pmd.dogfood.version -->\)/<version>'"${PMD_CI_MAVEN_PROJECT_VERSION}"'<\/version>\1/' pom.xml
if [ "${PMD_CI_MAVEN_PROJECT_VERSION}" = "7.0.0-SNAPSHOT" ]; then
sed -i 's/pmd-dogfood-config\.xml/pmd-dogfood-config7.xml/' pom.xml
mpmdVersion=(-Denforcer.skip=true -Dpmd.plugin.version=3.21.1-pmd-7.0.0-SNAPSHOT)
fi
./mvnw verify --show-version --errors --batch-mode "${PMD_MAVEN_EXTRA_OPTS[@]}" \
-Pcli-dist \
"${mpmdVersion[@]}" \
-DskipTests \
-Dmaven.javadoc.skip=true \
-Dmaven.source.skip=true \
-Dcheckstyle.skip=true
./mvnw versions:set -DnewVersion="${PMD_CI_MAVEN_PROJECT_VERSION}" -DgenerateBackupPoms=false
./mvnw versions:set -DnewVersion="${PMD_CI_MAVEN_PROJECT_VERSION}" -DgenerateBackupPoms=false -Pcli-dist
git checkout -- pom.xml
}

Expand Down
227 changes: 114 additions & 113 deletions docs/pages/pmd/projectdocs/credits.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions docs/pages/release_notes.md
Expand Up @@ -89,6 +89,7 @@ in the Migration Guide.
* [#4723](https://github.com/pmd/pmd/issues/4723): \[cli] Launch fails for "bash pmd"
* core
* [#1027](https://github.com/pmd/pmd/issues/1027): \[core] Apply the new PropertyDescriptor&lt;Pattern&gt; type where applicable
* [#4750](https://github.com/pmd/pmd/pull/4750): \[core] Fix flaky SummaryHTMLRenderer
* doc
* [#3175](https://github.com/pmd/pmd/issues/3175): \[doc] Document language module features
* [#4659](https://github.com/pmd/pmd/pull/4659): \[doc] Improve ant documentation
Expand Down Expand Up @@ -132,6 +133,7 @@ The following previously deprecated classes have been removed:
* [#4677](https://github.com/pmd/pmd/pull/4677): \[apex] Add new rule: OperationWithHighCostInLoop - [Thomas Prouvot](https://github.com/tprouvot) (@tprouvot)
* [#4719](https://github.com/pmd/pmd/pull/4719): \[java] UnnecessaryCaseChange: example doc toUpperCase() should compare to a capitalized string - [ciufudean](https://github.com/ciufudean) (@ciufudean)
* [#4738](https://github.com/pmd/pmd/pull/4738): \[doc] Added reference to the PMD extension for bld - [Erik C. Thauvin](https://github.com/ethauvin) (@ethauvin)
* [#4750](https://github.com/pmd/pmd/pull/4750): \[core] Fix flaky SummaryHTMLRenderer - [219sansim](https://github.com/219sansim) (@219sansim)

### 🚀 Major Features and Enhancements

Expand Down Expand Up @@ -524,6 +526,7 @@ See also [Detailed Release Notes for PMD 7]({{ baseurl }}pmd_release_notes_pmd7.
* [#4454](https://github.com/pmd/pmd/issues/4454): \[core] "Unknown option: '-min'" but is referenced in documentation
* [#4611](https://github.com/pmd/pmd/pull/4611): \[core] Fix loading language properties from env vars
* [#4621](https://github.com/pmd/pmd/issues/4621): \[core] Make `ClasspathClassLoader::getResource` child first
* [#4750](https://github.com/pmd/pmd/pull/4750): \[core] Fix flaky SummaryHTMLRenderer
* cli
* [#2234](https://github.com/pmd/pmd/issues/2234): \[core] Consolidate PMD CLI into a single command
* [#3828](https://github.com/pmd/pmd/issues/3828): \[core] Progress reporting
Expand Down Expand Up @@ -788,6 +791,7 @@ Language specific fixes:
* [#4677](https://github.com/pmd/pmd/pull/4677): \[apex] Add new rule: OperationWithHighCostInLoop - [Thomas Prouvot](https://github.com/tprouvot) (@tprouvot)
* [#4719](https://github.com/pmd/pmd/pull/4719): \[java] UnnecessaryCaseChange: example doc toUpperCase() should compare to a capitalized string - [ciufudean](https://github.com/ciufudean) (@ciufudean)
* [#4738](https://github.com/pmd/pmd/pull/4738): \[doc] Added reference to the PMD extension for bld - [Erik C. Thauvin](https://github.com/ethauvin) (@ethauvin)
* [#4750](https://github.com/pmd/pmd/pull/4750): \[core] Fix flaky SummaryHTMLRenderer - [219sansim](https://github.com/219sansim) (@219sansim)

### 📈 Stats
* 5007 commits
Expand Down
Expand Up @@ -5,7 +5,7 @@
package net.sourceforge.pmd.renderers;

import java.io.IOException;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Map.Entry;

Expand Down Expand Up @@ -74,7 +74,7 @@ private void renderSummary(Report report) throws IOException {
}

private static Map<String, MutableInt> getSummary(Report report) {
Map<String, MutableInt> summary = new HashMap<>();
Map<String, MutableInt> summary = new LinkedHashMap<>();
for (RuleViolation rv : report.getViolations()) {
String name = rv.getRule().getName();
MutableInt count = summary.get(name);
Expand Down
Expand Up @@ -69,8 +69,8 @@ String getExpectedMultiple() {
return "<html><head><title>PMD</title></head><body>" + EOL + "<center><h2>Summary</h2></center>" + EOL
+ "<table align=\"center\" cellspacing=\"0\" cellpadding=\"3\">" + EOL
+ "<tr><th>Rule name</th><th>Number of violations</th></tr>" + EOL
+ "<tr><td>Boo</td><td align=center>1</td></tr>" + EOL
+ "<tr><td>Foo</td><td align=center>1</td></tr>" + EOL + "</table>" + EOL
+ "<tr><td>Foo</td><td align=center>1</td></tr>" + EOL
+ "<tr><td>Boo</td><td align=center>1</td></tr>" + EOL + "</table>" + EOL
+ "<center><h2>Detail</h2></center><table align=\"center\" cellspacing=\"0\" cellpadding=\"3\"><tr>"
+ EOL
+ "<center><h3>PMD report</h3></center><center><h3>Problems found</h3></center><table align=\"center\" cellspacing=\"0\" cellpadding=\"3\"><tr>"
Expand Down
18 changes: 11 additions & 7 deletions pom.xml
Expand Up @@ -99,7 +99,7 @@
<surefire.version>3.0.0-M8</surefire.version>
<checkstyle.version>10.7.0</checkstyle.version>
<checkstyle.plugin.version>3.2.1</checkstyle.plugin.version>
<pmd.plugin.version>3.20.0</pmd.plugin.version>
<pmd.plugin.version>3.21.2</pmd.plugin.version>
<ant.version>1.10.13</ant.version>
<javadoc.plugin.version>3.4.1</javadoc.plugin.version>
<antlr.version>4.9.1</antlr.version>
Expand All @@ -113,7 +113,7 @@
<argLine>-Xmx512m -Dfile.encoding=${project.build.sourceEncoding} ${extraArgLine}</argLine>
<extraArgLine /> <!-- empty by default, profiles set it as needed -->

<pmd.build-tools.version>22</pmd.build-tools.version>
<pmd.build-tools.version>23-SNAPSHOT</pmd.build-tools.version>

<pmd-designer.version>7.0.0-rc4</pmd-designer.version>
<javacc.jar>${settings.localRepository}/net/java/dev/javacc/javacc/${javacc.version}/javacc-${javacc.version}.jar</javacc.jar>
Expand Down Expand Up @@ -441,7 +441,6 @@
<targetJdk>1.${java.version}</targetJdk>
<rulesets>
<ruleset>/net/sourceforge/pmd/pmd-dogfood-config.xml</ruleset>
<ruleset>/net/sourceforge/pmd/pmd7-dogfood-config.xml</ruleset>
</rulesets>
<excludeRoots>
<excludeRoot>target/generated-sources/javacc</excludeRoot>
Expand All @@ -455,25 +454,30 @@
<dependencies>
<!-- Note: we can't use a property for the version here due to https://issues.apache.org/jira/browse/MRELEASE-932 -->
<!-- We use the comment "pmd.dogfood.version" as a marker and manually change the version - see .ci/build.sh -->
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-compat6</artifactId>
<version>7.0.0-rc4</version> <!-- pmd.dogfood.version -->
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-core</artifactId>
<version>6.55.0</version> <!-- pmd.dogfood.version -->
<version>7.0.0-rc4</version> <!-- pmd.dogfood.version -->
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-java</artifactId>
<version>6.55.0</version> <!-- pmd.dogfood.version -->
<version>7.0.0-rc4</version> <!-- pmd.dogfood.version -->
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-jsp</artifactId>
<version>6.55.0</version> <!-- pmd.dogfood.version -->
<version>7.0.0-rc4</version> <!-- pmd.dogfood.version -->
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-javascript</artifactId>
<version>6.55.0</version> <!-- pmd.dogfood.version -->
<version>7.0.0-rc4</version> <!-- pmd.dogfood.version -->
</dependency>
<!-- This contains the dogfood ruleset -->
<dependency>
Expand Down

0 comments on commit a671bbe

Please sign in to comment.