Compare commits
284
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc1c9d0aed | ||
|
|
12143c6490 | ||
|
|
afdf876f36 | ||
|
|
ff0e3cceb9 | ||
|
|
504f31d1c5 | ||
|
|
17252cb423 | ||
|
|
5953bb2968 | ||
|
|
bbac216b3e | ||
|
|
96a44cec59 | ||
|
|
0c113dfe52 | ||
|
|
fdc6336bf2 | ||
|
|
d11f1a087a | ||
|
|
d08d1d10e6 | ||
|
|
35790704b4 | ||
|
|
813a0b194a | ||
|
|
efbf023648 | ||
|
|
b35f22d4e0 | ||
|
|
a5478c7358 | ||
|
|
90675d9df0 | ||
|
|
595ab39015 | ||
|
|
f77608899f | ||
|
|
e2307792b4 | ||
|
|
2eb2ce863f | ||
|
|
9f4c22d08c | ||
|
|
4020c8beb7 | ||
|
|
b1086e982c | ||
|
|
9d66782457 | ||
|
|
56fed34113 | ||
|
|
342dc1d03a | ||
|
|
833e255526 | ||
|
|
b45ab7698c | ||
|
|
f1284b91d0 | ||
|
|
7dc879c287 | ||
|
|
bef0d2b848 | ||
|
|
ea41b1d556 | ||
|
|
b614ee70cd | ||
|
|
a989b68c22 | ||
|
|
3040c3461e | ||
|
|
1414c83eec | ||
|
|
64dfebf618 | ||
|
|
d8ddb09b35 | ||
|
|
d884181d04 | ||
|
|
d815c5d173 | ||
|
|
24587163c9 | ||
|
|
1905ea6d4a | ||
|
|
3ec49a2b04 | ||
|
|
4bfd72e658 | ||
|
|
f07feaf3a1 | ||
|
|
3fb40436fe | ||
|
|
3593b4d8b3 | ||
|
|
0c16a321dc | ||
|
|
9a6517561e | ||
|
|
18d1612b6b | ||
|
|
ca89cba25f | ||
|
|
ac1792959a | ||
|
|
a0e8107249 | ||
|
|
86e7cb38cf | ||
|
|
954bcffb94 | ||
|
|
b942c50631 | ||
|
|
5650b720b3 | ||
|
|
a2d1976db9 | ||
|
|
be23b6f8aa | ||
|
|
ad6329faa6 | ||
|
|
e0de01ebe9 | ||
|
|
0848e230d0 | ||
|
|
6ee8398dd7 | ||
|
|
bae42f954a | ||
|
|
84ea5e04b4 | ||
|
|
b03ec450c2 | ||
|
|
7384a69d31 | ||
|
|
46e368a3e0 | ||
|
|
b576626e40 | ||
|
|
93a08052af | ||
|
|
1b5b7b8c87 | ||
|
|
519fa61e9b | ||
|
|
c5cc51db98 | ||
|
|
3bf497cca8 | ||
|
|
350d00cf6d | ||
|
|
27f007cb1f | ||
|
|
1f73ebc607 | ||
|
|
41076fac1c | ||
|
|
7d54b863d1 | ||
|
|
72b07cfa69 | ||
|
|
5cad3c270d | ||
|
|
ad1a210940 | ||
|
|
475f750216 | ||
|
|
861a646d83 | ||
|
|
387dee88f1 | ||
|
|
760e868931 | ||
|
|
ddd8510197 | ||
|
|
29c56727a6 | ||
|
|
7146e588d2 | ||
|
|
ba3dbd3d80 | ||
|
|
c4fe303393 | ||
|
|
017e40ba67 | ||
|
|
fd973e7db5 | ||
|
|
bb564aeb72 | ||
|
|
2cc701fbe7 | ||
|
|
4ee165c8fe | ||
|
|
ab778259b8 | ||
|
|
a482aa3ae4 | ||
|
|
7187e1d451 | ||
|
|
1d6195cc55 | ||
|
|
1a30468d35 | ||
|
|
e7c808e1b4 | ||
|
|
a6f68a8beb | ||
|
|
a0b0be35bb | ||
|
|
403c5956b8 | ||
|
|
2ec77ad02f | ||
|
|
3b151e31c4 | ||
|
|
8bc26f95aa | ||
|
|
19eea5ae31 | ||
|
|
3195757425 | ||
|
|
79c1bd74e2 | ||
|
|
d0721de473 | ||
|
|
da68997926 | ||
|
|
d617c964e7 | ||
|
|
03731f8c16 | ||
|
|
64b501e0f4 | ||
|
|
8c755fabe2 | ||
|
|
ac1b5ed159 | ||
|
|
87cdd60e39 | ||
|
|
42fda5891a | ||
|
|
20833c0e78 | ||
|
|
34eb080884 | ||
|
|
64d5ccad78 | ||
|
|
2b6dcb3f22 | ||
|
|
848ec2e7bb | ||
|
|
c2e4556360 | ||
|
|
843336a79a | ||
|
|
2ea0328678 | ||
|
|
7d6e6239c5 | ||
|
|
52062c739e | ||
|
|
6ec2fa6fb3 | ||
|
|
77cf105ecf | ||
|
|
52818edb50 | ||
|
|
d88d8ff913 | ||
|
|
df80080aaa | ||
|
|
aa9dd8fa16 | ||
|
|
33a8aa384e | ||
|
|
a4916f94fc | ||
|
|
c14398d19f | ||
|
|
aa8524ca4a | ||
|
|
7cb3b68884 | ||
|
|
f8c091b742 | ||
|
|
635cdd75d3 | ||
|
|
1a030801f3 | ||
|
|
b0f30e99f6 | ||
|
|
b6a8e8fe63 | ||
|
|
c69f7e96e6 | ||
|
|
360283fdb6 | ||
|
|
e69af856de | ||
|
|
0b2a727aae | ||
|
|
a7e02f403d | ||
|
|
41151d30e7 | ||
|
|
2032d8ce5b | ||
|
|
8e42f6c9ba | ||
|
|
1050bce2f5 | ||
|
|
a90b2ea524 | ||
|
|
a34ae3eea1 | ||
|
|
40bec489ed | ||
|
|
221c9e785e | ||
|
|
2e3d94adb8 | ||
|
|
dc4cdf696e | ||
|
|
b629e26041 | ||
|
|
248d4d78e7 | ||
|
|
175d535e9f | ||
|
|
a9a9094ba6 | ||
|
|
c42f0496ca | ||
|
|
f7909ae78a | ||
|
|
7f1f374dc5 | ||
|
|
76566b75bb | ||
|
|
4be2562f01 | ||
|
|
944058ff29 | ||
|
|
3e9fd7b80a | ||
|
|
15dd8783c7 | ||
|
|
98acf1de63 | ||
|
|
69bd89884f | ||
|
|
f16269a750 | ||
|
|
68eb4294d4 | ||
|
|
2aae644dd5 | ||
|
|
a5ac240fd0 | ||
|
|
fbb73373ea | ||
|
|
2e2b763b5a | ||
|
|
52a6ab2e08 | ||
|
|
e008f2ba71 | ||
|
|
51b1c1b429 | ||
|
|
7f1b6f582f | ||
|
|
9fe90d4ae4 | ||
|
|
615b33b8b1 | ||
|
|
71262acbb5 | ||
|
|
8759ccdce4 | ||
|
|
908e35be7b | ||
|
|
6eb36fda4c | ||
|
|
e42fa188cc | ||
|
|
7e9f17658c | ||
|
|
b18c73d9b9 | ||
|
|
e114910048 | ||
|
|
7443b5acc2 | ||
|
|
ddec921e38 | ||
|
|
666281ed2b | ||
|
|
b638bbb549 | ||
|
|
9b3fc1da8d | ||
|
|
0c5bd89033 | ||
|
|
87f8ca8e9d | ||
|
|
5dbff1ab8c | ||
|
|
2f94ee603a | ||
|
|
27d98fa735 | ||
|
|
dbecb80c9e | ||
|
|
8a191167cf | ||
|
|
d025641b34 | ||
|
|
d90d1645db | ||
|
|
b7ff1aa295 | ||
|
|
c1dca31237 | ||
|
|
2591234c66 | ||
|
|
f84ca189b4 | ||
|
|
f9295c2bcb | ||
|
|
20a2ab7416 | ||
|
|
292d526a73 | ||
|
|
28ebe30127 | ||
|
|
9158c9f439 | ||
|
|
cbceca9861 | ||
|
|
4e96ee6bb7 | ||
|
|
7d87e89f72 | ||
|
|
3233ca0127 | ||
|
|
1fa9d08d7d | ||
|
|
6a179980be | ||
|
|
cad02c775a | ||
|
|
8f021502de | ||
|
|
ec4dcdd262 | ||
|
|
e8a0ba9815 | ||
|
|
0b5b68169c | ||
|
|
407aa690d1 | ||
|
|
aed09d7b9d | ||
|
|
ab28879460 | ||
|
|
0e2eb52d82 | ||
|
|
93e567b8ea | ||
|
|
5efc0c02a3 | ||
|
|
83bc024fd3 | ||
|
|
ddcc205516 | ||
|
|
1ae70c2fa0 | ||
|
|
fde4d08213 | ||
|
|
49ff9a5c5f | ||
|
|
04c0f968dc | ||
|
|
a5a51f0d5e | ||
|
|
c7cd242ab2 | ||
|
|
60ee3a4c99 | ||
|
|
f8e49125ad | ||
|
|
740d832dc1 | ||
|
|
4b99f42657 | ||
|
|
5ed003c686 | ||
|
|
59493d1e82 | ||
|
|
c5fa4cbfa0 | ||
|
|
49bab051e8 | ||
|
|
539f457d81 | ||
|
|
77292da7af | ||
|
|
49fbb90cb1 | ||
|
|
2bbf56ec06 | ||
|
|
ed8fbccb1c | ||
|
|
c37f208d3e | ||
|
|
62a052e97b | ||
|
|
7fc3dee95a | ||
|
|
94a3eb636a | ||
|
|
129790ddfc | ||
|
|
35ee2a534e | ||
|
|
ae12a6db35 | ||
|
|
d0fb81de1f | ||
|
|
ec1718c12f | ||
|
|
275e66d77a | ||
|
|
3a82cf5ae1 | ||
|
|
0488c853e3 | ||
|
|
a672c5e85d | ||
|
|
ba0e9ec7d1 | ||
|
|
f276eec0ba | ||
|
|
139a3f6103 | ||
|
|
06dae58f78 | ||
|
|
d284ea9634 | ||
|
|
cce0a35cb1 | ||
|
|
85c807ed1f | ||
|
|
769cf5b316 | ||
|
|
55598d844a | ||
|
|
3d7fe9fb24 | ||
|
|
af31b3a773 | ||
|
|
4a6bc933e1 |
No files matched your search
@@ -24,7 +24,7 @@ log_group_start "Downloading maven dependencies"
|
||||
log_group_end
|
||||
|
||||
log_group_start "Building with maven"
|
||||
./mvnw -e -V clean verify ${PMD_EXTRA_OPT}
|
||||
./mvnw -e -V -B clean verify ${PMD_EXTRA_OPT}
|
||||
log_group_end
|
||||
|
||||
|
||||
|
||||
+5
-1
@@ -121,7 +121,7 @@ function pmd_ci_build_run() {
|
||||
log_info "This is a snapshot build"
|
||||
fi
|
||||
|
||||
./mvnw clean deploy -P${mvn_profiles} -e -V -Djava7.home=${HOME}/oraclejdk7
|
||||
./mvnw clean deploy -P${mvn_profiles} -e -B -V -Djava7.home=${HOME}/oraclejdk7
|
||||
}
|
||||
|
||||
#
|
||||
@@ -181,6 +181,10 @@ function pmd_ci_build_and_upload_doc() {
|
||||
pmd_code_removeJavadoc "${VERSION}-SNAPSHOT"
|
||||
|
||||
# updating github release text
|
||||
rm -f .bundle/config
|
||||
bundle config set --local path vendor/bundle
|
||||
bundle config set --local with release_notes_preprocessing
|
||||
bundle install
|
||||
# renders, and skips the first 6 lines - the Jekyll front-matter
|
||||
local rendered_release_notes=$(bundle exec .ci/render_release_notes.rb docs/pages/release_notes.md | tail -n +6)
|
||||
local release_name="PMD ${VERSION} ($(date -u +%d-%B-%Y))"
|
||||
|
||||
@@ -32,6 +32,8 @@ mvn dependency:build-classpath -DincludeScope=test -Dmdep.outputFile=classpath.t
|
||||
<connection>https://github.com/spring-projects/spring-framework</connection>
|
||||
<tag>v5.0.6.RELEASE</tag>
|
||||
|
||||
<exclude-pattern>.*/build/generated-sources/.*</exclude-pattern>
|
||||
|
||||
<build-command><![CDATA[#!/usr/bin/env bash
|
||||
if test -e classpath.txt; then
|
||||
exit
|
||||
@@ -86,7 +88,7 @@ export PATH=$JAVA_HOME/bin:$PATH
|
||||
EOF
|
||||
) | patch
|
||||
|
||||
./gradlew build -x javadoc -x dokka -x asciidoctor -x test -x testNG -x api -x distZip
|
||||
./gradlew build testClasses -x javadoc -x dokka -x asciidoctor -x test -x testNG -x api -x distZip
|
||||
./gradlew createSquishClasspath -q > classpath.txt
|
||||
]]></build-command>
|
||||
<auxclasspath-command>cat classpath.txt</auxclasspath-command>
|
||||
|
||||
@@ -20,11 +20,23 @@ function maven_dependencies_resolve() {
|
||||
dokka_version=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${dokka.version}' \
|
||||
--non-recursive org.codehaus.mojo:exec-maven-plugin:3.0.0:exec)
|
||||
|
||||
./mvnw dependency:resolve
|
||||
./mvnw dependency:get -DgroupId=org.jetbrains.dokka \
|
||||
# build first the modules, that have dependencies between themselves
|
||||
# first build pmd-lang-test, pmd-test and pmd-core - used by all modules
|
||||
./mvnw clean install -pl pmd-core,pmd-test,pmd-lang-test -DskipTests -Dpmd.skip=true \
|
||||
-B -Dcheckstyle.skip=true -Dmaven.javadoc.skip=true -Dmaven.source.skip=true
|
||||
# then build dependencies for pmd-visualforce needs: pmd-apex->pmd-apex-jorje+pmd-test+pmd-core
|
||||
./mvnw clean install -pl pmd-core,pmd-test,pmd-lang-test,pmd-apex-jorje,pmd-apex -DskipTests -Dpmd.skip=true \
|
||||
-B -Dcheckstyle.skip=true -Dmaven.javadoc.skip=true -Dmaven.source.skip=true
|
||||
|
||||
# the resolve most other projects. The excluded projects depend on other projects in the reactor, which is not
|
||||
# completely built yet, so these are excluded.
|
||||
./mvnw dependency:resolve -pl '!pmd-dist,!pmd-java8,!pmd-doc,!pmd-scala' -Dsilent -B
|
||||
|
||||
./mvnw dependency:get -B -Dsilent \
|
||||
-DgroupId=org.jetbrains.dokka \
|
||||
-DartifactId=dokka-maven-plugin \
|
||||
-Dversion=${dokka_version} \
|
||||
-Dpackaging=jar \
|
||||
-DremoteRepositories=jcenter::default::https://jcenter.bintray.com/
|
||||
./mvnw dependency:resolve-plugins -DexcludeGroupIds=org.jetbrains.dokka -Psign
|
||||
./mvnw dependency:resolve-plugins -B -Dsilent -DexcludeGroupIds=org.jetbrains.dokka -Psign
|
||||
}
|
||||
@@ -33,93 +33,55 @@ function regression_tester_setup_ci() {
|
||||
}
|
||||
|
||||
#
|
||||
# Generate a new baseline and upload it to sourceforge
|
||||
#
|
||||
# Note: this function always succeeds, even if the upload fails.
|
||||
# In that case, just a error logging is provided.
|
||||
# Generate a new baseline and upload it to pmd-code.org
|
||||
#
|
||||
function regression_tester_uploadBaseline() {
|
||||
log_debug "$FUNCNAME branch=${PMD_CI_BRANCH}"
|
||||
local targetUrl="https://sourceforge.net/projects/pmd/files/pmd-regression-tester/"
|
||||
local pmdcodeUrl="https://pmd-code.org/pmd-regression-tester/"
|
||||
local baseline_branch="${PMD_CI_BRANCH:-$PMD_CI_TAG}"
|
||||
log_debug "$FUNCNAME branch=${baseline_branch}"
|
||||
|
||||
local errexitstate="$(shopt -po errexit)"
|
||||
set +e # disable errexit
|
||||
(
|
||||
# This handler is called if any command fails
|
||||
function upload_failed() {
|
||||
log_error "Error while uploading ${BRANCH_FILENAME}-baseline.zip to pmd-code.org!"
|
||||
log_error "Please upload manually: ${pmdcodeUrl}"
|
||||
#log_error "Error while uploading ${BRANCH_FILENAME}-baseline.zip to sourceforge!"
|
||||
#log_error "Please upload manually: ${targetUrl}"
|
||||
}
|
||||
|
||||
# exit subshell after trap
|
||||
set -e
|
||||
trap upload_failed ERR
|
||||
|
||||
log_info "Generating and uploading baseline for pmdtester..."
|
||||
cd ..
|
||||
bundle config --local gemfile pmd/Gemfile
|
||||
bundle exec pmdtester \
|
||||
--mode single \
|
||||
--local-git-repo ./pmd \
|
||||
--patch-branch ${PMD_CI_BRANCH} \
|
||||
--patch-config ./pmd/.ci/files/all-java.xml \
|
||||
--list-of-project ./pmd/.ci/files/project-list.xml --html-flag \
|
||||
--error-recovery
|
||||
cd target/reports
|
||||
BRANCH_FILENAME="${PMD_CI_BRANCH/\//_}"
|
||||
zip -q -r ${BRANCH_FILENAME}-baseline.zip ${BRANCH_FILENAME}/
|
||||
# ssh-key for pmd-code.org is setup already by pmd_ci_setup_ssh
|
||||
scp ${BRANCH_FILENAME}-baseline.zip pmd@pmd-code.org:/httpdocs/pmd-regression-tester/
|
||||
log_success "Successfully uploaded ${BRANCH_FILENAME}-baseline.zip to ${pmdcodeUrl}"
|
||||
#../../pmd/.ci/travis_wait "rsync -avh ${BRANCH_FILENAME}-baseline.zip ${PMD_SF_USER}@web.sourceforge.net:/home/frs/project/pmd/pmd-regression-tester/"
|
||||
#log_success "Successfully uploaded ${BRANCH_FILENAME}-baseline.zip to ${targetUrl}"
|
||||
)
|
||||
# restore errexit state
|
||||
eval "$errexitstate"
|
||||
log_info "Generating and uploading baseline for pmdtester (${baseline_branch})..."
|
||||
pushd ..
|
||||
rm -f .bundle/config
|
||||
bundle config set --local gemfile pmd/Gemfile
|
||||
bundle exec pmdtester \
|
||||
--mode single \
|
||||
--local-git-repo ./pmd \
|
||||
--patch-branch ${baseline_branch} \
|
||||
--patch-config ./pmd/.ci/files/all-java.xml \
|
||||
--list-of-project ./pmd/.ci/files/project-list.xml --html-flag \
|
||||
--error-recovery
|
||||
pushd target/reports
|
||||
BRANCH_FILENAME="${baseline_branch/\//_}"
|
||||
zip -q -r ${BRANCH_FILENAME}-baseline.zip ${BRANCH_FILENAME}/
|
||||
# ssh-key for pmd-code.org is setup already by pmd_ci_setup_ssh
|
||||
scp ${BRANCH_FILENAME}-baseline.zip pmd@pmd-code.org:/httpdocs/pmd-regression-tester/
|
||||
log_success "Successfully uploaded ${BRANCH_FILENAME}-baseline.zip to ${pmdcodeUrl}"
|
||||
popd
|
||||
popd
|
||||
}
|
||||
|
||||
#
|
||||
# Execute danger, which executes pmd-regression-tester (via Dangerfile).
|
||||
#
|
||||
# Note: this function always succeeds, even if the danger fails.
|
||||
# In that case, just a error logging is provided.
|
||||
#
|
||||
function regression_tester_executeDanger() {
|
||||
log_debug "$FUNCNAME"
|
||||
|
||||
local errexitstate="$(shopt -po errexit)"
|
||||
set +e # disable errexit
|
||||
(
|
||||
# This handler is called if any command fails
|
||||
function danger_failed() {
|
||||
log_error "Error while executing danger/pmd-regression-tester"
|
||||
}
|
||||
# Create a corresponding remote branch locally
|
||||
if ! git show-ref --verify --quiet refs/heads/${PMD_CI_BRANCH}; then
|
||||
git fetch --no-tags --depth=1 origin +refs/heads/${PMD_CI_BRANCH}:refs/remotes/origin/${PMD_CI_BRANCH}
|
||||
git branch ${PMD_CI_BRANCH} origin/${PMD_CI_BRANCH}
|
||||
log_debug "Created local branch ${PMD_CI_BRANCH}"
|
||||
fi
|
||||
# Fetch more commits of the PR for danger and regression tester
|
||||
git fetch --no-tags --depth=50 origin +$(git rev-parse HEAD^2):
|
||||
# Fetch more commits from master branch for regression tester
|
||||
if [[ "${PMD_CI_BRANCH}" != "master" ]]; then
|
||||
git fetch --no-tags --depth=50 origin +master:
|
||||
git branch master origin/master
|
||||
fi
|
||||
|
||||
# exit subshell after trap
|
||||
set -e
|
||||
trap danger_failed ERR
|
||||
|
||||
# Create a corresponding remote branch locally
|
||||
if ! git show-ref --verify --quiet refs/heads/${PMD_CI_BRANCH}; then
|
||||
git fetch --no-tags --depth=1 origin +refs/heads/${PMD_CI_BRANCH}:refs/remotes/origin/${PMD_CI_BRANCH}
|
||||
git branch ${PMD_CI_BRANCH} origin/${PMD_CI_BRANCH}
|
||||
log_debug "Created local branch ${PMD_CI_BRANCH}"
|
||||
fi
|
||||
# Fetch more commits of the PR for danger and regression tester
|
||||
git fetch --no-tags --depth=50 origin +$(git rev-parse HEAD^2):
|
||||
# Fetch more commits from master branch for regression tester
|
||||
if [[ "${PMD_CI_BRANCH}" != "master" ]]; then
|
||||
git fetch --no-tags --depth=50 origin +master:
|
||||
git branch master origin/master
|
||||
fi
|
||||
|
||||
log_info "Running danger on branch ${PMD_CI_BRANCH}"
|
||||
bundle exec danger --verbose
|
||||
log_success "Executing danger successfully"
|
||||
)
|
||||
# restore errexit state
|
||||
eval "$errexitstate"
|
||||
log_info "Running danger on branch ${PMD_CI_BRANCH}"
|
||||
bundle exec danger --verbose
|
||||
log_success "Executed danger successfully"
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
name: Rule violation
|
||||
about: Let us know about a false positive/false negative
|
||||
title: ''
|
||||
labels: 'a:bug'
|
||||
labels: 'a:false-positive, a:false-negative'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
@@ -6,7 +6,7 @@ jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: false
|
||||
timeout-minutes: 30
|
||||
timeout-minutes: 60
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
run: .ci/build.sh
|
||||
shell: bash
|
||||
env:
|
||||
MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=180 -Dmaven.wagon.http.retryHandler.count=3
|
||||
MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=180 -Dmaven.wagon.http.retryHandler.count=3 -DstagingProgressTimeoutMinutes=30
|
||||
PMD_CI_SECRET_PASSPHRASE: ${{ secrets.PMD_CI_SECRET_PASSPHRASE }}
|
||||
PMD_CI_JOB_URL: "https://github.com/pmd/pmd/runs/${{ github.run_id }}"
|
||||
PMD_CI_PUSH_COMMIT_COMPARE: ${{ github.event.compare }}
|
||||
|
||||
@@ -10,6 +10,10 @@ jobs:
|
||||
continue-on-error: false
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Ruby 2.7
|
||||
uses: actions/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 2.7
|
||||
- name: Check Environment
|
||||
run: .ci/check-environment.sh
|
||||
shell: bash
|
||||
|
||||
@@ -14,6 +14,7 @@ bin/
|
||||
pmd-core/dependency-reduced-pom.xml
|
||||
.bundle
|
||||
vendor
|
||||
.DS_Store
|
||||
|
||||
# rule docs are generated
|
||||
docs/pages/pmd/rules
|
||||
+1
-1
@@ -45,7 +45,7 @@ There are various channels, on which you can ask questions:
|
||||
|
||||
* On [StackOverflow](https://stackoverflow.com/questions/tagged/pmd): Make sure, to tag your question with "pmd".
|
||||
|
||||
* Create a issue for your question at <https://github.com/pmd/pmd/issues>.
|
||||
* Create a new discussion for your question at <https://github.com/pmd/pmd/discussions>.
|
||||
|
||||
* Ask your question on Gitter <https://gitter.im/pmd/pmd>.
|
||||
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@ def run_pmdtester
|
||||
'--auto-gen-config',
|
||||
'--error-recovery',
|
||||
'--baseline-download-url', 'https://pmd-code.org/pmd-regression-tester/',
|
||||
# '--debug',
|
||||
#'--debug',
|
||||
]
|
||||
begin
|
||||
@summary = PmdTester::Runner.new(argv).run
|
||||
@@ -39,7 +39,7 @@ def upload_report
|
||||
`tar -cf #{tar_filename} diff/`
|
||||
report_url = `curl -u #{ENV['PMD_CI_CHUNK_TOKEN']} -T #{tar_filename} https://chunk.io`
|
||||
if $?.success?
|
||||
@logger.info "Successfully uploaded #{tar_filename} to chunk.io"
|
||||
@logger.info "Successfully uploaded #{tar_filename} to #{report_url}"
|
||||
|
||||
# set value of sticky to true and the message is kept after new commits are submitted to the PR
|
||||
message("This changeset " \
|
||||
|
||||
@@ -3,7 +3,7 @@ source 'https://rubygems.org/'
|
||||
# bleeding edge from git
|
||||
#gem 'pmdtester', :git => 'https://github.com/pmd/pmd-regression-tester.git'
|
||||
|
||||
gem 'pmdtester', '~> 1.1'
|
||||
gem 'pmdtester', '~> 1'
|
||||
gem 'danger', '~> 5.6', '>= 5.6'
|
||||
|
||||
# This group is only needed for rendering release notes
|
||||
|
||||
+15
-13
@@ -31,36 +31,38 @@ GEM
|
||||
multipart-post (>= 1.2, < 3)
|
||||
faraday-http-cache (1.3.1)
|
||||
faraday (~> 0.8)
|
||||
fugit (1.4.1)
|
||||
fugit (1.4.2)
|
||||
et-orbi (~> 1.1, >= 1.1.8)
|
||||
raabro (~> 1.4)
|
||||
git (1.7.0)
|
||||
git (1.8.1)
|
||||
rchardet (~> 1.8)
|
||||
kramdown (1.17.0)
|
||||
liquid (4.0.3)
|
||||
liquid (5.0.0)
|
||||
logger-colors (1.0.0)
|
||||
mini_portile2 (2.4.0)
|
||||
mini_portile2 (2.5.0)
|
||||
multipart-post (2.1.1)
|
||||
nap (1.1.0)
|
||||
no_proxy_fix (0.1.2)
|
||||
nokogiri (1.10.10)
|
||||
mini_portile2 (~> 2.4.0)
|
||||
octokit (4.19.0)
|
||||
nokogiri (1.11.1)
|
||||
mini_portile2 (~> 2.5.0)
|
||||
racc (~> 1.4)
|
||||
octokit (4.20.0)
|
||||
faraday (>= 0.9)
|
||||
sawyer (~> 0.8.0, >= 0.5.3)
|
||||
open4 (1.3.4)
|
||||
pmdtester (1.1.0)
|
||||
pmdtester (1.1.1)
|
||||
differ (~> 0.1)
|
||||
liquid (>= 4.0)
|
||||
logger-colors (~> 1.0)
|
||||
nokogiri (~> 1.8)
|
||||
nokogiri (>= 1.11.0.rc4)
|
||||
rufus-scheduler (~> 3.5)
|
||||
slop (~> 4.6)
|
||||
public_suffix (4.0.6)
|
||||
raabro (1.4.0)
|
||||
racc (1.5.2)
|
||||
rchardet (1.8.0)
|
||||
rouge (3.25.0)
|
||||
rufus-scheduler (3.6.0)
|
||||
rouge (3.26.0)
|
||||
rufus-scheduler (3.7.0)
|
||||
fugit (~> 1.1, >= 1.1.6)
|
||||
safe_yaml (1.0.5)
|
||||
sawyer (0.8.2)
|
||||
@@ -69,7 +71,7 @@ GEM
|
||||
slop (4.8.2)
|
||||
terminal-table (1.8.0)
|
||||
unicode-display_width (~> 1.1, >= 1.1.1)
|
||||
tzinfo (2.0.3)
|
||||
tzinfo (2.0.4)
|
||||
concurrent-ruby (~> 1.0)
|
||||
unicode-display_width (1.7.0)
|
||||
|
||||
@@ -79,7 +81,7 @@ PLATFORMS
|
||||
DEPENDENCIES
|
||||
danger (~> 5.6, >= 5.6)
|
||||
liquid (>= 4.0.0)
|
||||
pmdtester (~> 1.1)
|
||||
pmdtester (~> 1)
|
||||
rouge (>= 1.7, < 4)
|
||||
safe_yaml (>= 1.0)
|
||||
|
||||
|
||||
@@ -20,10 +20,12 @@ Objective-C, Perl, PHP, PLSQL, Python, Ruby, Salesforce.com Apex, Scala, Swift,
|
||||
|
||||
## Support
|
||||
|
||||
* How do I? -- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/pmd).
|
||||
* I got this error, why? -- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/pmd).
|
||||
* How do I? -- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/pmd)
|
||||
or on [discussions](https://github.com/pmd/pmd/discussions).
|
||||
* I got this error, why? -- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/pmd)
|
||||
or on [discussions](https://github.com/pmd/pmd/discussions).
|
||||
* I got this error and I'm sure it's a bug -- file an [issue](https://github.com/pmd/pmd/issues).
|
||||
* I have an idea/request/question -- file an [issue](https://github.com/pmd/pmd/issues).
|
||||
* I have an idea/request/question -- create a new [discussion](https://github.com/pmd/pmd/discussions).
|
||||
* I have a quick question -- ask on our [Gitter chat](https://gitter.im/pmd/pmd).
|
||||
* Where's your documentation? -- <https://pmd.github.io/latest/>
|
||||
|
||||
|
||||
+37
-30
@@ -1,7 +1,7 @@
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
activesupport (6.0.3.2)
|
||||
activesupport (6.0.3.4)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
i18n (>= 0.7, < 2)
|
||||
minitest (~> 5.1)
|
||||
@@ -17,37 +17,40 @@ GEM
|
||||
commonmarker (0.17.13)
|
||||
ruby-enum (~> 0.5)
|
||||
concurrent-ruby (1.1.7)
|
||||
dnsruby (1.61.4)
|
||||
dnsruby (1.61.5)
|
||||
simpleidn (~> 0.1)
|
||||
em-websocket (0.5.1)
|
||||
em-websocket (0.5.2)
|
||||
eventmachine (>= 0.12.9)
|
||||
http_parser.rb (~> 0.6.0)
|
||||
ethon (0.12.0)
|
||||
ffi (>= 1.3.0)
|
||||
eventmachine (1.2.7)
|
||||
execjs (2.7.0)
|
||||
faraday (1.0.1)
|
||||
faraday (1.3.0)
|
||||
faraday-net_http (~> 1.0)
|
||||
multipart-post (>= 1.2, < 3)
|
||||
ffi (1.13.1)
|
||||
ruby2_keywords
|
||||
faraday-net_http (1.0.0)
|
||||
ffi (1.14.2)
|
||||
forwardable-extended (2.6.0)
|
||||
gemoji (3.0.1)
|
||||
github-pages (207)
|
||||
github-pages (209)
|
||||
github-pages-health-check (= 1.16.1)
|
||||
jekyll (= 3.9.0)
|
||||
jekyll-avatar (= 0.7.0)
|
||||
jekyll-coffeescript (= 1.1.1)
|
||||
jekyll-commonmark-ghpages (= 0.1.6)
|
||||
jekyll-default-layout (= 0.1.4)
|
||||
jekyll-feed (= 0.13.0)
|
||||
jekyll-feed (= 0.15.1)
|
||||
jekyll-gist (= 1.5.0)
|
||||
jekyll-github-metadata (= 2.13.0)
|
||||
jekyll-mentions (= 1.5.1)
|
||||
jekyll-mentions (= 1.6.0)
|
||||
jekyll-optional-front-matter (= 0.3.2)
|
||||
jekyll-paginate (= 1.1.0)
|
||||
jekyll-readme-index (= 0.3.0)
|
||||
jekyll-redirect-from (= 0.15.0)
|
||||
jekyll-redirect-from (= 0.16.0)
|
||||
jekyll-relative-links (= 0.6.1)
|
||||
jekyll-remote-theme (= 0.4.1)
|
||||
jekyll-remote-theme (= 0.4.2)
|
||||
jekyll-sass-converter (= 1.5.2)
|
||||
jekyll-seo-tag (= 2.6.1)
|
||||
jekyll-sitemap (= 1.4.0)
|
||||
@@ -55,7 +58,7 @@ GEM
|
||||
jekyll-theme-architect (= 0.1.1)
|
||||
jekyll-theme-cayman (= 0.1.1)
|
||||
jekyll-theme-dinky (= 0.1.1)
|
||||
jekyll-theme-hacker (= 0.1.1)
|
||||
jekyll-theme-hacker (= 0.1.2)
|
||||
jekyll-theme-leap-day (= 0.1.1)
|
||||
jekyll-theme-merlot (= 0.1.1)
|
||||
jekyll-theme-midnight (= 0.1.1)
|
||||
@@ -66,14 +69,14 @@ GEM
|
||||
jekyll-theme-tactile (= 0.1.1)
|
||||
jekyll-theme-time-machine (= 0.1.1)
|
||||
jekyll-titles-from-headings (= 0.5.3)
|
||||
jemoji (= 0.11.1)
|
||||
jemoji (= 0.12.0)
|
||||
kramdown (= 2.3.0)
|
||||
kramdown-parser-gfm (= 1.1.0)
|
||||
liquid (= 4.0.3)
|
||||
mercenary (~> 0.3)
|
||||
minima (= 2.5.1)
|
||||
nokogiri (>= 1.10.4, < 2.0)
|
||||
rouge (= 3.19.0)
|
||||
rouge (= 3.23.0)
|
||||
terminal-table (~> 1.4)
|
||||
github-pages-health-check (1.16.1)
|
||||
addressable (~> 2.3)
|
||||
@@ -114,14 +117,14 @@ GEM
|
||||
rouge (>= 2.0, < 4.0)
|
||||
jekyll-default-layout (0.1.4)
|
||||
jekyll (~> 3.0)
|
||||
jekyll-feed (0.13.0)
|
||||
jekyll-feed (0.15.1)
|
||||
jekyll (>= 3.7, < 5.0)
|
||||
jekyll-gist (1.5.0)
|
||||
octokit (~> 4.2)
|
||||
jekyll-github-metadata (2.13.0)
|
||||
jekyll (>= 3.4, < 5.0)
|
||||
octokit (~> 4.0, != 4.4.0)
|
||||
jekyll-mentions (1.5.1)
|
||||
jekyll-mentions (1.6.0)
|
||||
html-pipeline (~> 2.3)
|
||||
jekyll (>= 3.7, < 5.0)
|
||||
jekyll-optional-front-matter (0.3.2)
|
||||
@@ -129,14 +132,15 @@ GEM
|
||||
jekyll-paginate (1.1.0)
|
||||
jekyll-readme-index (0.3.0)
|
||||
jekyll (>= 3.0, < 5.0)
|
||||
jekyll-redirect-from (0.15.0)
|
||||
jekyll-redirect-from (0.16.0)
|
||||
jekyll (>= 3.3, < 5.0)
|
||||
jekyll-relative-links (0.6.1)
|
||||
jekyll (>= 3.3, < 5.0)
|
||||
jekyll-remote-theme (0.4.1)
|
||||
jekyll-remote-theme (0.4.2)
|
||||
addressable (~> 2.0)
|
||||
jekyll (>= 3.5, < 5.0)
|
||||
rubyzip (>= 1.3.0)
|
||||
jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0)
|
||||
rubyzip (>= 1.3.0, < 3.0)
|
||||
jekyll-sass-converter (1.5.2)
|
||||
sass (~> 3.4)
|
||||
jekyll-seo-tag (2.6.1)
|
||||
@@ -153,8 +157,8 @@ GEM
|
||||
jekyll-theme-dinky (0.1.1)
|
||||
jekyll (~> 3.5)
|
||||
jekyll-seo-tag (~> 2.0)
|
||||
jekyll-theme-hacker (0.1.1)
|
||||
jekyll (~> 3.5)
|
||||
jekyll-theme-hacker (0.1.2)
|
||||
jekyll (> 3.5, < 5.0)
|
||||
jekyll-seo-tag (~> 2.0)
|
||||
jekyll-theme-leap-day (0.1.1)
|
||||
jekyll (~> 3.5)
|
||||
@@ -188,7 +192,7 @@ GEM
|
||||
jekyll (>= 3.3, < 5.0)
|
||||
jekyll-watch (2.2.1)
|
||||
listen (~> 3.0)
|
||||
jemoji (0.11.1)
|
||||
jemoji (0.12.0)
|
||||
gemoji (~> 3.0)
|
||||
html-pipeline (~> 2.2)
|
||||
jekyll (>= 3.0, < 5.0)
|
||||
@@ -197,32 +201,35 @@ GEM
|
||||
kramdown-parser-gfm (1.1.0)
|
||||
kramdown (~> 2.0)
|
||||
liquid (4.0.3)
|
||||
listen (3.2.1)
|
||||
listen (3.4.0)
|
||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||
rb-inotify (~> 0.9, >= 0.9.10)
|
||||
mercenary (0.3.6)
|
||||
mini_portile2 (2.4.0)
|
||||
mini_portile2 (2.5.0)
|
||||
minima (2.5.1)
|
||||
jekyll (>= 3.5, < 5.0)
|
||||
jekyll-feed (~> 0.9)
|
||||
jekyll-seo-tag (~> 2.1)
|
||||
minitest (5.14.1)
|
||||
minitest (5.14.3)
|
||||
multipart-post (2.1.1)
|
||||
nokogiri (1.10.10)
|
||||
mini_portile2 (~> 2.4.0)
|
||||
octokit (4.18.0)
|
||||
nokogiri (1.11.1)
|
||||
mini_portile2 (~> 2.5.0)
|
||||
racc (~> 1.4)
|
||||
octokit (4.20.0)
|
||||
faraday (>= 0.9)
|
||||
sawyer (~> 0.8.0, >= 0.5.3)
|
||||
pathutil (0.16.2)
|
||||
forwardable-extended (~> 2.6)
|
||||
public_suffix (3.1.1)
|
||||
racc (1.5.2)
|
||||
rb-fsevent (0.10.4)
|
||||
rb-inotify (0.10.1)
|
||||
ffi (~> 1.0)
|
||||
rexml (3.2.4)
|
||||
rouge (3.19.0)
|
||||
rouge (3.23.0)
|
||||
ruby-enum (0.8.0)
|
||||
i18n
|
||||
ruby2_keywords (0.0.2)
|
||||
rubyzip (2.3.0)
|
||||
safe_yaml (1.0.5)
|
||||
sass (3.7.4)
|
||||
@@ -240,13 +247,13 @@ GEM
|
||||
thread_safe (0.3.6)
|
||||
typhoeus (1.4.0)
|
||||
ethon (>= 0.9.0)
|
||||
tzinfo (1.2.7)
|
||||
tzinfo (1.2.9)
|
||||
thread_safe (~> 0.1)
|
||||
unf (0.1.4)
|
||||
unf_ext
|
||||
unf_ext (0.0.7.7)
|
||||
unicode-display_width (1.7.0)
|
||||
zeitwerk (2.4.0)
|
||||
zeitwerk (2.4.2)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
repository: pmd/pmd
|
||||
|
||||
pmd:
|
||||
version: 6.30.0
|
||||
previous_version: 6.29.0
|
||||
date: 12-December-2020
|
||||
version: 6.33.0
|
||||
previous_version: 6.32.0
|
||||
date: 27-March-2021
|
||||
release_type: minor
|
||||
|
||||
# release types: major, minor, bugfix
|
||||
|
||||
@@ -349,6 +349,9 @@ entries:
|
||||
- title: Apex code metrics
|
||||
url: /pmd_apex_metrics_index.html
|
||||
output: web, pdf
|
||||
- title: PLSQL
|
||||
url: /pmd_languages_plsql.html
|
||||
output: web, pdf
|
||||
- title: Developer Documentation
|
||||
output: web, pdf
|
||||
folderitems:
|
||||
|
||||
@@ -125,13 +125,59 @@ the breaking API changes will be performed in 7.0.0.
|
||||
an API is tagged as `@Deprecated` or not in the latest minor release. During the development of 7.0.0,
|
||||
we may decide to remove some APIs that were not tagged as deprecated, though we'll try to avoid it." %}
|
||||
|
||||
#### 6.33.0
|
||||
|
||||
No changes.
|
||||
|
||||
#### 6.32.0
|
||||
|
||||
##### Experimental APIs
|
||||
|
||||
* The experimental class `ASTTypeTestPattern` has been renamed to {% jdoc java::lang.java.ast.ASTTypePattern %}
|
||||
in order to align the naming to the JLS.
|
||||
* The experimental class `ASTRecordConstructorDeclaration` has been renamed to {% jdoc java::lang.java.ast.ASTCompactConstructorDeclaration %}
|
||||
in order to align the naming to the JLS.
|
||||
* The AST types and APIs around Pattern Matching and Records are not experimental anymore:
|
||||
* {% jdoc !!java::lang.java.ast.ASTVariableDeclaratorId#isPatternBinding() %}
|
||||
* {% jdoc java::lang.java.ast.ASTPattern %}
|
||||
* {% jdoc java::lang.java.ast.ASTTypePattern %}
|
||||
* {% jdoc java::lang.java.ast.ASTRecordDeclaration %}
|
||||
* {% jdoc java::lang.java.ast.ASTRecordComponentList %}
|
||||
* {% jdoc java::lang.java.ast.ASTRecordComponent %}
|
||||
* {% jdoc java::lang.java.ast.ASTRecordBody %}
|
||||
* {% jdoc java::lang.java.ast.ASTCompactConstructorDeclaration %}
|
||||
|
||||
##### Internal API
|
||||
|
||||
Those APIs are not intended to be used by clients, and will be hidden or removed with PMD 7.0.0.
|
||||
You can identify them with the `@InternalApi` annotation. You'll also get a deprecation warning.
|
||||
|
||||
* The protected or public member of the Java rule {% jdoc java::lang.java.rule.bestpractices.AvoidUsingHardCodedIPRule %}
|
||||
are deprecated and considered to be internal API. They will be removed with PMD 7.
|
||||
|
||||
#### 6.31.0
|
||||
|
||||
##### Deprecated API
|
||||
|
||||
* {% jdoc xml::lang.xml.rule.AbstractDomXmlRule %}
|
||||
* {% jdoc xml::lang.wsdl.rule.AbstractWsdlRule %}
|
||||
* A few methods of {% jdoc xml::lang.xml.rule.AbstractXmlRule %}
|
||||
|
||||
##### Experimental APIs
|
||||
|
||||
* The method {% jdoc !!core::lang.ast.GenericToken#getKind() %} has been added as experimental. This
|
||||
unifies the token interface for both JavaCC and Antlr. The already existing method
|
||||
{% jdoc !!core::cpd.token.AntlrToken#getKind() %} is therefore experimental as well. The
|
||||
returned constant depends on the actual language and might change whenever the grammar
|
||||
of the language is changed.
|
||||
|
||||
#### 6.30.0
|
||||
|
||||
##### Deprecated API
|
||||
|
||||
###### Around RuleSet parsing
|
||||
|
||||
* {% jdoc core::RuleSetFactory %} and {% jdoc core::RuleSetFactoryUtils %} have been deprecated in favor of {% jdoc core::RuleSetLoader %}. This is easier to configure, and more maintainable than the multiple overloads of `RuleSetFactoryUtils`.
|
||||
* {% jdoc core::RuleSetFactory %} and {% jdoc core::RulesetsFactoryUtils %} have been deprecated in favor of {% jdoc core::RuleSetLoader %}. This is easier to configure, and more maintainable than the multiple overloads of `RulesetsFactoryUtils`.
|
||||
* Some static creation methods have been added to {% jdoc core::RuleSet %} for simple cases, eg {% jdoc core::RuleSet#forSingleRule(core::Rule) %}. These replace some counterparts in {% jdoc core::RuleSetFactory %}
|
||||
* Since {% jdoc core::RuleSets %} is also deprecated, many APIs that require a RuleSets instance now are deprecated, and have a counterpart that expects a `List<RuleSet>`.
|
||||
* {% jdoc core::RuleSetReferenceId %}, {% jdoc core::RuleSetReference %}, {% jdoc core::RuleSetFactoryCompatibility %} are deprecated. They are most likely not relevant outside of the implementation of pmd-core.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
title: Getting Help
|
||||
permalink: pmd_about_help.html
|
||||
author: Andreas Dangel <andreas.dangel@adangel.org>
|
||||
last_updated: September 2017
|
||||
author: Andreas Dangel <andreas.dangel@pmd-code.org>
|
||||
last_updated: January 2021
|
||||
---
|
||||
|
||||
There are numerous ways of getting help:
|
||||
@@ -13,7 +13,7 @@ There are numerous ways of getting help:
|
||||
|
||||
* If you found a bug, please create a new [github issue](https://github.com/pmd/pmd/issues).
|
||||
|
||||
* You can also ask questions in our [sourceforge forum](https://sourceforge.net/p/pmd/discussion/).
|
||||
* You can also ask questions on [github discussions](https://github.com/pmd/pmd/discussions).
|
||||
|
||||
* Or you can join the [Mailing List](https://lists.sourceforge.net/lists/listinfo/pmd-devel) or browse
|
||||
through the archives ([archive1](http://java-pmd.30631.n5.nabble.com/), [archive2](http://web.archive.org/web/20160715035623/http://blog.gmane.org:80/gmane.comp.java.audit.pmd.devel)).
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
---
|
||||
title: PLSQL
|
||||
permalink: pmd_languages_plsql.html
|
||||
last_updated: March 2021 (6.33.0)
|
||||
---
|
||||
|
||||
## Parsing Exclusions
|
||||
|
||||
The grammar for PLSQL used in PMD has several bugs and might not parse all DDL scripts
|
||||
without errors. However, it should be best practice to call PMD for _every_ DDL script.
|
||||
Thus, we introduce the following workaround to cope with the situation.
|
||||
|
||||
We introduce two special comments `PMD-EXCLUDE-BEGIN` and `PMD-EXCLUDE-END`
|
||||
which cause PMD to treat the source in between these comments more or less
|
||||
like a multi-line comment, or in other words, just not try to parse them.
|
||||
|
||||
It is good practice to include a reason for excluding inside the
|
||||
`-- PMD-EXCUDE-BEGIN` comment separated by a colon.
|
||||
|
||||
The `PMD-EXCLUDE-BEGIN` and `PMD-EXLUDE-END` comment lines must not contain
|
||||
other statements, e.g. `do_xy(); -- PMD-EXCLUDE-BEGIN` is invalid.
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
begin
|
||||
do_something();
|
||||
-- PMD-EXCLUDE-BEGIN: PMD does not like dbms_lob.trim (clash with TrimExpression)
|
||||
dbms_lob.trim(the_blob, 1000);
|
||||
-- PMD-EXCLUDE-END
|
||||
do_something_else();
|
||||
end;
|
||||
```
|
||||
|
||||
The existence of exclusions can be detected with the attributes
|
||||
`ExcludedRangesCount` and `ExcludedLinesCount` of the top-level ASTInput node.
|
||||
If nothing is excluded, both values are 0 (zero).
|
||||
Otherwise, `ExcludedRangesCount` contains the number of excluded line-ranges
|
||||
and `ExcludedLinesCount` is the total number of excluded lines.
|
||||
A future version of PMD might pass the line excluded line ranges,
|
||||
source fragments and the corresponding reason comments
|
||||
as child nodes of the top-level ASTInput node.
|
||||
|
||||
In order to keep track where such parse exclusions are used, you could create
|
||||
a custom XPath rule with the following expression:
|
||||
|
||||
/Input[@ExcludedRangesCount > 0]
|
||||
|
||||
This will find all files with at least one excluded range.
|
||||
@@ -26,6 +26,8 @@ author: Tom Copeland <tom@infoether.org>
|
||||
|
||||
### PMD in general and other Language Modules
|
||||
|
||||
* February 2021 - Artem Krosheninnikov's talk about Quality Assurance Automation: [Artem Krosheninnikov, Wrike - How static analysis can help in QAA processes](https://www.youtube.com/watch?v=L42zH5ne074)
|
||||
|
||||
* May 2019 - [Code quality assurance with PMD – An extensible static code analyser for Java and other languages](https://www.datarespons.com/code-quality-assurance-with-pmd/)
|
||||
|
||||
* February 2012 - Romain Pelisse's lightning talk at FOSDEM 2012 about "PMD5: What can it do for you?".
|
||||
|
||||
@@ -60,8 +60,8 @@ All property assignments must be enclosed in a `properties` element, which is it
|
||||
|
||||
Some properties take multiple values (a list), in which case you can provide them all by delimiting them with a delimiter character. It is usually a pipe ('\|'), or a comma (',') for numeric properties, e.g.
|
||||
```xml
|
||||
<property name="legalCollectionTypes"
|
||||
value="java.util.ArrayList|java.util.Vector|java.util.HashMap"/>
|
||||
<property name="legalCollectionTypes"
|
||||
value="java.util.ArrayList|java.util.Vector|java.util.HashMap"/>
|
||||
```
|
||||
|
||||
These properties are referred to as **multivalued properties** in this documentation.
|
||||
@@ -119,7 +119,7 @@ Novice as much as advanced readers may want to [read on on Refactoring Guru](htt
|
||||
{% include custom/cli_option_row.html options="--ignore-literal-sequences"
|
||||
description="Ignore sequences of literals (common e.g. in list initializers)"
|
||||
default="false"
|
||||
languages="C#"
|
||||
languages="C#, C++"
|
||||
%}
|
||||
{% include custom/cli_option_row.html options="--ignore-usings"
|
||||
description="Ignore `using` directives in C# when comparing text"
|
||||
@@ -253,14 +253,14 @@ For details, see [CPD Report Formats](pmd_userdocs_cpd_report_formats.html).
|
||||
Andy Glover wrote an Ant task for CPD; here's how to use it:
|
||||
|
||||
```xml
|
||||
<target name="cpd">
|
||||
<taskdef name="cpd" classname="net.sourceforge.pmd.cpd.CPDTask" />
|
||||
<cpd minimumTokenCount="100" outputFile="/home/tom/cpd.txt">
|
||||
<fileset dir="/home/tom/tmp/ant">
|
||||
<include name="**/*.java"/>
|
||||
</fileset>
|
||||
</cpd>
|
||||
</target>
|
||||
<target name="cpd">
|
||||
<taskdef name="cpd" classname="net.sourceforge.pmd.cpd.CPDTask" />
|
||||
<cpd minimumTokenCount="100" outputFile="/home/tom/cpd.txt">
|
||||
<fileset dir="/home/tom/tmp/ant">
|
||||
<include name="**/*.java"/>
|
||||
</fileset>
|
||||
</cpd>
|
||||
</target>
|
||||
```
|
||||
|
||||
<!-- TODO avoid duplicating the descriptions! -->
|
||||
@@ -352,7 +352,7 @@ Also, you can get an HTML report from CPD by using the XSLT script in pmd/etc/xs
|
||||
the CPD task as usual and right after it invoke the Ant XSLT script like this:
|
||||
|
||||
```xml
|
||||
<xslt in="cpd.xml" style="etc/xslt/cpdhtml.xslt" out="cpd.html" />
|
||||
<xslt in="cpd.xml" style="etc/xslt/cpdhtml.xslt" out="cpd.html" />
|
||||
```
|
||||
|
||||
## GUI
|
||||
@@ -378,23 +378,23 @@ Arbitrary blocks of code can be ignored through comments on **Java**, **C/C++**,
|
||||
**Kotlin**, **Lua**, **Matlab**, **Objective-C**, **PL/SQL**, **Python**, **Scala**, **Swift** and **C#** by including the keywords `CPD-OFF` and `CPD-ON`.
|
||||
|
||||
```java
|
||||
public Object someParameterizedFactoryMethod(int x) throws Exception {
|
||||
// some unignored code
|
||||
public Object someParameterizedFactoryMethod(int x) throws Exception {
|
||||
// some unignored code
|
||||
|
||||
// tell cpd to start ignoring code - CPD-OFF
|
||||
// tell cpd to start ignoring code - CPD-OFF
|
||||
|
||||
// mission critical code, manually loop unroll
|
||||
goDoSomethingAwesome(x + x / 2);
|
||||
goDoSomethingAwesome(x + x / 2);
|
||||
goDoSomethingAwesome(x + x / 2);
|
||||
goDoSomethingAwesome(x + x / 2);
|
||||
goDoSomethingAwesome(x + x / 2);
|
||||
goDoSomethingAwesome(x + x / 2);
|
||||
// mission critical code, manually loop unroll
|
||||
goDoSomethingAwesome(x + x / 2);
|
||||
goDoSomethingAwesome(x + x / 2);
|
||||
goDoSomethingAwesome(x + x / 2);
|
||||
goDoSomethingAwesome(x + x / 2);
|
||||
goDoSomethingAwesome(x + x / 2);
|
||||
goDoSomethingAwesome(x + x / 2);
|
||||
|
||||
// resume CPD analysis - CPD-ON
|
||||
// resume CPD analysis - CPD-ON
|
||||
|
||||
// further code will *not* be ignored
|
||||
}
|
||||
// further code will *not* be ignored
|
||||
}
|
||||
```
|
||||
|
||||
Additionally, **Java** allows to toggle suppression by adding the annotations
|
||||
@@ -405,15 +405,15 @@ This approach however, is limited to the locations were `@SuppressWarnings` is a
|
||||
It's legacy and the new comment's based approach should be favored.
|
||||
|
||||
```java
|
||||
//enable suppression
|
||||
@SuppressWarnings("CPD-START")
|
||||
public Object someParameterizedFactoryMethod(int x) throws Exception {
|
||||
// any code here will be ignored for the duplication detection
|
||||
}
|
||||
//disable suppression
|
||||
@SuppressWarnings("CPD-END)
|
||||
public void nextMethod() {
|
||||
}
|
||||
//enable suppression
|
||||
@SuppressWarnings("CPD-START")
|
||||
public Object someParameterizedFactoryMethod(int x) throws Exception {
|
||||
// any code here will be ignored for the duplication detection
|
||||
}
|
||||
//disable suppression
|
||||
@SuppressWarnings("CPD-END)
|
||||
public void nextMethod() {
|
||||
}
|
||||
```
|
||||
|
||||
Other languages currently have no support to suppress CPD reports. In the future,
|
||||
|
||||
@@ -19,6 +19,18 @@ those can be specified with the `-property` / `-P` option on the command-line.
|
||||
|
||||
{% include note.html content="Suppressed violations are only reported, if the CLI parameter `-showsuppressed` is set." %}
|
||||
|
||||
## sarif
|
||||
|
||||
"SARIF, the Static Analysis Results Interchange Format, is a standard, JSON-based format for the output of static
|
||||
analysis tools. It has been approved as an OASIS standard" - <https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html>.
|
||||
|
||||
SARIF schema can be found here: <https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json>.
|
||||
|
||||
PMD holds an initial implementation version of SARIF rendering. This means SARIF allows for more complexity and the
|
||||
current implementation can be extended.
|
||||
|
||||
[Example](report-examples/pmd-report.sarif.json)
|
||||
|
||||
## codeclimate
|
||||
|
||||
Renderer for Code Climate JSON format.
|
||||
|
||||
@@ -26,17 +26,17 @@ report additionally in `<reporting><plugins/></reporting>` elements. Here's an e
|
||||
section:
|
||||
|
||||
```xml
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-pmd-plugin</artifactId>
|
||||
<version>{{ page.mpmd_version }}</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-pmd-plugin</artifactId>
|
||||
<version>{{ page.mpmd_version }}</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
```
|
||||
|
||||
When defining the version in the pluginManagment section, then it doesn't need to be specified in the normal plugins
|
||||
@@ -123,22 +123,22 @@ To specify a ruleset, simply edit the previous configuration:
|
||||
|
||||
|
||||
``` xml
|
||||
<reporting>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-pmd-plugin</artifactId>
|
||||
<version>{{ page.mpmd_version }}</version>
|
||||
<configuration>
|
||||
<rulesets>
|
||||
<ruleset>/rulesets/java/quickstart.xml</ruleset>
|
||||
<ruleset>d:\rulesets\my-ruleset.xml</ruleset>
|
||||
<ruleset>http://localhost/design.xml</ruleset>
|
||||
</rulesets>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</reporting>
|
||||
<reporting>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-pmd-plugin</artifactId>
|
||||
<version>{{ page.mpmd_version }}</version>
|
||||
<configuration>
|
||||
<rulesets>
|
||||
<ruleset>/rulesets/java/quickstart.xml</ruleset>
|
||||
<ruleset>d:\rulesets\my-ruleset.xml</ruleset>
|
||||
<ruleset>http://localhost/design.xml</ruleset>
|
||||
</rulesets>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</reporting>
|
||||
```
|
||||
|
||||
The value of the 'ruleset' element can either be a relative address, an absolute address or even an url.
|
||||
@@ -156,17 +156,17 @@ When using the Maven PMD plugin 3.8 or later along with PMD 5.6.0 or later, you
|
||||
speed up PMD's execution while retaining the quality of the analysis. You can additionally customize where the cache is stored::
|
||||
|
||||
```xml
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-pmd-plugin</artifactId>
|
||||
<version>{{ page.mpmd_version }}</version> <!-- or use version from pluginManagement -->
|
||||
<configuration>
|
||||
<!-- enable incremental analysis -->
|
||||
<analysisCache>true</analysisCache>
|
||||
<!-- analysisCacheLocation: optional - points to the following location by default -->
|
||||
<analysisCacheLocation>${project.build.directory}/pmd/pmd.cache</analysisCacheLocation>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-pmd-plugin</artifactId>
|
||||
<version>{{ page.mpmd_version }}</version> <!-- or use version from pluginManagement -->
|
||||
<configuration>
|
||||
<!-- enable incremental analysis -->
|
||||
<analysisCache>true</analysisCache>
|
||||
<!-- analysisCacheLocation: optional - points to the following location by default -->
|
||||
<analysisCacheLocation>${project.build.directory}/pmd/pmd.cache</analysisCacheLocation>
|
||||
</configuration>
|
||||
</plugin>
|
||||
```
|
||||
|
||||
#### Other configurations
|
||||
@@ -175,17 +175,17 @@ The Maven PMD plugin allows you to configure CPD, targetJDK, and the use of XRef
|
||||
the report to html source files, and the file encoding:
|
||||
|
||||
```xml
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-pmd-plugin</artifactId>
|
||||
<version>{{ page.mpmd_version }}</version> <!-- or use version from pluginManagement -->
|
||||
<configuration>
|
||||
<linkXRef>true</linkXRef>
|
||||
<sourceEncoding>ISO-8859-1</sourceEncoding>
|
||||
<minimumTokens>30</minimumTokens>
|
||||
<targetJdk>1.4</targetJdk>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-pmd-plugin</artifactId>
|
||||
<version>{{ page.mpmd_version }}</version> <!-- or use version from pluginManagement -->
|
||||
<configuration>
|
||||
<linkXRef>true</linkXRef>
|
||||
<sourceEncoding>ISO-8859-1</sourceEncoding>
|
||||
<minimumTokens>30</minimumTokens>
|
||||
<targetJdk>1.4</targetJdk>
|
||||
</configuration>
|
||||
</plugin>
|
||||
```
|
||||
|
||||
#### Upgrading the PMD version at runtime
|
||||
|
||||
+28
-83
@@ -14,99 +14,44 @@ This is a {{ site.pmd.release_type }} release.
|
||||
|
||||
### New and noteworthy
|
||||
|
||||
##### CPD
|
||||
#### PLSQL parsing exclusions
|
||||
|
||||
* The C# module now supports the new option [`--ignore-literal-sequences`](https://pmd.github.io/latest/pmd_userdocs_cpd.html#-ignore-literal-sequences), which can be used to avoid detection of some uninteresting clones. Support for other languages may be added in the future. See [#2945](https://github.com/pmd/pmd/pull/2945)
|
||||
|
||||
* The Scala module now supports [suppression](https://pmd.github.io/latest/pmd_userdocs_cpd.html#suppression) through `CPD-ON`/`CPD-OFF` comment pairs. See [#2929](https://github.com/pmd/pmd/pull/2929)
|
||||
|
||||
|
||||
##### Type information for VisualForce
|
||||
|
||||
The Visualforce AST now can resolve the data type of Visualforce expressions that reference Apex Controller properties and Custom Object fields. This feature improves the precision of existing rules, like {% rule vf/security/VfUnescapeEl %}.
|
||||
|
||||
This can be configured using two environment variables:
|
||||
* `PMD_VF_APEXDIRECTORIES`: Comma separated list of directories for Apex classes. Absolute or relative to the Visualforce directory. Default is `../classes`. Specifying an empty string will disable data type resolution for Apex Controller properties.
|
||||
* `PMD_VF_OBJECTSDIRECTORIES`: Comma separated list of directories for Custom Objects. Absolute or relative to the Visualforce directory. Default is `../objects`. Specifying an empty string will disable data type resolution for Custom Object fields.
|
||||
|
||||
This feature is experimental, in particular, expect changes to the way the configuration is specified. We'll probably extend the CLI instead of relying on environment variables in a future version.
|
||||
|
||||
Thanks to Jeff Bartolotta and Roopa Mohan for contributing this!
|
||||
The PMD PLSQL parser might not parse every valid PL/SQL code without problems.
|
||||
In order to still use PMD on such files, you can now mark certain lines for exclusion from
|
||||
the parser. More information can be found in the [language specific documentation for PLSQL](pmd_languages_plsql.html).
|
||||
|
||||
### Fixed Issues
|
||||
|
||||
* core
|
||||
* [#1939](https://github.com/pmd/pmd/issues/1939): \[core] XPath expressions return handling
|
||||
* [#1961](https://github.com/pmd/pmd/issues/1961): \[core] Text renderer should include name of violated rule
|
||||
* [#2874](https://github.com/pmd/pmd/pull/2874): \[core] Fix XMLRenderer with UTF-16
|
||||
* cs
|
||||
* [#2938](https://github.com/pmd/pmd/pull/2938): \[cs] CPD: ignoring using directives could not be disabled
|
||||
* apex-design
|
||||
* [#3142](https://github.com/pmd/pmd/issues/3142): \[apex] ExcessiveClassLength multiple warning on the same class
|
||||
* java
|
||||
* [#2911](https://github.com/pmd/pmd/issues/2911): \[java] `ClassTypeResolver#searchNodeNameForClass` leaks memory
|
||||
* [#2934](https://github.com/pmd/pmd/pull/2934): \[java] CompareObjectsWithEquals / UseEqualsToCompareStrings - False negatives with fields
|
||||
* [#2940](https://github.com/pmd/pmd/pull/2940): \[java] Catch additional TypeNotPresentExceptions / LinkageErrors
|
||||
* scala
|
||||
* [#2480](https://github.com/pmd/pmd/issues/2480): \[scala] Support CPD suppressions
|
||||
|
||||
|
||||
### API Changes
|
||||
|
||||
#### Deprecated API
|
||||
|
||||
|
||||
##### Around RuleSet parsing
|
||||
|
||||
* {% jdoc core::RuleSetFactory %} and {% jdoc core::RuleSetFactoryUtils %} have been deprecated in favor of {% jdoc core::RuleSetLoader %}. This is easier to configure, and more maintainable than the multiple overloads of `RuleSetFactoryUtils`.
|
||||
* Some static creation methods have been added to {% jdoc core::RuleSet %} for simple cases, eg {% jdoc core::RuleSet#forSingleRule(core::Rule) %}. These replace some counterparts in {% jdoc core::RuleSetFactory %}
|
||||
* Since {% jdoc core::RuleSets %} is also deprecated, many APIs that require a RuleSets instance now are deprecated, and have a counterpart that expects a `List<RuleSet>`.
|
||||
* {% jdoc core::RuleSetReferenceId %}, {% jdoc core::RuleSetReference %}, {% jdoc core::RuleSetFactoryCompatibility %} are deprecated. They are most likely not relevant outside of the implementation of pmd-core.
|
||||
|
||||
##### Around the `PMD` class
|
||||
|
||||
Many classes around PMD's entry point ({% jdoc core::PMD %}) have been deprecated as internal, including:
|
||||
* The contents of the packages {% jdoc_package core::cli %}, {% jdoc_package core::processor %}
|
||||
* {% jdoc core::SourceCodeProcessor %}
|
||||
* The constructors of {% jdoc core::PMD %} (the class will be made a utility class)
|
||||
|
||||
##### Miscellaneous
|
||||
|
||||
* {% jdoc !!java::lang.java.ast.ASTPackageDeclaration#getPackageNameImage() %},
|
||||
{% jdoc !!java::lang.java.ast.ASTTypeParameter#getParameterName() %}
|
||||
and the corresponding XPath attributes. In both cases they're replaced with a new method `getName`,
|
||||
the attribute is `@Name`.
|
||||
* {% jdoc !!java::lang.java.ast.ASTClassOrInterfaceBody#isAnonymousInnerClass() %},
|
||||
and {% jdoc !!java::lang.java.ast.ASTClassOrInterfaceBody#isEnumChild() %},
|
||||
refs [#905](https://github.com/pmd/pmd/issues/905)
|
||||
|
||||
#### Internal API
|
||||
|
||||
Those APIs are not intended to be used by clients, and will be hidden or removed with PMD 7.0.0.
|
||||
You can identify them with the `@InternalApi` annotation. You'll also get a deprecation warning.
|
||||
|
||||
* {% jdoc !!javascript::lang.ecmascript.Ecmascript3Handler %}
|
||||
* {% jdoc !!javascript::lang.ecmascript.Ecmascript3Parser %}
|
||||
* {% jdoc !!javascript::lang.ecmascript.ast.EcmascriptParser#parserOptions %}
|
||||
* {% jdoc !!javascript::lang.ecmascript.ast.EcmascriptParser#getSuppressMap() %}
|
||||
* {% jdoc !!core::lang.rule.ParametricRuleViolation %}
|
||||
* {% jdoc !!core::lang.ParserOptions#suppressMarker %}
|
||||
* {% jdoc !!modelica::lang.modelica.rule.ModelicaRuleViolationFactory %}
|
||||
|
||||
* [#3117](https://github.com/pmd/pmd/issues/3117): \[java] Infinite loop when parsing invalid code nested in lambdas
|
||||
* [#3145](https://github.com/pmd/pmd/issues/3145): \[java] Parse exception when using "record" as variable name
|
||||
* java-bestpractices
|
||||
* [#3118](https://github.com/pmd/pmd/issues/3118): \[java] UnusedPrivateMethod false positive when passing in lombok.val as argument
|
||||
* [#3144](https://github.com/pmd/pmd/issues/3144): \[java] GuardLogStatement can have more detailed example
|
||||
* [#3155](https://github.com/pmd/pmd/pull/3155): \[java] GuardLogStatement: False negative with unguarded method call
|
||||
* [#3160](https://github.com/pmd/pmd/issues/3160): \[java] MethodReturnsInternalArray does not consider static final fields and fields initialized with empty array
|
||||
* java-errorprone
|
||||
* [#2977](https://github.com/pmd/pmd/issues/2977): \[java] CloseResource: false positive with reassignment detection
|
||||
* [#3146](https://github.com/pmd/pmd/issues/3146): \[java] InvalidLogMessageFormat detection failing when String.format used
|
||||
* [#3148](https://github.com/pmd/pmd/issues/3148): \[java] CloseResource false positive with Objects.nonNull
|
||||
* [#3165](https://github.com/pmd/pmd/issues/3165): \[java] InvalidLogMessageFormat detection failing when String.format used in a variable
|
||||
* java-performance
|
||||
* [#2427](https://github.com/pmd/pmd/issues/2427): \[java] ConsecutiveLiteralAppend false-positive with builder inside lambda
|
||||
* [#3152](https://github.com/pmd/pmd/issues/3152): \[java] ConsecutiveLiteralAppends and InsufficientStringBufferDeclaration: FP with switch expressions
|
||||
* plsql
|
||||
* [#195](https://github.com/pmd/pmd/issues/195): \[plsql] Ampersand '&' causes PMD processing error in sql file - Lexical error in file
|
||||
|
||||
### External Contributions
|
||||
|
||||
* [#2864](https://github.com/pmd/pmd/pull/2864): [vf] Provide expression type information to Visualforce rules to avoid false positives - [Jeff Bartolotta](https://github.com/jbartolotta-sfdc)
|
||||
* [#2914](https://github.com/pmd/pmd/pull/2914): \[core] Include rule name in text renderer - [Gunther Schrijvers](https://github.com/GuntherSchrijvers)
|
||||
* [#2925](https://github.com/pmd/pmd/pull/2925): Cleanup: Correct annotation array initializer indents from checkstyle #8083 - [Abhishek Kumar](https://github.com/Abhishek-kumar09)
|
||||
* [#2929](https://github.com/pmd/pmd/pull/2929): \[scala] Add support for CPD-ON and CPD-OFF special comments - [Andy Robinson](https://github.com/andyrobinson)
|
||||
* [#2936](https://github.com/pmd/pmd/pull/2936): \[java] (doc) Fix typo: "an accessor" not "a" - [Igor Moreno](https://github.com/igormoreno)
|
||||
* [#2938](https://github.com/pmd/pmd/pull/2938): \[cs] CPD: fix issue where ignoring using directives could not be disabled - [Maikel Steneker](https://github.com/maikelsteneker)
|
||||
* [#2945](https://github.com/pmd/pmd/pull/2945): \[cs] Add option to ignore sequences of literals - [Maikel Steneker](https://github.com/maikelsteneker)
|
||||
* [#2962](https://github.com/pmd/pmd/pull/2962): \[cpp] Add support for C++ 14 binary literals - [Maikel Steneker](https://github.com/maikelsteneker)
|
||||
* [#3161](https://github.com/pmd/pmd/pull/3161): \[plsql] Add support for lexical parameters in SQL*Plus scripts, allow excluding lines which the parser does not understand - [Henning von Bargen](https://github.com/hvbtup)
|
||||
* [#3167](https://github.com/pmd/pmd/pull/3167): \[java] Minor typo in quickstart ruleset - [Austin Tice](https://github.com/AustinTice)
|
||||
|
||||
### Stats
|
||||
* 190 commits
|
||||
* 25 closed tickets & PRs
|
||||
* Days since last release: 49
|
||||
* 49 commits
|
||||
* 27 closed tickets & PRs
|
||||
* Days since last release: 28
|
||||
|
||||
{% endtocmaker %}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,137 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
|
||||
"version": "2.1.0",
|
||||
"runs": [
|
||||
{
|
||||
"tool": {
|
||||
"driver": {
|
||||
"name": "PMD",
|
||||
"version": "<pmd-version>",
|
||||
"informationUri": "https://pmd.github.io/pmd/",
|
||||
"rules": [
|
||||
{
|
||||
"id": "ApexSharingViolations",
|
||||
"shortDescription": {
|
||||
"text": "Apex classes should declare a sharing model if DML or SOQL/SOSL is used"
|
||||
},
|
||||
"helpUri": "https://pmd.github.io/pmd/pmd_rules_apex_security.html#apexsharingviolations",
|
||||
"properties": {
|
||||
"ruleset": "Security",
|
||||
"priority": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ApexDoc",
|
||||
"shortDescription": {
|
||||
"text": "Missing ApexDoc comment"
|
||||
},
|
||||
"helpUri": "https://pmd.github.io/pmd/pmd_rules_apex_documentation.html#apexdoc",
|
||||
"properties": {
|
||||
"ruleset": "Documentation",
|
||||
"priority": 3
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"results": [
|
||||
{
|
||||
"ruleId": "ApexSharingViolations",
|
||||
"ruleIndex": 0,
|
||||
"message": {
|
||||
"text": "Apex classes should declare a sharing model if DML or SOQL/SOSL is used"
|
||||
},
|
||||
"locations": [
|
||||
{
|
||||
"physicalLocation": {
|
||||
"artifactLocation": {
|
||||
"uri": "/Users/user/pmd/unhappy-soup/force-app/main/default/classes/ApexSOQLInjection.cls"
|
||||
},
|
||||
"region": {
|
||||
"startLine": 1,
|
||||
"startColumn": 14,
|
||||
"endLine": 1,
|
||||
"endColumn": 30
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"physicalLocation": {
|
||||
"artifactLocation": {
|
||||
"uri": "/Users/user/pmd/unhappy-soup/force-app/main/default/classes/ApexSharingViolations.cls"
|
||||
},
|
||||
"region": {
|
||||
"startLine": 1,
|
||||
"startColumn": 14,
|
||||
"endLine": 1,
|
||||
"endColumn": 34
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"ruleId": "ApexDoc",
|
||||
"ruleIndex": 1,
|
||||
"message": {
|
||||
"text": "Missing ApexDoc comment"
|
||||
},
|
||||
"locations": [
|
||||
{
|
||||
"physicalLocation": {
|
||||
"artifactLocation": {
|
||||
"uri": "/Users/user/pmd/unhappy-soup/force-app/main/default/classes/ApexSOQLInjection.cls"
|
||||
},
|
||||
"region": {
|
||||
"startLine": 1,
|
||||
"startColumn": 14,
|
||||
"endLine": 6,
|
||||
"endColumn": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"physicalLocation": {
|
||||
"artifactLocation": {
|
||||
"uri": "/Users/user/pmd/unhappy-soup/force-app/main/default/classes/ApexSOQLInjection.cls"
|
||||
},
|
||||
"region": {
|
||||
"startLine": 3,
|
||||
"startColumn": 17,
|
||||
"endLine": 5,
|
||||
"endColumn": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"physicalLocation": {
|
||||
"artifactLocation": {
|
||||
"uri": "/Users/user/pmd/unhappy-soup/force-app/main/default/classes/ApexSharingViolations.cls"
|
||||
},
|
||||
"region": {
|
||||
"startLine": 1,
|
||||
"startColumn": 14,
|
||||
"endLine": 6,
|
||||
"endColumn": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"physicalLocation": {
|
||||
"artifactLocation": {
|
||||
"uri": "/Users/user/pmd/unhappy-soup/force-app/main/default/classes/ApexSharingViolations.cls"
|
||||
},
|
||||
"region": {
|
||||
"startLine": 3,
|
||||
"startColumn": 14,
|
||||
"endLine": 5,
|
||||
"endColumn": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>net.sourceforge.pmd</groupId>
|
||||
<artifactId>pmd</artifactId>
|
||||
<version>6.30.0</version>
|
||||
<version>6.33.0</version>
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
Loaded 30 of 319 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user