forked from phoedos/pmd
Merge branch 'master' into port-properties
This commit is contained in:
commit
fd0416c85a
@ -7107,6 +7107,81 @@
|
||||
"bug",
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "dague1",
|
||||
"name": "dague1",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/42275566?v=4",
|
||||
"profile": "https://github.com/dague1",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "sfdcsteve",
|
||||
"name": "Steven Stearns",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/16338550?v=4",
|
||||
"profile": "https://github.com/sfdcsteve",
|
||||
"contributions": [
|
||||
"bug",
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "nirvikpatel",
|
||||
"name": "Nirvik Patel",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/76862984?v=4",
|
||||
"profile": "https://github.com/nirvikpatel",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "mohui1999",
|
||||
"name": "Seren",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/46819179?v=4",
|
||||
"profile": "https://github.com/mohui1999",
|
||||
"contributions": [
|
||||
"bug",
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "nwcm",
|
||||
"name": "nwcm",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/111259588?v=4",
|
||||
"profile": "https://github.com/nwcm",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "PimvanderLoos",
|
||||
"name": "Pim van der Loos",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/3114723?v=4",
|
||||
"profile": "https://github.com/PimvanderLoos",
|
||||
"contributions": [
|
||||
"code",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "joaodinissf",
|
||||
"name": "João Dinis Ferreira",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/6786818?v=4",
|
||||
"profile": "https://github.com/joaodinissf",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "wener-tiobe",
|
||||
"name": "Wener",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/85687939?v=4",
|
||||
"profile": "https://github.com/wener-tiobe",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
}
|
||||
],
|
||||
"contributorsPerLine": 7,
|
||||
|
@ -138,7 +138,7 @@ f=check-environment.sh; \
|
||||
|
||||
Calling `.ci/build.sh` directly would re-release the tag $TAG_NAME - that's why it is commented out.
|
||||
All the side-effects of a release would be carried out like creating and publishing a release on github,
|
||||
uploading the release to sourceforge, uploading the docs to pmd.github.io/docs.pmd-code.org, uploading a
|
||||
uploading the release to sourceforge, uploading the docs to docs.pmd-code.org, uploading a
|
||||
new baseline for the regression tester and so on. While the release should be reproducible and therefore should
|
||||
produce exactly the same artifacts, re-uploading artifacts is not desired just for testing.
|
||||
|
||||
|
53
.ci/build.sh
53
.ci/build.sh
@ -55,6 +55,13 @@ function build() {
|
||||
# stop early for invalid maven version and branch/tag combination
|
||||
pmd_ci_maven_verify_version || exit 0
|
||||
|
||||
# skip tests when doing a release build - this makes the process faster
|
||||
# it's a manual task now to verify that a release is only started, when the main branch
|
||||
# was green before. This is usually checked via a local build, see ./do-release.sh
|
||||
if pmd_ci_maven_isReleaseBuild; then
|
||||
PMD_MAVEN_EXTRA_OPTS+=(-DskipTests=true)
|
||||
fi
|
||||
|
||||
if [ "$(pmd_ci_utils_get_os)" != "linux" ]; then
|
||||
pmd_ci_log_group_start "Build with mvnw"
|
||||
./mvnw clean verify --show-version --errors --batch-mode --no-transfer-progress "${PMD_MAVEN_EXTRA_OPTS[@]}"
|
||||
@ -176,9 +183,14 @@ function pmd_ci_build_run() {
|
||||
# Deploys the binary distribution
|
||||
#
|
||||
function pmd_ci_deploy_build_artifacts() {
|
||||
# Deploy to sourceforge files
|
||||
# Deploy to sourceforge files https://sourceforge.net/projects/pmd/files/pmd/
|
||||
pmd_ci_sourceforge_uploadFile "pmd/${PMD_CI_MAVEN_PROJECT_VERSION}" "pmd-dist/target/pmd-bin-${PMD_CI_MAVEN_PROJECT_VERSION}.zip"
|
||||
pmd_ci_sourceforge_uploadFile "pmd/${PMD_CI_MAVEN_PROJECT_VERSION}" "pmd-dist/target/pmd-src-${PMD_CI_MAVEN_PROJECT_VERSION}.zip"
|
||||
# Deploy SBOM
|
||||
cp pmd-dist/target/bom.xml "pmd-dist/target/pmd-${PMD_CI_MAVEN_PROJECT_VERSION}-cyclonedx.xml"
|
||||
cp pmd-dist/target/bom.json "pmd-dist/target/pmd-${PMD_CI_MAVEN_PROJECT_VERSION}-cyclonedx.json"
|
||||
pmd_ci_sourceforge_uploadFile "pmd/${PMD_CI_MAVEN_PROJECT_VERSION}" "pmd-dist/target/pmd-${PMD_CI_MAVEN_PROJECT_VERSION}-cyclonedx.xml"
|
||||
pmd_ci_sourceforge_uploadFile "pmd/${PMD_CI_MAVEN_PROJECT_VERSION}" "pmd-dist/target/pmd-${PMD_CI_MAVEN_PROJECT_VERSION}-cyclonedx.json"
|
||||
|
||||
if pmd_ci_maven_isReleaseBuild; then
|
||||
# create a draft github release
|
||||
@ -188,11 +200,15 @@ function pmd_ci_deploy_build_artifacts() {
|
||||
# Deploy to github releases
|
||||
pmd_ci_gh_releases_uploadAsset "$GH_RELEASE" "pmd-dist/target/pmd-bin-${PMD_CI_MAVEN_PROJECT_VERSION}.zip"
|
||||
pmd_ci_gh_releases_uploadAsset "$GH_RELEASE" "pmd-dist/target/pmd-src-${PMD_CI_MAVEN_PROJECT_VERSION}.zip"
|
||||
# Deploy SBOM
|
||||
pmd_ci_gh_releases_uploadAsset "$GH_RELEASE" "pmd-dist/target/pmd-${PMD_CI_MAVEN_PROJECT_VERSION}-cyclonedx.xml"
|
||||
pmd_ci_gh_releases_uploadAsset "$GH_RELEASE" "pmd-dist/target/pmd-${PMD_CI_MAVEN_PROJECT_VERSION}-cyclonedx.json"
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Builds and uploads the documentation site
|
||||
# Renders release notes and uploads them as ReadMe.md to sourceforge
|
||||
#
|
||||
function pmd_ci_build_and_upload_doc() {
|
||||
pmd_doc_generate_jekyll_site
|
||||
@ -208,8 +224,22 @@ function pmd_ci_build_and_upload_doc() {
|
||||
# Deploy javadoc to https://docs.pmd-code.org/apidocs/*/${PMD_CI_MAVEN_PROJECT_VERSION}/
|
||||
pmd_code_uploadJavadoc "${PMD_CI_MAVEN_PROJECT_VERSION}" "$(pwd)"
|
||||
|
||||
# render release notes
|
||||
# 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
|
||||
rendered_release_notes=$(bundle exec docs/render_release_notes.rb docs/pages/release_notes.md | tail -n +6)
|
||||
local release_name
|
||||
release_name="PMD ${PMD_CI_MAVEN_PROJECT_VERSION} ($(date -u +%d-%B-%Y))"
|
||||
# Upload to https://sourceforge.net/projects/pmd/files/pmd/${PMD_CI_MAVEN_PROJECT_VERSION}/ReadMe.md
|
||||
pmd_ci_sourceforge_uploadReleaseNotes "pmd/${PMD_CI_MAVEN_PROJECT_VERSION}" "${rendered_release_notes}"
|
||||
|
||||
if pmd_ci_maven_isSnapshotBuild && [ "${PMD_CI_BRANCH}" = "master" ]; then
|
||||
# only for snapshot builds from branch master
|
||||
# only for snapshot builds from branch master: https://docs.pmd-code.org/snapshot -> pmd-doc-${PMD_CI_MAVEN_PROJECT_VERSION}
|
||||
pmd_code_createSymlink "${PMD_CI_MAVEN_PROJECT_VERSION}" "snapshot"
|
||||
|
||||
# update github pages https://pmd.github.io/pmd/
|
||||
@ -224,34 +254,23 @@ function pmd_ci_build_and_upload_doc() {
|
||||
pmd_code_createSymlink "${PMD_CI_MAVEN_PROJECT_VERSION}" "latest"
|
||||
# remove old doc and point to the new version
|
||||
pmd_code_removeDocumentation "${PMD_CI_MAVEN_PROJECT_VERSION}-SNAPSHOT"
|
||||
pmd_code_createSymlink "${PMD_CI_MAVEN_PROJECT_VERSION}" "${PMD_CI_MAVEN_PROJECT_VERSION}-SNAPSHOT"
|
||||
pmd_code_createSymlink "${PMD_CI_MAVEN_PROJECT_VERSION}" "pmd-doc-${PMD_CI_MAVEN_PROJECT_VERSION}-SNAPSHOT"
|
||||
# remove old javadoc
|
||||
pmd_code_removeJavadoc "${PMD_CI_MAVEN_PROJECT_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
|
||||
rendered_release_notes=$(bundle exec docs/render_release_notes.rb docs/pages/release_notes.md | tail -n +6)
|
||||
local release_name
|
||||
release_name="PMD ${PMD_CI_MAVEN_PROJECT_VERSION} ($(date -u +%d-%B-%Y))"
|
||||
# github release only for releases
|
||||
pmd_ci_gh_releases_updateRelease "$GH_RELEASE" "$release_name" "${rendered_release_notes}"
|
||||
pmd_ci_sourceforge_uploadReleaseNotes "pmd/${PMD_CI_MAVEN_PROJECT_VERSION}" "${rendered_release_notes}"
|
||||
|
||||
local rendered_release_notes_with_links
|
||||
rendered_release_notes_with_links="
|
||||
* Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F${PMD_CI_MAVEN_PROJECT_VERSION}
|
||||
* Documentation: https://pmd.github.io/pmd-${PMD_CI_MAVEN_PROJECT_VERSION}/
|
||||
* Documentation: https://docs.pmd-code.org/pmd-doc-${PMD_CI_MAVEN_PROJECT_VERSION}/
|
||||
|
||||
${rendered_release_notes}"
|
||||
pmd_ci_sourceforge_createDraftBlogPost "${release_name} released" "${rendered_release_notes_with_links}" "pmd,release"
|
||||
SF_BLOG_URL="${RESULT}"
|
||||
|
||||
# updates https://pmd.github.io/latest/ and https://pmd.github.io/pmd-${PMD_CI_MAVEN_PROJECT_VERSION}
|
||||
publish_release_documentation_github
|
||||
# rsync site to https://pmd.sourceforge.io/pmd-${PMD_CI_MAVEN_PROJECT_VERSION}
|
||||
pmd_ci_sourceforge_rsyncSnapshotDocumentation "${PMD_CI_MAVEN_PROJECT_VERSION}" "pmd-${PMD_CI_MAVEN_PROJECT_VERSION}"
|
||||
fi
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ function pmd_code_uploadDocumentation() {
|
||||
scp "${filename}" ${PMD_CODE_SSH_USER}@pmd-code.org:${PMD_CODE_DOCS_PATH}
|
||||
# shellcheck disable=SC2029
|
||||
ssh ${PMD_CODE_SSH_USER}@pmd-code.org "cd \"${PMD_CODE_DOCS_PATH}\" && \
|
||||
( test -h pmd-doc-${pmdVersion} && rm pmd-doc-${pmdVersion} || true ) && \
|
||||
unzip -qo \"${basefilename}\" && \
|
||||
rm \"${basefilename}\""
|
||||
pmd_ci_log_info "Docs updated: https://docs.pmd-code.org/pmd-doc-${pmdVersion}/"
|
||||
|
@ -42,55 +42,7 @@ function pmd_doc_create_archive() {
|
||||
}
|
||||
|
||||
#
|
||||
# Publishes the site to https://pmd.github.io/pmd-${PMD_CI_MAVEN_PROJECT_VERSION} and
|
||||
# https://pmd.github.io/latest/
|
||||
#
|
||||
function publish_release_documentation_github() {
|
||||
echo -e "\n\n"
|
||||
pmd_ci_log_info "Adding the new doc to pmd.github.io..."
|
||||
# clone pmd.github.io. Note: This uses the ssh key setup earlier
|
||||
# In order to speed things up, we use a sparse checkout - no need to checkout all directories here
|
||||
mkdir pmd.github.io
|
||||
(
|
||||
cd pmd.github.io || { echo "Directory 'pmd.github.io' doesn't exist"; exit 1; }
|
||||
git init
|
||||
git config user.name "PMD CI (pmd-bot)"
|
||||
git config user.email "pmd-bot@users.noreply.github.com"
|
||||
git config core.sparsecheckout true
|
||||
git remote add origin git@github.com-pmd.github.io:pmd/pmd.github.io.git
|
||||
echo "/latest/" > .git/info/sparse-checkout
|
||||
echo "/sitemap.xml" >> .git/info/sparse-checkout
|
||||
git pull --depth=1 origin master
|
||||
pmd_ci_log_info "Copying documentation from ../docs/pmd-doc-${PMD_CI_MAVEN_PROJECT_VERSION}/ to pmd-${PMD_CI_MAVEN_PROJECT_VERSION}/ ..."
|
||||
rsync -ah --stats "../docs/pmd-doc-${PMD_CI_MAVEN_PROJECT_VERSION}/" "pmd-${PMD_CI_MAVEN_PROJECT_VERSION}/"
|
||||
git status
|
||||
pmd_ci_log_debug "Executing: git add pmd-${PMD_CI_MAVEN_PROJECT_VERSION}"
|
||||
git add --sparse "pmd-${PMD_CI_MAVEN_PROJECT_VERSION}"
|
||||
pmd_ci_log_debug "Executing: git commit..."
|
||||
git commit -q -m "Added pmd-${PMD_CI_MAVEN_PROJECT_VERSION}"
|
||||
|
||||
pmd_ci_log_info "Copying pmd-${PMD_CI_MAVEN_PROJECT_VERSION} to latest ..."
|
||||
git rm -qr latest
|
||||
cp -a "pmd-${PMD_CI_MAVEN_PROJECT_VERSION}" latest
|
||||
pmd_ci_log_debug "Executing: git add latest"
|
||||
git add latest
|
||||
pmd_ci_log_debug "Executing: git commit..."
|
||||
git commit -q -m "Copying pmd-${PMD_CI_MAVEN_PROJECT_VERSION} to latest"
|
||||
|
||||
pmd_ci_log_info "Generating sitemap.xml"
|
||||
../docs/sitemap_generator.sh > sitemap.xml
|
||||
pmd_ci_log_debug "Executing: git add sitemap.xml"
|
||||
git add sitemap.xml
|
||||
pmd_ci_log_debug "Executing: git commit..."
|
||||
git commit -q -m "Generated sitemap.xml"
|
||||
|
||||
pmd_ci_log_info "Executing: git push origin master"
|
||||
git push origin master
|
||||
)
|
||||
}
|
||||
|
||||
#
|
||||
# Updates github pages of the main repository,
|
||||
# Updates github pages branch "gh-pages" of the main repository,
|
||||
# so that https://pmd.github.io/pmd/ has the latest (snapshot) content
|
||||
#
|
||||
function pmd_doc_publish_to_github_pages() {
|
||||
|
@ -50,6 +50,7 @@ function regression_tester_uploadBaseline() {
|
||||
--patch-branch "${baseline_branch}" \
|
||||
--patch-config ./pmd/.ci/files/all-regression-rules.xml \
|
||||
--list-of-project ./pmd/.ci/files/project-list.xml --html-flag \
|
||||
--threads "$(nproc)" \
|
||||
--error-recovery
|
||||
pushd target/reports || { echo "Directory 'target/reports' doesn't exist"; exit 1; }
|
||||
BRANCH_FILENAME="${baseline_branch/\//_}"
|
||||
|
@ -13,7 +13,7 @@ assignees: ''
|
||||
**Rule:**
|
||||
|
||||
Please provide the rule name and a link to the rule documentation:
|
||||
<https://pmd.github.io/latest/pmd_rules_XXX_XXX.html#XXX>
|
||||
<https://docs.pmd-code.org/latest/pmd_rules_XXX_XXX.html#XXX>
|
||||
|
||||
**Description:**
|
||||
|
||||
|
@ -13,7 +13,7 @@ assignees: ''
|
||||
**Rule:**
|
||||
|
||||
Please provide the rule name and a link to the rule documentation:
|
||||
<https://pmd.github.io/latest/pmd_rules_XXX_XXX.html#XXX>
|
||||
<https://docs.pmd-code.org/latest/pmd_rules_XXX_XXX.html#XXX>
|
||||
|
||||
**Description:**
|
||||
|
||||
|
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
@ -5,7 +5,6 @@ on:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
- pmd/7.0.x
|
||||
- experimental-apex-parser
|
||||
tags:
|
||||
- '**'
|
||||
@ -56,7 +55,7 @@ jobs:
|
||||
run: |
|
||||
echo "LANG=en_US.UTF-8" >> $GITHUB_ENV
|
||||
echo "MAVEN_OPTS=-Dmaven.wagon.httpconnectionManager.ttlSeconds=180 -Dmaven.wagon.http.retryHandler.count=3 -DautoReleaseAfterClose=true -DstagingProgressTimeoutMinutes=30" >> $GITHUB_ENV
|
||||
echo "PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/20/scripts" >> $GITHUB_ENV
|
||||
echo "PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/21/scripts" >> $GITHUB_ENV
|
||||
- name: Check Environment
|
||||
shell: bash
|
||||
run: |
|
||||
|
3
.github/workflows/git-repo-sync.yml
vendored
3
.github/workflows/git-repo-sync.yml
vendored
@ -5,7 +5,6 @@ on:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
- pmd/7.0.x
|
||||
tags:
|
||||
- '**'
|
||||
workflow_dispatch:
|
||||
@ -25,7 +24,7 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
echo "LANG=en_US.UTF-8" >> $GITHUB_ENV
|
||||
echo "PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/20/scripts" >> $GITHUB_ENV
|
||||
echo "PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/21/scripts" >> $GITHUB_ENV
|
||||
- name: Sync
|
||||
run: .ci/git-repo-sync.sh
|
||||
shell: bash
|
||||
|
2
.github/workflows/troubleshooting.yml
vendored
2
.github/workflows/troubleshooting.yml
vendored
@ -36,7 +36,7 @@ jobs:
|
||||
run: |
|
||||
echo "LANG=en_US.UTF-8" >> $GITHUB_ENV
|
||||
echo "MAVEN_OPTS=-Dmaven.wagon.httpconnectionManager.ttlSeconds=180 -Dmaven.wagon.http.retryHandler.count=3 -DstagingProgressTimeoutMinutes=30" >> $GITHUB_ENV
|
||||
echo "PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/20/scripts" >> $GITHUB_ENV
|
||||
echo "PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/21/scripts" >> $GITHUB_ENV
|
||||
- name: Check Environment
|
||||
shell: bash
|
||||
run: |
|
||||
|
@ -33,11 +33,11 @@ When filing a bug report, please provide as much information as possible, so tha
|
||||
|
||||
## Documentation
|
||||
|
||||
There is some documentation available under <https://pmd.github.io/latest>. Feel free to create a bug report if
|
||||
There is some documentation available under <https://docs.pmd-code.org/latest>. Feel free to create a bug report if
|
||||
documentation is missing, incomplete or outdated. See [Bug reports](#bug-reports).
|
||||
|
||||
The documentation is generated as a Jekyll site, the source is available at: <https://github.com/pmd/pmd/tree/master/docs>. You can find build instructions there.
|
||||
For more on contributing documentation check <https://pmd.github.io/pmd/pmd_devdocs_writing_documentation.html>
|
||||
For more on contributing documentation check <https://docs.pmd-code.org/latest/pmd_devdocs_writing_documentation.html>
|
||||
|
||||
## Questions
|
||||
|
||||
|
@ -2,6 +2,7 @@ require 'pmdtester'
|
||||
require 'time'
|
||||
require 'logger'
|
||||
require 'fileutils'
|
||||
require 'etc'
|
||||
|
||||
@logger = Logger.new(STDOUT)
|
||||
|
||||
@ -16,6 +17,7 @@ def get_args(base_branch, autogen = TRUE, patch_config = './pmd/.ci/files/all-re
|
||||
'--keep-reports',
|
||||
'--error-recovery',
|
||||
'--baseline-download-url', 'https://pmd-code.org/pmd-regression-tester/',
|
||||
'--threads', Etc.nprocessors.to_s,
|
||||
# '--debug',
|
||||
]
|
||||
end
|
||||
|
14
Gemfile.lock
14
Gemfile.lock
@ -1,7 +1,7 @@
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
addressable (2.8.1)
|
||||
addressable (2.8.4)
|
||||
public_suffix (>= 2.0.2, < 6.0)
|
||||
claide (1.1.0)
|
||||
claide-plugins (0.9.2)
|
||||
@ -9,7 +9,7 @@ GEM
|
||||
nap
|
||||
open4 (~> 1.3)
|
||||
colored2 (3.1.2)
|
||||
concurrent-ruby (1.2.0)
|
||||
concurrent-ruby (1.2.2)
|
||||
cork (0.3.0)
|
||||
colored2 (~> 3.1)
|
||||
danger (9.2.0)
|
||||
@ -31,13 +31,13 @@ GEM
|
||||
faraday (2.7.4)
|
||||
faraday-net_http (>= 2.0, < 3.1)
|
||||
ruby2_keywords (>= 0.0.4)
|
||||
faraday-http-cache (2.4.1)
|
||||
faraday-http-cache (2.5.0)
|
||||
faraday (>= 0.8)
|
||||
faraday-net_http (3.0.2)
|
||||
fugit (1.8.1)
|
||||
et-orbi (~> 1, >= 1.2.7)
|
||||
raabro (~> 1.4)
|
||||
git (1.13.1)
|
||||
git (1.18.0)
|
||||
addressable (~> 2.8)
|
||||
rchardet (~> 1.8)
|
||||
kramdown (2.4.0)
|
||||
@ -49,7 +49,7 @@ GEM
|
||||
mini_portile2 (2.8.1)
|
||||
nap (1.1.0)
|
||||
no_proxy_fix (0.1.2)
|
||||
nokogiri (1.14.1)
|
||||
nokogiri (1.14.3)
|
||||
mini_portile2 (~> 2.8.0)
|
||||
racc (~> 1.4)
|
||||
octokit (5.6.1)
|
||||
@ -68,7 +68,7 @@ GEM
|
||||
racc (1.6.2)
|
||||
rchardet (1.8.0)
|
||||
rexml (3.2.5)
|
||||
rouge (4.0.1)
|
||||
rouge (4.1.0)
|
||||
ruby2_keywords (0.0.5)
|
||||
rufus-scheduler (3.8.2)
|
||||
fugit (~> 1.1, >= 1.1.6)
|
||||
@ -76,7 +76,7 @@ GEM
|
||||
sawyer (0.9.2)
|
||||
addressable (>= 2.3.5)
|
||||
faraday (>= 0.17.3, < 3)
|
||||
slop (4.9.3)
|
||||
slop (4.10.1)
|
||||
terminal-table (3.0.2)
|
||||
unicode-display_width (>= 1.1.1, < 3)
|
||||
tzinfo (2.0.6)
|
||||
|
10
README.md
10
README.md
@ -9,7 +9,7 @@
|
||||
[![Coverage Status](https://coveralls.io/repos/github/pmd/pmd/badge.svg)](https://coveralls.io/github/pmd/pmd)
|
||||
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/ea550046a02344ec850553476c4aa2ca)](https://www.codacy.com/gh/pmd/pmd/dashboard?utm_source=github.com&utm_medium=referral&utm_content=pmd/pmd&utm_campaign=Badge_Grade)
|
||||
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](code_of_conduct.md)
|
||||
[![Documentation (latest)](https://img.shields.io/badge/docs-latest-green)](https://pmd.github.io/latest/)
|
||||
[![Documentation (latest)](https://img.shields.io/badge/docs-latest-green)](https://docs.pmd-code.org/latest/)
|
||||
|
||||
**PMD** is a source code analyzer. It finds common programming flaws like unused variables, empty catch blocks,
|
||||
unnecessary object creation, and so forth. It supports many languages. It can be extended with custom rules.
|
||||
@ -32,9 +32,9 @@ it makes sense.
|
||||
Download the latest binary zip from the [releases](https://github.com/pmd/pmd/releases/latest)
|
||||
and extract it somewhere.
|
||||
|
||||
Execute `bin/run.sh pmd` or `bin\pmd.bat`.
|
||||
Execute `bin/pmd check` or `bin\pmd.bat check`.
|
||||
|
||||
See also [Getting Started](https://pmd.github.io/latest/pmd_userdocs_installation.html)
|
||||
See also [Getting Started](https://docs.pmd-code.org/latest/pmd_userdocs_installation.html)
|
||||
|
||||
**Demo:**
|
||||
|
||||
@ -43,7 +43,7 @@ This shows how PMD can detect for loops, that can be replaced by for-each loops.
|
||||
![Demo](docs/images/userdocs/pmd-demo.gif)
|
||||
|
||||
There are plugins for Maven and Gradle as well as for various IDEs.
|
||||
See [Tools / Integrations](https://pmd.github.io/latest/pmd_userdocs_tools.html)
|
||||
See [Tools / Integrations](https://docs.pmd-code.org/latest/pmd_userdocs_tools.html)
|
||||
|
||||
## ℹ️ How to get support?
|
||||
|
||||
@ -54,7 +54,7 @@ See [Tools / Integrations](https://pmd.github.io/latest/pmd_userdocs_tools.html)
|
||||
* 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 -- create a new [discussion](https://github.com/pmd/pmd/discussions).
|
||||
* I have a quick question -- ask in our [Gitter room](https://app.gitter.im/#/room/#pmd_pmd:gitter.im).
|
||||
* Where's your documentation? -- <https://pmd.github.io/latest/>
|
||||
* Where's your documentation? -- <https://docs.pmd-code.org/latest/>
|
||||
|
||||
## 🤝 Contributing
|
||||
|
||||
|
@ -15,17 +15,18 @@ if [ ! -f pom.xml ] || [ ! -d ../pmd.github.io ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LAST_VERSION=
|
||||
RELEASE_VERSION=
|
||||
DEVELOPMENT_VERSION=
|
||||
CURRENT_BRANCH=
|
||||
|
||||
echo "-------------------------------------------"
|
||||
echo "Releasing PMD"
|
||||
echo "-------------------------------------------"
|
||||
|
||||
CURRENT_VERSION=$(./mvnw org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.version -q -DforceStdout)
|
||||
RELEASE_VERSION=${CURRENT_VERSION%-SNAPSHOT}
|
||||
# allow to override the release version, e.g. via "RELEASE_VERSION=7.0.0-rc1 ./do-release.sh"
|
||||
if [ "$RELEASE_VERSION" = "" ]; then
|
||||
CURRENT_VERSION=$(./mvnw org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.version -q -DforceStdout)
|
||||
RELEASE_VERSION=${CURRENT_VERSION%-SNAPSHOT}
|
||||
fi
|
||||
|
||||
MAJOR=$(echo "$RELEASE_VERSION" | cut -d . -f 1)
|
||||
MINOR=$(echo "$RELEASE_VERSION" | cut -d . -f 2)
|
||||
PATCH=$(echo "$RELEASE_VERSION" | cut -d . -f 3)
|
||||
@ -41,15 +42,16 @@ else
|
||||
LAST_MINOR="${MINOR}"
|
||||
LAST_PATCH=$(("${PATCH}" - 1))
|
||||
fi
|
||||
LAST_VERSION="$MAJOR.$LAST_MINOR.$LAST_PATCH"
|
||||
DEVELOPMENT_VERSION="$MAJOR.$NEXT_MINOR.$NEXT_PATCH"
|
||||
DEVELOPMENT_VERSION="${DEVELOPMENT_VERSION}-SNAPSHOT"
|
||||
|
||||
# allow to override the next version, e.g. via "NEXT_VERSION=7.0.0 ./do-release.sh"
|
||||
if [ "$NEXT_VERSION" != "" ]; then
|
||||
DEVELOPMENT_VERSION="${NEXT_VERSION}-SNAPSHOT"
|
||||
# allow to override the next version, e.g. via "DEVELOPMENT_VERSION=7.0.0-SNAPSHOT ./do-release.sh"
|
||||
if [ "$DEVELOPMENT_VERSION" = "" ]; then
|
||||
DEVELOPMENT_VERSION="$MAJOR.$NEXT_MINOR.$NEXT_PATCH-SNAPSHOT"
|
||||
fi
|
||||
|
||||
# allow to override the last version, e.g. via "LAST_VERSION=6.55.0 ./do-release.sh"
|
||||
if [ "$LAST_VERSION" = "" ]; then
|
||||
LAST_VERSION="$MAJOR.$LAST_MINOR.$LAST_PATCH"
|
||||
fi
|
||||
|
||||
# http://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch
|
||||
CURRENT_BRANCH=$(git symbolic-ref -q HEAD)
|
||||
@ -109,7 +111,7 @@ read -r
|
||||
# calculating stats for release notes
|
||||
|
||||
STATS=$(
|
||||
echo "### Stats"
|
||||
echo "### 📈 Stats"
|
||||
echo "* $(git log pmd_releases/"${LAST_VERSION}"..HEAD --oneline --no-merges |wc -l) commits"
|
||||
echo "* $(curl -s "https://api.github.com/repos/pmd/pmd/milestones?state=all&direction=desc&per_page=5"|jq ".[] | select(.title == \"$RELEASE_VERSION\") | .closed_issues") closed tickets & PRs"
|
||||
echo "* Days since last release: $(( ( $(date +%s) - $(git log --max-count=1 --format="%at" pmd_releases/"${LAST_VERSION}") ) / 86400))"
|
||||
@ -167,6 +169,7 @@ git commit -a -m "Prepare pmd release ${RELEASE_VERSION}"
|
||||
-Dtag="pmd_releases/${RELEASE_VERSION}" \
|
||||
-DreleaseVersion="${RELEASE_VERSION}" \
|
||||
-DdevelopmentVersion="${DEVELOPMENT_VERSION}" \
|
||||
-DscmCommentPrefix="[release] " \
|
||||
-Pgenerate-rule-docs
|
||||
|
||||
|
||||
@ -217,13 +220,13 @@ This is a {{ site.pmd.release_type }} release.
|
||||
|
||||
{% tocmaker is_release_notes_processor %}
|
||||
|
||||
### New and noteworthy
|
||||
### 🚀 New and noteworthy
|
||||
|
||||
### Fixed Issues
|
||||
### 🐛 Fixed Issues
|
||||
|
||||
### API Changes
|
||||
### 🚨 API Changes
|
||||
|
||||
### External Contributions
|
||||
### ✨ External Contributions
|
||||
|
||||
{% endtocmaker %}
|
||||
|
||||
|
@ -1,22 +1,22 @@
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
activesupport (7.0.4.2)
|
||||
activesupport (7.0.4.3)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
i18n (>= 1.6, < 2)
|
||||
minitest (>= 5.1)
|
||||
tzinfo (~> 2.0)
|
||||
addressable (2.8.1)
|
||||
addressable (2.8.4)
|
||||
public_suffix (>= 2.0.2, < 6.0)
|
||||
coffee-script (2.4.1)
|
||||
coffee-script-source
|
||||
execjs
|
||||
coffee-script-source (1.11.1)
|
||||
colorator (1.1.0)
|
||||
commonmarker (0.23.8)
|
||||
concurrent-ruby (1.2.0)
|
||||
dnsruby (1.61.9)
|
||||
simpleidn (~> 0.1)
|
||||
commonmarker (0.23.9)
|
||||
concurrent-ruby (1.2.2)
|
||||
dnsruby (1.70.0)
|
||||
simpleidn (~> 0.2.1)
|
||||
em-websocket (0.5.3)
|
||||
eventmachine (>= 0.12.9)
|
||||
http_parser.rb (~> 0)
|
||||
@ -86,7 +86,7 @@ GEM
|
||||
activesupport (>= 2)
|
||||
nokogiri (>= 1.4)
|
||||
http_parser.rb (0.8.0)
|
||||
i18n (1.12.0)
|
||||
i18n (1.13.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
jekyll (3.9.3)
|
||||
addressable (~> 2.4)
|
||||
@ -210,8 +210,8 @@ GEM
|
||||
jekyll (>= 3.5, < 5.0)
|
||||
jekyll-feed (~> 0.9)
|
||||
jekyll-seo-tag (~> 2.1)
|
||||
minitest (5.17.0)
|
||||
nokogiri (1.14.1)
|
||||
minitest (5.18.0)
|
||||
nokogiri (1.14.3)
|
||||
mini_portile2 (~> 2.8.0)
|
||||
racc (~> 1.4)
|
||||
octokit (4.25.1)
|
||||
|
@ -1,8 +1,10 @@
|
||||
# PMD Documentation
|
||||
|
||||
The documentation is available at: <https://pmd.github.io/pmd/>
|
||||
The snapshot documentation (build by github pages) is available at: <https://pmd.github.io/pmd/>.
|
||||
|
||||
The documentation for the latest release is at: <https://pmd.github.io/latest/>
|
||||
The same documentation (build with our own scripts) is available at: <https://docs.pmd-code.org/snapshot/>.
|
||||
|
||||
The documentation for the latest release is at: <https://docs.pmd-code.org/latest/>
|
||||
|
||||
## Site Theme
|
||||
|
||||
|
@ -3,7 +3,7 @@ repository: pmd/pmd
|
||||
pmd:
|
||||
version: 7.0.0-SNAPSHOT
|
||||
previous_version: 6.55.0
|
||||
date: ??-?????-2023
|
||||
date: 27-May-2023
|
||||
release_type: major
|
||||
|
||||
# release types: major, minor, bugfix
|
||||
@ -44,7 +44,6 @@ exclude:
|
||||
- pdf-*.sh
|
||||
- pdfconfigs/
|
||||
- pdf/
|
||||
- sitemap_generator.sh
|
||||
- render_release_notes.rb
|
||||
|
||||
feedback_subject_line: PMD Source Code Analyzer
|
||||
@ -117,7 +116,7 @@ description: "Intended as a documentation theme based on Jekyll for technical wr
|
||||
# the description is used in the feed.xml file
|
||||
|
||||
# needed for sitemap.xml file only
|
||||
url: https://pmd.github.io/pmd
|
||||
url: https://docs.pmd-code.org/latest
|
||||
baseurl: ""
|
||||
|
||||
# used by javadoc_tag.rb
|
||||
|
@ -23,10 +23,10 @@ entries:
|
||||
output: web, pdf
|
||||
type: homepage
|
||||
- title: Release notes
|
||||
url: /pmd_release_notes7.html
|
||||
url: /pmd_release_notes.html
|
||||
output: web, pdf
|
||||
- title: PMD 7.0.0 development
|
||||
url: /pmd_next_major_development.html
|
||||
- title: Release notes (PMD 7)
|
||||
url: /pmd_release_notes_pmd7.html
|
||||
output: web, pdf
|
||||
- title: Getting help
|
||||
url: /pmd_about_help.html
|
||||
@ -409,6 +409,9 @@ entries:
|
||||
- title: Java
|
||||
url: /pmd_languages_java.html
|
||||
output: web, pdf
|
||||
- title: JavaScript / TypeScript
|
||||
url: /pmd_languages_js_ts.html
|
||||
output: web, pdf
|
||||
- title: JSP
|
||||
url: /pmd_languages_jsp.html
|
||||
output: web, pdf
|
||||
@ -430,6 +433,12 @@ entries:
|
||||
- title: Gherkin
|
||||
url: /pmd_languages_gherkin.html
|
||||
output: web, pdf
|
||||
- title: Julia
|
||||
url: /pmd_languages_julia.html
|
||||
output: web, pdf
|
||||
- title: Coco
|
||||
url: /pmd_languages_coco.html
|
||||
output: web, pdf
|
||||
- title: Developer Documentation
|
||||
output: web, pdf
|
||||
folderitems:
|
||||
@ -469,7 +478,7 @@ entries:
|
||||
- title: Adding a new language (JavaCC)
|
||||
url: /pmd_devdocs_major_adding_new_language_javacc.html
|
||||
output: web, pdf
|
||||
- title: Adding a new language (Antlr)
|
||||
- title: Adding a new language (ANTLR)
|
||||
url: /pmd_devdocs_major_adding_new_language_antlr.html
|
||||
output: web, pdf
|
||||
- title: Adding a new CPD language
|
||||
|
@ -9,7 +9,7 @@
|
||||
target="_blank"
|
||||
href="https://github.com/{{site.github_editme_path}}{{editmepath}}"
|
||||
role="button"
|
||||
><i class="fa fa-github fa-lg"></i> Edit on GitHub</a
|
||||
><i class="fab fa-github fa-lg"></i> Edit on GitHub</a
|
||||
>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@ -6,7 +6,7 @@
|
||||
<title>{{ page.title }} | {{ site.site_title }}</title>
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="assets/fontawesome-free-5.14.0-web/css/all.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="assets/fontawesome-free-5.15.4-web/css/all.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="assets/bootstrap-4.5.2-dist/css/bootstrap.min.css">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/syntax.css">
|
||||
@ -15,7 +15,7 @@
|
||||
<link rel="stylesheet" type="text/css" href="css/theme-green.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/pmd-customstyles.css">
|
||||
|
||||
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
|
||||
<link rel="icon" href="images/favicon.ico" type="image/x-icon">
|
||||
<link rel="shortcut icon" href="images/logo/favicon.ico" type="image/x-icon">
|
||||
<link rel="icon" href="images/logo/favicon.ico" type="image/x-icon">
|
||||
|
||||
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="feed.xml">
|
||||
|
@ -13,7 +13,7 @@
|
||||
href="https://github.com/{{site.github_editme_path}}{{editmepath}}"
|
||||
class="float-right"
|
||||
role="button"
|
||||
><i class="fa fa-github fa-lg"></i> Edit on GitHub</a
|
||||
><i class="fab fa-github fa-lg"></i> Edit on GitHub</a
|
||||
>
|
||||
{% endunless %} {% endif %}
|
||||
</div>
|
||||
|
@ -53,7 +53,7 @@ class RuleTag < Liquid::Tag
|
||||
# This is passed from the release notes processing script
|
||||
# When generating links for the release notes, the links should be absolute
|
||||
if context["is_release_notes_processor"]
|
||||
url_prefix = "https://pmd.github.io/pmd-#{context["site.pmd.version"]}/"
|
||||
url_prefix = "https://docs.pmd-code.org/pmd-doc-#{context["site.pmd.version"]}/"
|
||||
end
|
||||
|
||||
if @was_removed
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
Doc: https://fontawesome.com/how-to-use/on-the-web/setup/hosting-font-awesome-yourself
|
||||
|
||||
Download: https://use.fontawesome.com/releases/v5.14.0/fontawesome-free-5.14.0-web.zip
|
||||
Download: https://use.fontawesome.com/releases/v5.15.4/fontawesome-free-5.15.4-web.zip
|
||||
|
||||
## Bootstrap
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user