Replace more old URLs

This commit is contained in:
Andreas Dangel 2023-03-30 15:28:56 +02:00
parent 2e21c193fe
commit f7d0444d86
No known key found for this signature in database
GPG Key ID: 93450DF2DF9A3FA3
22 changed files with 64 additions and 71 deletions

View File

@ -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.

View File

@ -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:**

View File

@ -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:**

View File

@ -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

View File

@ -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&amp;utm_medium=referral&amp;utm_content=pmd/pmd&amp;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

View File

@ -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

View File

@ -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

View File

@ -27,12 +27,6 @@ It usually takes 15 minutes.
* There is also a sub page "news" which lists all news.
* Layout: [_layouts/news.html](https://github.com/pmd/pmd.github.io/blob/master/_layouts/news.html)
* Page (which is pretty empty): [news.html](https://github.com/pmd/pmd.github.io/blob/master/news.html)
* Documentation for the latest release: <https://pmd.github.io/latest/>
* The PMD documentation of the latest release is simply copied as static html into the folder [latest/](https://github.com/pmd/pmd.github.io/tree/master/latest).
This makes the latest release documentation available under the stable URL
<https://pmd.github.io/latest/>. This URL is also used for the [sitemap.xml](https://github.com/pmd/pmd.github.io/blob/master/sitemap.xml).
* Documentation for previous releases are still being kept under the folders `pmd-<version>/`.
## Building the page locally

View File

@ -45,7 +45,7 @@ e.g. it requires that the repo `pmd.github.io` is checked out aside the main pmd
The script `do-release.sh` is called in the directory `/home/joe/source/pmd` and searches for `../pmd.github.io`.
Also make sure, that the repo "pmd.github.io" is locally up to date and has no local changes.
Also make sure, that the repo "pmd.github.io" is locally up-to-date and has no local changes.
### The Release Notes and docs
@ -183,11 +183,8 @@ Here is, what happens:
* Remove old javadoc for the SNAPSHOT version, e.g. delete <https://docs.pmd-code.org/apidocs/pmd-core/6.34.0-SNAPSHOT/>.
* Create a draft news post on <https://sourceforge.net/p/pmd/news/> for the new release. This contains the
rendered release notes.
* Add the documentation of the new release to a subfolder on <https://pmd.github.io>, also make
this folder available as `latest`, so that <https://pmd.github.io/latest/> shows the new
version and <https://pmd.github.io/pmd-6.34.0/> is the URL for the specific release.
* Also copy the documentation to sourceforge's web space, so that it is available as
<https://pmd.sourceforge.io/pmd-6.34.0/>. All previously copied version are listed
* Copy the documentation to sourceforge's web space, so that it is available as
<https://pmd.sourceforge.io/pmd-6.34.0/>. All previously copied versions are listed
under <https://pmd.sourceforge.io/archive.phtml>.
* After all this is done, the release on github (<https://github.com/pmd/pmd/releases>) is published
and the news post on sourceforge (https://sourceforge.net/p/pmd/news/> is publishes as well.
@ -206,7 +203,7 @@ news:
* Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F<version>
* Documentation: https://pmd.github.io/pmd-<version>/
* Documentation: https://docs.pmd-code.org/pmd-doc-<version>/
And Copy-Paste the release notes
@ -219,20 +216,21 @@ Tweet on <https://twitter.com/pmd_analyzer>, eg.:
### Checklist
| Task | Description | URL | ☐ / ✔ |
|------|-------------|-----|-------|
| maven central | The new version of all artifacts are available in maven central | <https://repo.maven.apache.org/maven2/net/sourceforge/pmd/pmd/> | <input type="checkbox"> |
| github releases | A new release with 3 assets (bin, src, doc) is created | <https://github.com/pmd/pmd/releases> | <input type="checkbox"> |
| sourceforge files | The 3 assets (bin, src, doc) are uploaded, the new version is pre-selected as latest | <https://sourceforge.net/projects/pmd/files/pmd/> | <input type="checkbox"> |
| homepage | Main landing page points to new version, doc for new version is available | <https://pmd.github.io> | <input type="checkbox"> |
| homepage2 | New blogpost for the new release is posted | <https://pmd.github.io/#news> | <input type="checkbox"> |
| docs | New docs are uploaded | <https://docs.pmd-code.org/latest/> | <input type="checkbox"> |
| docs-archive | New docs are also on archive site | <https://pmd.sourceforge.io/archive.phtml> | <input type="checkbox"> |
| javadoc | New javadocs are uploaded | <https://docs.pmd-code.org/apidocs/> | <input type="checkbox"> |
| news | New blogpost on sourceforge is posted | <https://sourceforge.net/p/pmd/news/> | <input type="checkbox"> |
| regression-tester | New release baseline is uploaded | <https://pmd-code.org/pmd-regression-tester> | <input type="checkbox"> |
| mailing list | announcement on mailing list is sent | <https://sourceforge.net/p/pmd/mailman/pmd-devel/> | <input type="checkbox"> |
| twitter | tweet about the new release | <https://twitter.com/pmd_analyzer> | <input type="checkbox"> |
| Task | Description | URL | ☐ / ✔ |
|-------------------|--------------------------------------------------------------------------------------|-----------------------------------------------------------------|-------------------------|
| maven central | The new version of all artifacts are available in maven central | <https://repo.maven.apache.org/maven2/net/sourceforge/pmd/pmd/> | <input type="checkbox"> |
| github releases | A new release with 3 assets (bin, src, doc) is created | <https://github.com/pmd/pmd/releases> | <input type="checkbox"> |
| sourceforge files | The 3 assets (bin, src, doc) are uploaded, the new version is pre-selected as latest | <https://sourceforge.net/projects/pmd/files/pmd/> | <input type="checkbox"> |
| homepage | Main landing page points to new version, doc for new version is available | <https://pmd.github.io> | <input type="checkbox"> |
| homepage2 | New blogpost for the new release is posted | <https://pmd.github.io/#news> | <input type="checkbox"> |
| docs | New docs are uploaded | <https://docs.pmd-code.org/latest/> | <input type="checkbox"> |
| docs2 | New version in the docs is listed under "Version specific documentation" | <https://docs.pmd-code.org/> | <input type="checkbox"> |
| docs-archive | New docs are also on archive site | <https://pmd.sourceforge.io/archive.phtml> | <input type="checkbox"> |
| javadoc | New javadocs are uploaded | <https://docs.pmd-code.org/apidocs/> | <input type="checkbox"> |
| news | New blogpost on sourceforge is posted | <https://sourceforge.net/p/pmd/news/> | <input type="checkbox"> |
| regression-tester | New release baseline is uploaded | <https://pmd-code.org/pmd-regression-tester> | <input type="checkbox"> |
| mailing list | announcement on mailing list is sent | <https://sourceforge.net/p/pmd/mailman/pmd-devel/> | <input type="checkbox"> |
| twitter | tweet about the new release | <https://twitter.com/pmd_analyzer> | <input type="checkbox"> |
## Prepare the next release
@ -309,7 +307,7 @@ In theory, the fixes should already be there, but you never now.
If releases from multiple branches are being done, the order matters. You should start from the "oldest" branch,
e.g. `pmd/5.4.x`, release from there. Then merge (see above) into the next branch, e.g. `pmd/5.5.x` and release
from there. Then merge into the `master` branch and release from there. This way, the last release done, becomes
automatically the latest release on <https://pmd.github.io/latest/> and on sourceforge.
automatically the latest release on <https://docs.pmd-code.org/latest/> and on sourceforge.
### (Optional) Create a new release branch

View File

@ -7,7 +7,7 @@
"driver": {
"name": "PMD",
"version": "<pmd-version>",
"informationUri": "https://pmd.github.io/pmd/",
"informationUri": "https://docs.pmd-code.org/latest/",
"rules": [
{
"id": "ApexSharingViolations",
@ -17,7 +17,7 @@
"fullDescription": {
"text": "Detect classes declared without explicit sharing mode if DML methods are used. This forces the developer to take access restrictions into account before modifying objects."
},
"helpUri": "https://pmd.github.io/pmd/pmd_rules_apex_security.html#apexsharingviolations",
"helpUri": "https://docs.pmd-code.org/latest/pmd_rules_apex_security.html#apexsharingviolations",
"help": {
"text": "Detect classes declared without explicit sharing mode if DML methods are used. This forces the developer to take access restrictions into account before modifying objects."
},
@ -37,7 +37,7 @@
"fullDescription": {
"text": "This rule validates that: ApexDoc comments are present for classes, methods, and properties that are public or global, excluding overrides and test classes (as well as the contents of test classes)."
},
"helpUri": "https://pmd.github.io/pmd/pmd_rules_apex_documentation.html#apexdoc",
"helpUri": "https://docs.pmd-code.org/latest/pmd_rules_apex_documentation.html#apexdoc",
"help": {
"text": "This rule validates that: ApexDoc comments are present for classes, methods, and properties that are public or global, excluding overrides and test classes (as well as the contents of test classes)."
},
@ -152,4 +152,4 @@
]
}
]
}
}

View File

@ -546,9 +546,9 @@ public final class PmdAnalysis implements AutoCloseable {
&& configuration.getAnalysisCache() instanceof NoopAnalysisCache
&& reporter.isLoggable(Level.WARN)) {
final String version =
PMDVersion.isUnknown() || PMDVersion.isSnapshot() ? "latest" : "pmd-" + PMDVersion.VERSION;
PMDVersion.isUnknown() || PMDVersion.isSnapshot() ? "latest" : "pmd-doc-" + PMDVersion.VERSION;
reporter.warn("This analysis could be faster, please consider using Incremental Analysis: "
+ "https://pmd.github.io/{0}/pmd_userdocs_incremental_analysis.html", version);
+ "https://docs.pmd-code.org/{0}/pmd_userdocs_incremental_analysis.html", version);
}
}
}

View File

@ -39,12 +39,10 @@ public class CodeClimateRenderer extends AbstractIncrementingRenderer {
}
private static String getPmdPropertiesURL() {
final String BASE_URL = "https://docs.pmd-code.org/";
final String PAGE = "/pmd_userdocs_configuring_rules.html#rule-properties";
String url = "https://pmd.github.io/pmd-" + PMDVersion.VERSION + PAGE;
if (PMDVersion.isSnapshot() || PMDVersion.isUnknown()) {
url = "https://pmd.github.io/latest" + PAGE;
}
return url;
final String VERSION_PART = PMDVersion.isUnknown() || PMDVersion.isSnapshot() ? "latest" : "pmd-doc-" + PMDVersion.VERSION;
return BASE_URL + VERSION_PART + PAGE;
}
@Override

View File

@ -71,6 +71,7 @@ public class SarifRenderer extends AbstractIncrementingRenderer {
final SarifLog sarifLog = sarifLogBuilder.build();
final String json = gson.toJson(sarifLog);
writer.write(json);
writer.println();
}
@Override

View File

@ -190,7 +190,7 @@ public class SarifLogBuilder {
return Component.builder()
.name("PMD")
.version(PMDVersion.VERSION)
.informationUri("https://pmd.github.io/pmd/")
.informationUri("https://docs.pmd-code.org/latest/")
.build();
}
}

View File

@ -27,7 +27,7 @@ class CodeClimateRendererTest extends AbstractRendererTest {
+ "[Categories](https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#categories): Style\\n\\n"
+ "[Remediation Points](https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#remediation-points): 50000\\n\\n"
+ "Description with Unicode Character U+2013: .\\n\\n"
+ "### [PMD properties](https://pmd.github.io/latest/pmd_userdocs_configuring_rules.html#rule-properties)\\n\\n"
+ "### [PMD properties](https://docs.pmd-code.org/latest/pmd_userdocs_configuring_rules.html#rule-properties)\\n\\n"
+ "Name | Value | Description\\n" + "--- | --- | ---\\n"
+ "violationSuppressRegex | | Suppress violations with messages matching a regular expression\\n"
+ "violationSuppressXPath | | Suppress violations on nodes which match a given relative XPath expression.\\n"
@ -42,7 +42,7 @@ class CodeClimateRendererTest extends AbstractRendererTest {
+ "[Categories](https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#categories): Style\\n\\n"
+ "[Remediation Points](https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#remediation-points): 50000\\n\\n"
+ "Description with Unicode Character U+2013: .\\n\\n"
+ "### [PMD properties](https://pmd.github.io/latest/pmd_userdocs_configuring_rules.html#rule-properties)\\n\\n"
+ "### [PMD properties](https://docs.pmd-code.org/latest/pmd_userdocs_configuring_rules.html#rule-properties)\\n\\n"
+ "Name | Value | Description\\n" + "--- | --- | ---\\n"
+ "violationSuppressRegex | | Suppress violations with messages matching a regular expression\\n"
+ "violationSuppressXPath | | Suppress violations on nodes which match a given relative XPath expression.\\n"
@ -64,7 +64,7 @@ class CodeClimateRendererTest extends AbstractRendererTest {
+ "[Categories](https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#categories): Style\\n\\n"
+ "[Remediation Points](https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#remediation-points): 50000\\n\\n"
+ "Description with Unicode Character U+2013: .\\n\\n"
+ "### [PMD properties](https://pmd.github.io/latest/pmd_userdocs_configuring_rules.html#rule-properties)\\n\\n"
+ "### [PMD properties](https://docs.pmd-code.org/latest/pmd_userdocs_configuring_rules.html#rule-properties)\\n\\n"
+ "Name | Value | Description\\n" + "--- | --- | ---\\n"
+ "violationSuppressRegex | | Suppress violations with messages matching a regular expression\\n"
+ "violationSuppressXPath | | Suppress violations on nodes which match a given relative XPath expression.\\n"
@ -74,7 +74,7 @@ class CodeClimateRendererTest extends AbstractRendererTest {
+ "[Categories](https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#categories): Style\\n\\n"
+ "[Remediation Points](https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#remediation-points): 50000\\n\\n"
+ "desc\\n\\n"
+ "### [PMD properties](https://pmd.github.io/latest/pmd_userdocs_configuring_rules.html#rule-properties)\\n\\n"
+ "### [PMD properties](https://docs.pmd-code.org/latest/pmd_userdocs_configuring_rules.html#rule-properties)\\n\\n"
+ "Name | Value | Description\\n" + "--- | --- | ---\\n"
+ "violationSuppressRegex | | Suppress violations with messages matching a regular expression\\n"
+ "violationSuppressXPath | | Suppress violations on nodes which match a given relative XPath expression.\\n"

View File

@ -7,7 +7,7 @@
"driver": {
"name": "PMD",
"version": "unknown",
"informationUri": "https://pmd.github.io/pmd/",
"informationUri": "https://docs.pmd-code.org/latest/",
"rules": []
}
},
@ -21,4 +21,4 @@
]
}
]
}
}

View File

@ -7,7 +7,7 @@
"driver": {
"name": "PMD",
"version": "unknown",
"informationUri": "https://pmd.github.io/pmd/",
"informationUri": "https://docs.pmd-code.org/latest/",
"rules": []
}
},
@ -30,4 +30,4 @@
]
}
]
}
}

View File

@ -7,7 +7,7 @@
"driver": {
"name": "PMD",
"version": "unknown",
"informationUri": "https://pmd.github.io/pmd/",
"informationUri": "https://docs.pmd-code.org/latest/",
"rules": []
}
},
@ -39,4 +39,4 @@
]
}
]
}
}

View File

@ -7,7 +7,7 @@
"driver": {
"name": "PMD",
"version": "unknown",
"informationUri": "https://pmd.github.io/pmd/",
"informationUri": "https://docs.pmd-code.org/latest/",
"rules": []
}
},
@ -39,4 +39,4 @@
]
}
]
}
}

View File

@ -7,7 +7,7 @@
"driver": {
"name": "PMD",
"version": "unknown",
"informationUri": "https://pmd.github.io/pmd/",
"informationUri": "https://docs.pmd-code.org/latest/",
"rules": [
{
"id": "Foo",
@ -127,4 +127,4 @@
]
}
]
}
}

View File

@ -7,7 +7,7 @@
"driver": {
"name": "PMD",
"version": "unknown",
"informationUri": "https://pmd.github.io/pmd/",
"informationUri": "https://docs.pmd-code.org/latest/",
"rules": [
{
"id": "Foo",
@ -105,4 +105,4 @@
]
}
]
}
}

View File

@ -7,7 +7,7 @@
"driver": {
"name": "PMD",
"version": "unknown",
"informationUri": "https://pmd.github.io/pmd/",
"informationUri": "https://docs.pmd-code.org/latest/",
"rules": [
{
"id": "Foo",
@ -64,4 +64,4 @@
]
}
]
}
}