Compare commits

..

117 Commits

Author SHA1 Message Date
Pelisse Romain
80148e6b13 Merge pull request #31 from hgschmie/npe-fix
Fix NPE with empty rulesets.
2013-11-26 16:50:11 -08:00
Pelisse Romain
5a07ad8caa Merge pull request #30 from hgschmie/pmd-5.0.x
Add a no args constructor to CPDConfiguration.
2013-11-26 14:22:11 -08:00
Henning Schmiedehausen
957afd6625 Fix NPE with empty rulesets.
This is the fix for bug #1155 (https://sourceforge.net/p/pmd/bugs/1155/)

The whole code is in dire need of revisiting its behaviour when a
value is null or empty. Same goes for e.g. createRules whether it
should return null values (then the caller will have to deal with it)
or empty Rulesets.

Catching and discarding the rule not found exception looks pretty
suspicious.
2013-11-26 11:00:49 -08:00
Henning Schmiedehausen
14e1f8bb81 Add a no args constructor to CPDConfiguration.
This allows API users to build a path forward from the 5.0.x versions
of the API to 5.1.x.
2013-11-26 10:26:14 -08:00
Andreas Dangel
973fd1c4d4 pmd: add changelog and test for #1144 2013-10-29 19:25:02 +01:00
Pelisse Romain
678d3e8a1b Merge pull request #27 from uncletall/pmd/5.0.x
cpd: fix #1144 CPD encoding argument has no effect
2013-10-29 09:35:17 -07:00
Peter Bruin
33413371f6 cpd: fix #1144 CPD encoding argument has no effect
Make sure the encoding is set before creating the renderer
2013-10-28 15:47:59 +08:00
Andreas Dangel
c9da879840 [maven-release-plugin] prepare for next development iteration 2013-08-11 11:03:53 +02:00
Andreas Dangel
030795ea95 [maven-release-plugin] prepare release pmd_releases/5.0.5 2013-08-11 11:03:52 +02:00
Andreas Dangel
1dc6d7e698 pmd: Prepare pmd release 5.0.5 2013-08-11 10:25:41 +02:00
Andreas Dangel
5c92fdd31a pmd: fix #1095 AvoidFinalLocalVariable false positive 2013-08-11 09:29:52 +02:00
Andreas Dangel
9a81bcf7dd pmd: fix #1069 Eclipse plugin does not accept project-local config
This is about the RuleSetReferenceId and how we resolve such a
id to a real ruleset.
It is mostly backwards compatible.
2013-08-07 19:20:48 +02:00
Andreas Dangel
fb426227e4 pmd: fix #1114 CPD - Tokenizer not initialized with requested properties
There was a similar problem with CPD GUI.
Also resetting the properties, so that unchecking the checkboxes has actually an effect.
2013-08-05 08:51:27 +02:00
Andreas Dangel
acf8db926d pmd: fix #1091 file extension for fortran seems to be wrong in cpdgui tools 2013-08-03 22:29:03 +02:00
Andreas Dangel
91f2137679 pmd: fix #1102 False positive: shift operator parenthesis 2013-08-03 22:28:55 +02:00
Andreas Dangel
cc095674b0 pmd: fix #1099 UseArraysAsList false positives 2013-08-03 22:28:43 +02:00
Andreas Dangel
0859285b8b pmd: fixed #1107 PMD 5.0.4 couldn't parse call of parent outer java class method from inner class 2013-08-03 22:28:34 +02:00
Andreas Dangel
d0c103ab62 pmd: fix #1092 Wrong Attribute "excludemarker" in Ant Task Documentation 2013-08-03 22:28:08 +02:00
Andreas Dangel
e76947b297 pmd: fix #1084 NPE at UselessStringValueOfRule.java:36 2013-08-03 22:27:58 +02:00
Andreas Dangel
a417f0003f pmd: fix #1104 IdempotentOperation false positive 2013-08-03 22:27:38 +02:00
Andreas Dangel
dc64e2df77 pmd: fix #1111 False positive: Useless parentheses 2013-08-03 22:26:52 +02:00
Andreas Dangel
829a939421 pmd: fix #1118 ClassCastException in pmd.lang.ecmascript.ast.ASTElementGet 2013-08-03 14:23:43 +02:00
Andreas Dangel
eb57fdc882 pmd: fix #991 AvoidSynchronizedAtMethodLevel for static methods 2013-08-03 13:08:26 +02:00
Andreas Dangel
da1ee1fe72 pmd: fix #1114 CPD - Tokenizer not initialized with requested properties 2013-08-03 12:28:25 +02:00
Andreas Dangel
ee39aa5f3c [maven-release-plugin] prepare for next development iteration 2013-05-01 12:21:21 +02:00
Andreas Dangel
46573bb566 [maven-release-plugin] prepare release pmd_releases/5.0.4 2013-05-01 12:21:21 +02:00
Andreas Dangel
da08b0757e pmd: Prepare pmd release 5.0.4 2013-05-01 11:59:42 +02:00
Andreas Dangel
1c0badd429 pmd: fix #1089 When changing priority in a custom ruleset, violations reported twice 2013-05-01 11:40:37 +02:00
Andreas Dangel
e0a9e49560 pmd: fix #794 False positive on PreserveStackTrace with anonymous inner 2013-04-28 10:15:34 +02:00
Andreas Dangel
dba46f2ebd pmd: fix #1063 False+: ArrayIsStoredDirectly 2013-04-28 10:15:26 +02:00
Andreas Dangel
5fb6daea58 pmd: fix #1085 NullPointerException by at net.sourceforge.pmd.lang.java.rule.design.GodClassRule.visit(GodClassRule.java:313) 2013-04-25 19:27:24 +02:00
Andreas Dangel
2d655f4684 pmd: fix #1087 PreserveStackTrace (still) ignores initCause()
one more test, extended documentation example
2013-04-25 18:39:03 +02:00
Andreas Dangel
b77de63950 pmd: fix #1087 PreserveStackTrace (still) ignores initCause() 2013-04-24 21:40:22 +02:00
Andreas Dangel
d347e38622 pmd: fix #1086 Unsupported Element and Attribute in Ant Task Example 2013-04-22 20:31:10 +02:00
Andreas Dangel
7494011999 pmd: fix #254 False+ : UnusedImport with Javadoc @throws 2013-04-15 21:35:51 +02:00
Andreas Dangel
3901ad7ddb pmd: correct documentation for pmd's ant task to select the language
and adding more unit tests.
2013-04-15 21:34:22 +02:00
Andreas Dangel
2e85f1f935 pmd: fix #1080 net.sourceforge.pmd.cpd.CPDTest test failing
The symlinks are simply removed now from the source code and
created by the test, when needed.
The test runs only under unix systems, not under windows.
2013-04-14 17:51:29 +02:00
Andreas Dangel
a5efd66b73 pmd: adding more entries to gitignore and to exclude while creating the source zip file. 2013-04-14 17:49:49 +02:00
Andreas Dangel
a96ccf9741 pmd: fix #1082 CPD performance issue on larger projects 2013-04-14 13:41:31 +02:00
Andreas Dangel
f60128b142 pmd: fix #1081 Regression: CPD skipping all files when using relative paths 2013-04-14 13:41:14 +02:00
Andreas Dangel
89ebc32141 [maven-release-plugin] prepare for next development iteration 2013-04-05 19:31:38 +02:00
Andreas Dangel
b501de3fba [maven-release-plugin] prepare release pmd_releases/5.0.3 2013-04-05 19:31:38 +02:00
Andreas Dangel
79fb7e359d pmd: correct the command line examples 2013-04-05 19:19:14 +02:00
Andreas Dangel
6aa4897e21 pmd: prepare pmd release 5.0.3 2013-04-05 18:52:59 +02:00
Andreas Dangel
ee05fa73cd pmd: use the released pmd-build plugin 0.8 2013-04-05 18:49:11 +02:00
Andreas Dangel
0170a40dec pmd: fix NPE in LooseCouplingRule 2013-04-05 17:29:53 +02:00
Andreas Dangel
4d7b4bb1bc pmd: fix #1078 Package statement introduces false positive UnnecessaryFullyQualifiedName violation 2013-04-05 17:16:52 +02:00
Andreas Dangel
a6c1c1f57c pmd: fix #1077 Missing JavaDocs for Xref-Test Files 2013-03-30 15:46:15 +01:00
Andreas Dangel
9f8246caac pmd: fix #938 False positive on LooseCoupling for overriding methods 2013-03-30 15:46:04 +01:00
Andreas Dangel
f51e41b05c pmd: fix #940 False positive on UnsynchronizedStaticDateFormatter 2013-03-30 15:45:52 +01:00
Andreas Dangel
ad66153a2d pmd: fix #942 CheckResultSet False Positive
* replacing the xpath rule with a java based rule implementation
2013-03-30 13:58:42 +01:00
Andreas Dangel
c8c6aa16dd pmd: fix #943 PreserveStackTrace false positive if a StringBuffer exists 2013-03-30 12:01:42 +01:00
Andreas Dangel
b998e64819 pmd: fix #945 PMD generates RuleSets it cannot read. 2013-03-30 12:01:33 +01:00
Andreas Dangel
62fc70e816 pmd: fix #958 Intermittent NullPointerException while loading XPath node attributes
* synchronizing the method cache
 * adding additional null check
2013-03-30 12:01:14 +01:00
Andreas Dangel
34b868ad14 formatting, white spaces 2013-03-30 12:01:06 +01:00
Andreas Dangel
26a862a51b pmd: update changelog, verify #1076 2013-03-24 20:40:55 +01:00
Philip Graf
4569842965 pmd: fix #1076 Report.treeIterator() does not return all violations
The cause of the bug was the implementation of
ViolationNode.equalsNode(otherNode) which returned true when two
different violations start on the same line.

Note: this change also adds a maven dependency on Mockito 1.9.5 (scope:
test). Mockito helps creating mock objects and makes the test more
readable.
2013-03-24 20:40:20 +01:00
Andreas Dangel
fddccb5030 pmd: update changelog 2013-03-24 20:40:01 +01:00
Peter Kofler
00e27b4a37 fix Nullpointer Exception when using -l jsp 2013-03-24 20:39:52 +01:00
Andreas Dangel
b6c6899741 pmd: fix #1027 PMD Ant: java.lang.ClassCastException 2013-03-17 12:47:45 +01:00
Andreas Dangel
43ecf1e110 pmd: fix #999 Law of Demeter: False positives and negatives 2013-03-17 11:08:16 +01:00
Andreas Dangel
5f45a28621 pmd: fix #975 false positive in ClassCastExceptionWithToArray 2013-03-17 10:20:58 +01:00
Andreas Dangel
41c44e5d8d pmd: fix #968 Issues with JUnit4 @Test annotation with expected exception
Thanks to Yiannis Paschalidis
2013-03-17 10:20:49 +01:00
Andreas Dangel
040d465137 pmd: fix #976 UselessStringValueOf wrong when appending character arrays 2013-03-16 19:55:45 +01:00
Andreas Dangel
4e5ca16990 pmd: fix #977 MisplacedNullCheck makes false positives 2013-03-16 19:21:15 +01:00
Andreas Dangel
30af4f6381 pmd: fix #985 Suppressed methods shouldn't affect avg CyclomaticComplexity 2013-03-16 18:16:29 +01:00
Andreas Dangel
cece698b04 pmd: fix #984 Cyclomatic complexity should treat constructors like methods 2013-03-16 18:16:20 +01:00
Andreas Dangel
13ef401a63 pmd: fix #997 Rule NonThreadSafeSingleton gives analysis problem 2013-03-16 12:26:11 +01:00
Andreas Dangel
589ec3c6da pmd: fix #992 Class java.beans.Statement triggered in CloseResource rule 2013-03-16 12:25:53 +01:00
Andreas Dangel
c00ca9e44c pmd: fix NPE in ConstructorCallsOverridableMethodRule 2013-03-15 21:57:39 +01:00
Andreas Dangel
31f6b9af1a pmd: fix #1032 ImmutableField Rule: Private field in inner class gives false positive
Improved symbol table resolution to check inner classes, too.
2013-03-15 21:37:29 +01:00
Andreas Dangel
8eac048c03 pmd: fix #1005 False + for ConstructorCallsOverridableMethod - overloaded methods
It won't be perfect, but for constructor calls and method calls a
simple check of the argument types is done. Primitive types are
distinguished, reference types not.
In order to support all cases, full symbol resolution is needed.
2013-03-14 20:49:08 +01:00
Andreas Dangel
3b14b3f5cb pmd: #1002 False +: FinalFieldCouldBeStatic on inner class 2013-03-13 21:12:46 +01:00
Andreas Dangel
adcbdc204f pmd: fix #1073 Hard coded violation messages CommentSize 2013-03-10 09:54:34 +01:00
Andreas Dangel
a1b1e3f31c pmd: fix #1074 rule priority doesn't work on group definitions
and verify #1067 Custom Ruleset doesn't import the complete ruleset anymore by reference
2013-03-09 17:56:45 +01:00
Andreas Dangel
3e8c42384b pmd: fixed #1064 Exception running PrematureDeclaration 2013-03-01 22:20:46 +01:00
Andreas Dangel
a00532595a pmd: fixed #1068 CPD fails on broken symbolic links 2013-03-01 20:17:45 +01:00
Andreas Dangel
3feda38cc3 [maven-release-plugin] prepare for next development iteration 2013-02-03 18:35:38 +01:00
Andreas Dangel
3412d55fc6 [maven-release-plugin] prepare release pmd_releases/5.0.2 2013-02-03 18:35:37 +01:00
Andreas Dangel
436b7dcb50 pmd: set release date for 5.0.2 2013-02-03 18:29:37 +01:00
Andreas Dangel
d25dadc4b4 pmd: Prepare pmd release 5.0.2 2013-02-03 15:44:02 +01:00
Andreas Dangel
1c051674a0 pmd: update changelog for 5.0.2 2013-02-03 15:34:58 +01:00
Romain PELISSE
3daca86045 pmd: AntTask support for language
- fix  #1004 targetjdk isn't attribute of PMD task
- introduce a new element, called <language>, that replaces the already existing <version/> element
2013-02-03 15:33:46 +01:00
Romain PELISSE
d95d960de3 pmd: fix #1004 targetjdk isn't attribute of PMD task 2013-02-03 15:33:31 +01:00
Torsten Kleiber
ef7478c350 Fix for bug #1056 "Error while processing" while running on xml file with DOCTYPE reference
Change the initial value of XINCLUDE_AWARE_DESCRIPTOR to false
This does validate an invalid doctype reference as in some ide generated xml files exist.
Any xml rule, which needs this property should overwrite this value with true.
2013-02-03 15:32:54 +01:00
Romain PELISSE
c080fdda08 pmd: fix #1049 Errors in "How to write a rule" 2013-02-03 15:31:21 +01:00
Andreas Dangel
e603844a53 pmd: fix #1030 CPD Java.lang.IndexOutOfBoundsException: Index: 2013-01-26 20:08:54 +01:00
Andreas Dangel
52b8be6601 pmd: fixed #947 CloseResource rule fails if field is marked with annotation 2013-01-26 17:58:31 +01:00
Andreas Dangel
7cbb385dbb pmd: fixed #1011 CloseResource Rule ignores Constructors 2013-01-26 17:57:17 +01:00
Andreas Dangel
61c0b4ea7f pmd: fixed #1007 Parse Exception with annotation 2013-01-26 17:57:11 +01:00
Andreas Dangel
26fa85a9fa pmd: fixed #1046 ant task CPDTask doesn't accept ecmascript 2013-01-26 17:56:51 +01:00
Andreas Dangel
98b903897e pmd: fixed #1039 pmd-nicerhtml.xsl is packaged in wrong location 2013-01-26 17:55:22 +01:00
Andreas Dangel
55b5aa7f27 pmd: update rule-guidelines to changed package names 2013-01-26 17:54:09 +01:00
Andreas Dangel
ffac9894c9 pmd: fixed #1028 False-positive: Compare objects with equals for Enums 2013-01-26 17:54:03 +01:00
Andreas Dangel
d557ed9c01 pmd: verify #1020 Parsing Error 2013-01-26 17:53:56 +01:00
Andreas Dangel
e0b7f6f17c pmd: fixed #913 SignatureDeclareThrowsException is raised twice 2013-01-26 17:53:49 +01:00
Andreas Dangel
cb9861dd1f pmd: fixed #878 False positive: UnusedFormalParameter for abstract methods 2013-01-26 17:53:41 +01:00
Andreas Dangel
7ee96a6b52 pmd: fixed #1055 Please add a colon in the ant output after line,column for Oracle JDeveloper IDE usage 2013-01-26 17:53:33 +01:00
Andreas Dangel
ac8e3314a3 pmd: fixed bug #1012 False positive: Useless parentheses. 2013-01-19 19:13:09 +01:00
Andreas Dangel
7989ae1863 pmd: fixed #1060 GodClassRule >>> wrong method 2013-01-19 19:12:59 +01:00
Andreas Dangel
e3708b5030 pmd: fix #1037 Facing a showstopper issue in PMD Report Class
* wrapping the report listeners in a thread safe (synchronized) class
 * overtaking the listeners for each thread / report
2012-12-17 11:02:24 +01:00
Andreas Dangel
85e493d55f pmd: fixed #1026 PMD doesn't handle 'value =' in SuppressWarnings annotation 2012-12-16 23:12:29 +01:00
Andreas Dangel
6abbea51dd pmd: fix #1043 node.getEndLine() always returns 0 (ECMAscript)
* added commons-io dependency
 * added a SourceCodePositioner to calculate line/column from position
2012-12-16 18:16:39 +01:00
Andreas Dangel
9162917346 pmd: fix #1047 False Positive in 'for' loops for LocalVariableCouldBeFinal in 5.0.1 2012-12-16 12:10:06 +01:00
Andreas Dangel
637006674f pmd: Fixed bug 1048: CommentContent Rule, String Index out of range Exception 2012-12-07 11:17:44 +01:00
Andreas Dangel
63c1a8fe47 pmd: CLI - make sure we display the usage help text
Therefore make the -h option a help option.
Make the auxclasspath option description look nicer - newlines break the layout.
Always display the jcommander usage help text.
And exit with an error code in case there are parameter errors.
2012-12-05 22:02:49 +01:00
Andreas Dangel
063c4228e3 pmd: fix bug #1044 - update suppressing documentation with new cli paramter name 2012-12-05 22:02:40 +01:00
Andreas Dangel
4b0063dfc1 [maven-release-plugin] prepare for next development iteration 2012-11-28 21:43:38 +01:00
Andreas Dangel
13e36974a5 [maven-release-plugin] prepare release pmd_releases/5.0.1 2012-11-28 21:43:36 +01:00
Andreas Dangel
33c7af965c pmd: fix failing unit test 2012-11-28 21:25:56 +01:00
Andreas Dangel
a66bbf2193 pmd: prepare release 5.0.1 2012-11-28 21:02:35 +01:00
Andreas Dangel
38af8f2433 Merge branch 'master' into pmd/5.0.x 2012-11-28 20:42:58 +01:00
Andreas Dangel
a6bcfe2b65 pmd: added missing ssh/scp wagon support for maven3
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/branches/pmd/5.0.x@7669 51baf565-9d33-0410-a72c-fc3788e3496d
2012-05-01 11:41:10 +00:00
Andreas Dangel
6474fde42d [maven-release-plugin] prepare for next development iteration
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/branches/pmd/5.0.x@7668 51baf565-9d33-0410-a72c-fc3788e3496d
2012-05-01 07:43:32 +00:00
Andreas Dangel
8dcde0edb5 [maven-release-plugin] prepare release pmd_release_5_0_0
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/branches/pmd/5.0.x@7666 51baf565-9d33-0410-a72c-fc3788e3496d
2012-05-01 07:42:56 +00:00
Andreas Dangel
70347aedd5 pmd: Prepare pmd release 5.0.0
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/branches/pmd/5.0.x@7665 51baf565-9d33-0410-a72c-fc3788e3496d
2012-05-01 07:38:38 +00:00
Andreas Dangel
eaf1385595 update the version to the usual three components: 5.0.0-SNAPSHOT
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/branches/pmd/5.0.x@7664 51baf565-9d33-0410-a72c-fc3788e3496d
2012-04-30 11:35:40 +00:00
7567 changed files with 278175 additions and 598617 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,157 +0,0 @@
# PMD CI Scripts
This folder contains scripts used for CI, that are PMD specific.
It uses the common scripts from [build-tools](https://github.com/pmd/build-tools).
## .ci/files/public-env.gpg
This files contains the following environment variables:
* DANGER_GITHUB_API_TOKEN: Token for danger to add comments to PRs as <https://github.com/pmd-test>.
The token needs the scope "public_repo". Note: The default GITHUB_TOKEN can't be used, because
danger runs in pull request builds from fork and the default GITHUB_TOKEN has read-only access there
and can't write comments. Therefore the personal access token of the bot account "pmd-test" is used.
pmd-test has no commit permissions, but can comment on any public repo, including pmd/pmd.
* PMD_CI_CHUNK_TOKEN: Token for uploading reports to chunk.io
The file is encrypted, so that the tokens are not automatically disabled when github detects them
in clear text.
**Decrypting**:
gpg --batch --yes --decrypt --passphrase="GnxdjywUEPveyCD1RLiTd7t8CImnefYr" \
--output .ci/files/public-env .ci/files/public-env.gpg
**Encrypting**:
gpg --batch --symmetric --cipher-algo AES256 \
--armor --passphrase="GnxdjywUEPveyCD1RLiTd7t8CImnefYr" \
--output .ci/files/public-env.gpg .ci/files/public-env
## Local tests with docker
Using the same docker container as described in [build-env @ build-tools](https://github.com/pmd/build-tools).
### Testing a push build (snapshot)
Start docker without binding to local directory, so that we can do a fresh checkout
$ docker run \
--interactive \
--tty \
--name pmd-build-env_pmd \
pmd-build-env:latest
```
export LANG=en_US.UTF-8
export PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/main/scripts
export PMD_CI_SECRET_PASSPHRASE="xyz"
export PMD_CI_DEBUG=true
MAIN_BRANCH="main"
eval $(~/create-gh-actions-env.sh push pmd/pmd $MAIN_BRANCH)
cd /workspaces/pmd
rmdir pmd && mkdir pmd
cd pmd
git init
git remote add origin https://github.com/pmd/pmd
git fetch --no-tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/${MAIN_BRANCH}:refs/remotes/origin/${MAIN_BRANCH}
git checkout --progress --force -B ${MAIN_BRANCH} refs/remotes/origin/${MAIN_BRANCH}
f=check-environment.sh; \
mkdir -p .ci && \
( [ -e .ci/$f ] || curl -sSL "${PMD_CI_SCRIPTS_URL}/$f" > ".ci/$f" ) && \
chmod 755 .ci/$f && \
.ci/$f
.ci/build.sh
```
### Testing a pull request
Same as the above, but this line changes:
```
eval $(~/create-gh-actions-env.sh pull_request pmd/pmd $MAIN_BRANCH)
```
Maybe update `/workspaces/event.json` to fill in a real pull request number, so that
danger can comment the correct PR.
And the checkout must be different. Example for PR 3220:
```
PMD_CI_PULL_REQUEST_NUMBER=3220
cd /workspace/pmd
rmdir pmd && mkdir pmd
cd pmd
git init
git remote add origin https://github.com/pmd/pmd
git fetch --no-tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/pull/${PMD_CI_PULL_REQUEST_NUMBER}/merge:refs/remotes/pull/${PMD_CI_PULL_REQUEST_NUMBER}/merge
git checkout --progress --force refs/remotes/pull/${PMD_CI_PULL_REQUEST_NUMBER}/merge
```
### Forked build
A build executing on a forked repository.
```
$(~/create-gh-actions-env.sh push adangel/pmd $MAIN_BRANCH)
```
### Performing a release (push) build
```
export LANG=en_US.UTF-8
export PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/main/scripts
export PMD_CI_SECRET_PASSPHRASE="xyz"
export PMD_CI_DEBUG=true
TAG_NAME=pmd_releases/6.33.0
eval $(~/create-gh-actions-env.sh push pmd/pmd refs/tags/$TAG_NAME)
cd /workspaces/pmd
rmdir pmd && mkdir pmd
cd pmd
git init
git remote add origin https://github.com/pmd/pmd
git fetch --no-tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/tags/$TAG_NAME:refs/tags/$TAG_NAME
git checkout --progress --force refs/tags/$TAG_NAME
f=check-environment.sh; \
mkdir -p .ci && \
( [ -e .ci/$f ] || curl -sSL "${PMD_CI_SCRIPTS_URL}/$f" > ".ci/$f" ) && \
chmod 755 .ci/$f && \
.ci/$f
#
# .ci/build.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 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.
Note that maven-central would not be changed, since this is skipped via MAVEN_OPTS:
`MAVEN_OPTS` contains `-DskipRemoteStaging=true`, so that no maven artifacts are deployed
to maven central (this is set by `create-gh-actions-env.sh`).
So for now in order to test the build script, you need to manually edit the script and comment out the
critical lines... (like publish github releases, uploading files to sourceforge ...). Later a
"dry-run" mode could be added.
Make sure to cleanup after the test, e.g. discard the draft github release.
## Workflow git-repo-sync
Synchronizes the github git repository pmd/pmd on every push to sourceforge.

File diff suppressed because it is too large Load Diff

View File

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="All Regression Rules"
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">
<description>Every apex and java rule in PMD which is used for the regression tests with pmdtester</description>
<rule ref="category/apex/bestpractices.xml" />
<rule ref="category/apex/codestyle.xml" />
<rule ref="category/apex/design.xml" />
<rule ref="category/apex/documentation.xml" />
<rule ref="category/apex/errorprone.xml" />
<rule ref="category/apex/multithreading.xml" />
<rule ref="category/apex/performance.xml" />
<rule ref="category/apex/security.xml" />
<rule ref="category/java/bestpractices.xml" />
<rule ref="category/java/codestyle.xml" />
<rule ref="category/java/design.xml" />
<rule ref="category/java/documentation.xml" />
<rule ref="category/java/errorprone.xml" />
<rule ref="category/java/multithreading.xml" />
<rule ref="category/java/performance.xml" />
<rule ref="category/java/security.xml" />
</ruleset>

View File

@ -1,199 +0,0 @@
<?xml version="1.0"?>
<projectlist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="projectlist_1_1_0.xsd">
<description>Standard Projects</description>
<project>
<name>checkstyle</name>
<type>git</type>
<connection>https://github.com/checkstyle/checkstyle</connection>
<tag>checkstyle-9.1</tag>
<exclude-pattern>.*/target/test-classes/com/puppycrawl/tools/checkstyle/.*</exclude-pattern>
<exclude-pattern>.*/target/generated-sources/.*</exclude-pattern>
<exclude-pattern>.*/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/javaparser/InputJavaParserNoFreezeOnDeeplyNestedLambdas.java</exclude-pattern>
<build-command><![CDATA[#!/usr/bin/env bash
if test -e classpath.txt; then
exit
fi
set -e
# Make sure to use java11. This is already installed by build.sh
export JAVA_HOME=${HOME}/openjdk11
export PATH=$JAVA_HOME/bin:$PATH
mvn test-compile -B
mvn dependency:build-classpath -DincludeScope=test -Dmdep.outputFile=classpath.txt -B
]]></build-command>
<auxclasspath-command>echo -n "$(pwd)/target/classes:$(pwd)/target/test-classes:"; cat classpath.txt</auxclasspath-command>
</project>
<project>
<name>spring-framework</name>
<type>git</type>
<connection>https://github.com/spring-projects/spring-framework</connection>
<tag>v5.3.13</tag>
<exclude-pattern>.*/build/generated-sources/.*</exclude-pattern>
<build-command><![CDATA[#!/usr/bin/env bash
## Skip gradle execution
if test -e classpath.txt; then
exit
fi
set -e
# Make sure to use java11. This is already installed by build.sh
export JAVA_HOME=${HOME}/openjdk11
export PATH=$JAVA_HOME/bin:$PATH
## Patches
# keep the tabs!!
# Patch 1: See https://github.com/spring-projects/spring-framework/commit/381b7d035a16d430b8783b7390c1677c9e7d1f68
# and https://github.com/spring-projects/spring-framework/commit/9e1ed6c7718d38c4b9fe5f75921abad33264307c
(cat <<EOF
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java
index 37f5884e67..53022443ee 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java
@@ -539,7 +539,9 @@ public class AutowiredAnnotationBeanPostProcessor implements SmartInstantiationA
*/
@SuppressWarnings({"deprecation", "cast"})
protected boolean determineRequiredStatus(MergedAnnotation<?> ann) {
- return determineRequiredStatus(
+ // Cast to (AnnotationAttributes) is required. Otherwise, the :spring-beans:compileGroovy
+ // task fails in the Gradle build.
+ return determineRequiredStatus((AnnotationAttributes)
ann.asMap(mergedAnnotation -> new AnnotationAttributes(mergedAnnotation.getType())));
}
EOF
) | patch --strip=1
# Patch 2: Ignore compiler warnings
(cat <<EOF
diff --git a/buildSrc/src/main/java/org/springframework/build/compile/CompilerConventionsPlugin.java b/buildSrc/src/main/java/org/springframework/build/compile/CompilerConventionsPlugin.java
index f2424c549e..b6ec8b04da 100644
--- a/buildSrc/src/main/java/org/springframework/build/compile/CompilerConventionsPlugin.java
+++ b/buildSrc/src/main/java/org/springframework/build/compile/CompilerConventionsPlugin.java
@@ -51,7 +51,7 @@ public class CompilerConventionsPlugin implements Plugin<Project> {
COMPILER_ARGS.addAll(commonCompilerArgs);
COMPILER_ARGS.addAll(Arrays.asList(
"-Xlint:varargs", "-Xlint:fallthrough", "-Xlint:rawtypes", "-Xlint:deprecation",
- "-Xlint:unchecked", "-Werror"
+ "-Xlint:unchecked"//, "-Werror"
));
TEST_COMPILER_ARGS = new ArrayList<>();
TEST_COMPILER_ARGS.addAll(commonCompilerArgs);
diff --git a/spring-beans/spring-beans.gradle b/spring-beans/spring-beans.gradle
index e3f6f73b76..48c4d9e3fb 100644
--- a/spring-beans/spring-beans.gradle
+++ b/spring-beans/spring-beans.gradle
@@ -23,7 +23,7 @@ sourceSets {
}
compileGroovy {
- options.compilerArgs += "-Werror"
+// options.compilerArgs += "-Werror"
}
// This module also builds Kotlin code and the compileKotlin task naturally depends on
EOF
) | patch --strip=1
# Patch 3: Add task createSquishClasspath
(cat <<EOF
diff --git a/build.gradle b/build.gradle
index 6021fa574d..15d29ed699 100644
--- a/build.gradle
+++ b/build.gradle
@@ -431,3 +431,19 @@ configure(rootProject) {
}
}
}
+
+// see https://stackoverflow.com/questions/28986968/generate-classpath-from-all-multiproject-gradle-build-dependencies
+task createSquishClasspath {
+ doLast {
+ def dependencies = new LinkedHashSet()
+ dependencies.addAll(moduleProjects.configurations.compileClasspath.resolvedConfiguration.resolvedArtifacts.file.flatten())
+ dependencies.addAll(moduleProjects.configurations.testCompileClasspath.resolvedConfiguration.resolvedArtifacts.file.flatten())
+
+ def paths = new ArrayList()
+ paths.addAll(moduleProjects.jar.outputs.files.asPath)
+ paths.addAll(moduleProjects.sourceSets.test.output.resourcesDir)
+ paths.addAll(moduleProjects.sourceSets.test.output.classesDirs.files.flatten())
+ paths.addAll(dependencies)
+ println paths.join(File.pathSeparator)
+ }
+}
EOF
) | patch --strip=1
# Patch 4: Add https://maven.repository.redhat.com/ga/ as repository in order to resolve
# dependency com.ibm.websphere/uow/6.0.2.17
# See https://spring.io/blog/2020/10/29/notice-of-permissions-changes-to-repo-spring-io-fall-and-winter-2020
(cat <<EOF
diff --git a/build.gradle b/build.gradle
index 6021fa57..8319ff76 100644
--- a/build.gradle
+++ b/build.gradle
@@ -291,6 +291,7 @@ configure(allprojects) { project ->
}
repositories {
mavenCentral()
+ maven { url "https://maven.repository.redhat.com/ga/" }
maven { url "https://repo.spring.io/libs-spring-framework-build" }
}
}
EOF
) | patch --strip=1
./gradlew --console=plain --build-cache --no-daemon --max-workers=4 build testClasses -x test -x javadoc -x api -x asciidoctor -x asciidoctorPdf
./gradlew --console=plain --build-cache --no-daemon --max-workers=4 createSquishClasspath -q > classpath.txt
]]></build-command>
<auxclasspath-command>cat classpath.txt</auxclasspath-command>
</project>
<project>
<name>openjdk-11</name>
<type>git</type>
<connection>https://github.com/openjdk/jdk</connection>
<tag>jdk-11+28</tag>
<src-subpath>src/java.base</src-subpath>
</project>
<project>
<name>Schedul-o-matic-9000</name>
<type>git</type>
<connection>https://github.com/SalesforceLabs/Schedul-o-matic-9000</connection>
<tag>6b1229ba43b38931fbbab5924bc9b9611d19a786</tag>
</project>
<project>
<name>fflib-apex-common</name>
<type>git</type>
<connection>https://github.com/apex-enterprise-patterns/fflib-apex-common</connection>
<tag>7e0891efb86d23de62811af56d87d0959082a322</tag>
</project>
<project>
<name>apex-link</name>
<type>git</type>
<connection>https://github.com/nawforce/apex-link</connection>
<tag>v2.3.0</tag>
<src-subpath>samples</src-subpath>
</project>
<project>
<name>java-regression-tests</name>
<type>git</type>
<connection>https://github.com/pmd/java-regression-tests</connection>
<tag>main</tag>
<auxclasspath-command>realpath java-regression-tests-*.jar</auxclasspath-command>
</project>
</projectlist>

View File

@ -1,14 +0,0 @@
-----BEGIN PGP MESSAGE-----
jA0ECQMC6NJFOgCtLK790sDsAV7zf22dX5W7Ki3LdPBesQvoN+fU5xjNcu9ytrOQ
pNDQybzmGkBU7gJM5sasTEv2OKp7h+nt8xSfaE8u0i4G0+yLGZKxbCrZoHnoBiaW
udpjvvxyKdEV8wn1DPsh/W9ARmxdJezpreUwmwExamYiVEXsWOr2DWST+DPVX+4I
5vAxi/YqO1/Pn+s/wIOKM/57otuVxwzwyUFxItJF4GV3NeCKt1cDQHRT1OSn2Mlw
1LY8oUJgjKVCzI9F7xSlHYRYtvUK2icc7lvwrUliXIlcVetUB6Swe5AJmtmQ63y0
EU52Uh7VPYjj929QgpoVpJHGTJl/Omyk63nb1EOrDWEVUMzg4fDsbAsmzvPyD/FR
R6S9OeJUCsLMXlu7MRHCQi0vDk3li25pVqJmFm9Ahk8tkY/yzgQLoWmVEOhl8xDY
oEQh0XNy9TxvzRzYlutYdU7K4ACohNsJN/MpKkRVzA3aMIBrNjVGa0dF8kd+7grg
fJ+MW8skcpIHDegDcxVAs+O4r9VO3UDAcx3E/kgdLAKSOV0sRt4ZbJZaML7sKkSV
muTtIhHzGwB41qKichY=
=fgy5
-----END PGP MESSAGE-----

View File

@ -1,81 +0,0 @@
#!/usr/bin/env bash
# Exit this script immediately if a command/function exits with a non-zero status.
set -e
SCRIPT_INCLUDES="log.bash utils.bash setup-secrets.bash"
# shellcheck source=inc/fetch_ci_scripts.bash
source "$(dirname "$0")/inc/fetch_ci_scripts.bash" && fetch_ci_scripts
function git_repo_sync() {
echo
pmd_ci_utils_determine_build_env pmd/pmd
echo
if pmd_ci_utils_is_fork_or_pull_request; then
pmd_ci_log_error "This should not run on forked repositories or pull requests"
exit 0
fi
# only builds on pmd/pmd continue here
pmd_ci_log_group_start "Setup environment"
pmd_ci_setup_secrets_private_env
pmd_ci_setup_secrets_gpg_key
pmd_ci_setup_secrets_ssh
pmd_ci_log_group_end
pmd_ci_log_group_start "Git Sync"
git remote add pmd-sf "${PMD_SF_USER}@git.code.sf.net:/p/pmd/code"
if [ -n "${PMD_CI_BRANCH}" ]; then
retry 5 git push pmd-sf "${PMD_CI_BRANCH}:${PMD_CI_BRANCH}"
pmd_ci_log_success "Successfully pushed ${PMD_CI_BRANCH} to sourceforge"
elif [ -n "${PMD_CI_TAG}" ]; then
git push pmd-sf tag "${PMD_CI_TAG}"
pmd_ci_log_success "Successfully pushed tag ${PMD_CI_TAG} to sourceforge"
else
pmd_ci_log_error "Don't know what to do: neither PMD_CI_BRANCH nor PMD_CI_TAG is set"
exit 1
fi
pmd_ci_log_group_end
}
#
# From: https://gist.github.com/sj26/88e1c6584397bb7c13bd11108a579746
#
# Retry a command up to a specific number of times until it exits successfully,
# with exponential back off.
#
# $ retry 5 echo Hello
# Hello
#
# $ retry 5 false
# Retry 1/5 exited 1, retrying in 1 seconds...
# Retry 2/5 exited 1, retrying in 2 seconds...
# Retry 3/5 exited 1, retrying in 4 seconds...
# Retry 4/5 exited 1, retrying in 8 seconds...
# Retry 5/5 exited 1, no more retries left.
#
function retry {
local retries=$1
shift
local count=0
until "$@"; do
exit=$?
wait=$((2 ** $count))
count=$(($count + 1))
if [ $count -lt $retries ]; then
echo "Retry $count/$retries exited $exit, retrying in $wait seconds..."
sleep $wait
else
echo "Retry $count/$retries exited $exit, no more retries left."
return $exit
fi
done
return 0
}
git_repo_sync
exit 0

View File

@ -1,19 +0,0 @@
#!/usr/bin/env bash
function fetch_ci_scripts() {
local inc_dir
local inc_url
inc_dir="$(dirname "$0")/inc"
inc_url="${PMD_CI_SCRIPTS_URL:-https://raw.githubusercontent.com/pmd/build-tools/main/scripts}/inc"
mkdir -p "${inc_dir}"
for f in ${SCRIPT_INCLUDES}; do
if [ ! -e "${inc_dir}/$f" ]; then
curl -sSL "${inc_url}/$f" > "${inc_dir}/$f"
fi
[ "$PMD_CI_DEBUG" = "true" ] && echo "loading ${inc_dir}/$f in ${MODULE:-$0}"
# shellcheck source=/dev/null
source "${inc_dir}/$f" || exit 1
done
}

View File

@ -1,93 +0,0 @@
#!/usr/bin/env bash
MODULE="pmd-code-api"
SCRIPT_INCLUDES="log.bash"
# shellcheck source=inc/fetch_ci_scripts.bash
source "$(dirname "$0")/inc/fetch_ci_scripts.bash" && fetch_ci_scripts
PMD_CODE_SSH_USER=pmd
PMD_CODE_DOCS_PATH=/docs.pmd-code.org/
function pmd_code_uploadDocumentation() {
local -r pmdVersion="$1"
local -r filename="$2"
local -r basefilename="$(basename "$filename")"
pmd_ci_log_debug "${FUNCNAME[0]} pmdVersion=$pmdVersion filename=$filename"
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}/"
}
function pmd_code_removeDocumentation() {
local pmdVersion="$1"
pmd_ci_log_debug "${FUNCNAME[0]} pmdVersion=$pmdVersion"
# shellcheck disable=SC2029
ssh ${PMD_CODE_SSH_USER}@pmd-code.org "cd \"${PMD_CODE_DOCS_PATH}\" && \
rm -rf \"pmd-doc-${pmdVersion}/\""
pmd_ci_log_info "Removed docs: https://docs.pmd-code.org/pmd-doc-${pmdVersion}/"
}
function pmd_code_createSymlink() {
local -r pmdVersion="$1"
local -r name="$2"
pmd_ci_log_debug "${FUNCNAME[0]} pmdVersion=$pmdVersion name=$name"
# shellcheck disable=SC2029
ssh ${PMD_CODE_SSH_USER}@pmd-code.org "cd \"${PMD_CODE_DOCS_PATH}\" && \
rm -f \"$name\" && \
ln -s \"pmd-doc-${pmdVersion}\" \"$name\""
pmd_ci_log_info "Symlink created: https://docs.pmd-code.org/$name/ -> https://docs.pmd-code.org/pmd-doc-${pmdVersion}/"
}
function pmd_code_uploadJavadoc() {
local -r pmdVersion="$1"
local -r basePath="$2"
pmd_ci_log_debug "${FUNCNAME[0]} pmdVersion=$pmdVersion basePath=$basePath"
for i in "${basePath}"/*/target/*-javadoc.jar */*/target/*-javadoc.jar; do
pmd_code_uploadJavadocModule "$pmdVersion" "$i"
done
# make sure https://docs.pmd-code.org/apidocs/ shows directory index
# shellcheck disable=SC2029
ssh ${PMD_CODE_SSH_USER}@pmd-code.org "cd \"${PMD_CODE_DOCS_PATH}/apidocs\" && \
echo 'Options +Indexes' > .htaccess"
pmd_ci_log_info "Directory index enabled for https://docs.pmd-code.org/apidocs/"
}
function pmd_code_uploadJavadocModule() {
local -r pmdVersion="$1"
local -r moduleJavadocJar="$2"
local -r moduleJavadocJarBasename="$(basename "$moduleJavadocJar")"
local -r module=${moduleJavadocJarBasename%%-${pmdVersion}-javadoc.jar}
pmd_ci_log_debug "${FUNCNAME[0]} pmdVersion=$pmdVersion moduleJavadocJar=$moduleJavadocJar module=$module"
scp "$moduleJavadocJar" ${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}\" && \
mkdir -p \"apidocs/${module}/${pmdVersion}\" && \
unzip -qo -d \"apidocs/${module}/${pmdVersion}\" \"${moduleJavadocJarBasename}\" && \
rm \"${moduleJavadocJarBasename}\""
pmd_ci_log_info "JavaDoc for $module uploaded: https://docs.pmd-code.org/apidocs/${module}/${pmdVersion}/"
}
function pmd_code_removeJavadoc() {
local -r pmdVersion="$1"
pmd_ci_log_debug "${FUNCNAME[0]} pmdVersion=$pmdVersion"
# shellcheck disable=SC2029
ssh ${PMD_CODE_SSH_USER}@pmd-code.org "cd \"${PMD_CODE_DOCS_PATH}\" && \
rm -rf apidocs/*/\"${pmdVersion}\""
pmd_ci_log_info "Removed Javadoc: https://docs.pmd-code.org/apidocs/*/${pmdVersion}/ is gone"
}

View File

@ -1,71 +0,0 @@
#!/usr/bin/env bash
MODULE="pmd-doc"
SCRIPT_INCLUDES="log.bash"
# shellcheck source=inc/fetch_ci_scripts.bash
source "$(dirname "$0")/inc/fetch_ci_scripts.bash" && fetch_ci_scripts
# Used env vars:
# PMD_CI_JOB_URL
# PMD_CI_PUSH_COMMIT_COMPARE
#
# Executes jekyll and generates the documentation
# The documentation will be generated in the directory "docs/_site".
#
function pmd_doc_generate_jekyll_site() {
pushd docs || { echo "Directory 'docs' doesn't exist"; exit 1; }
echo -e "\n\n"
pmd_ci_log_info "Building documentation using jekyll..."
bundle config set --local path vendor/bundle
bundle install
bundle exec jekyll build
popd || exit 1
}
#
# Creates the pmd-doc.zip archive. It will be placed in "docs/".
#
function pmd_doc_create_archive() {
pushd docs || { echo "Directory 'docs' doesn't exist"; exit 1; }
echo -e "\n\n"
pmd_ci_log_info "Creating pmd-doc archive..."
mv _site "pmd-doc-${PMD_CI_MAVEN_PROJECT_VERSION}"
zip -qr "pmd-dist-${PMD_CI_MAVEN_PROJECT_VERSION}-doc.zip" "pmd-doc-${PMD_CI_MAVEN_PROJECT_VERSION}/"
pmd_ci_log_success "Successfully created pmd-dist-${PMD_CI_MAVEN_PROJECT_VERSION}-doc.zip"
popd || exit 1
}
#
# 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() {
echo -e "\n\n"
pmd_ci_log_info "Pushing the new site to github pages..."
git clone --branch gh-pages --depth 1 --origin origin https://github.com/pmd/pmd.git pmd-gh-pages
# clear the files first
rm -rf pmd-gh-pages/*
# copy the new site
cp -a "docs/pmd-doc-${PMD_CI_MAVEN_PROJECT_VERSION}"/* pmd-gh-pages/
(
cd pmd-gh-pages || { echo "Directory 'pmd-gh-pages' doesn't exist"; exit 1; }
git config user.name "PMD CI (pmd-bot)"
git config user.email "pmd-bot@users.noreply.github.com"
git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic $(echo -n "x-access-token:${GITHUB_TOKEN}"|base64)"
git add -A
MSG="Update documentation
${PMD_CI_JOB_URL}
${PMD_CI_PUSH_COMMIT_COMPARE}"
git commit -q -m "$MSG"
git push origin HEAD:gh-pages
git config --local --unset-all http.https://github.com/.extraheader
pmd_ci_log_success "Successfully pushed site to https://pmd.github.io/pmd/"
)
}

View File

@ -1,91 +0,0 @@
#!/usr/bin/env bash
MODULE="pmd-doc"
SCRIPT_INCLUDES="log.bash openjdk.bash"
# shellcheck source=inc/fetch_ci_scripts.bash
source "$(dirname "$0")/inc/fetch_ci_scripts.bash" && fetch_ci_scripts
#
# The functions here require the following environment variables:
# PMD_CI_BRANCH
#
# GITHUB_TOKEN
# PMD_CI_CHUNK_TOKEN
function regression_tester_setup_ci() {
gpg --batch --yes --decrypt --passphrase="GnxdjywUEPveyCD1RLiTd7t8CImnefYr" \
--output .ci/files/public-env .ci/files/public-env.gpg
# shellcheck disable=SC1091
source .ci/files/public-env >/dev/null 2>&1
rm .ci/files/public-env
if hash "bundle" 2>/dev/null; then
pmd_ci_log_debug "Bundler is already installed"
bundle --version
else
pmd_ci_log_info "Installing bundler..."
gem install bundler
fi
rm -f .bundle/config
bundle config set --local path vendor/bundle
bundle config set --local with release_notes_preprocessing
bundle install
}
#
# Generate a new baseline and upload it to pmd-code.org
#
function regression_tester_uploadBaseline() {
local pmdcodeUrl="https://pmd-code.org/pmd-regression-tester/"
local baseline_branch="${PMD_CI_BRANCH:-$PMD_CI_TAG}"
pmd_ci_log_debug "${FUNCNAME[0]} branch=${baseline_branch}"
pmd_ci_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-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/\//_}"
zip -q -r "${BRANCH_FILENAME}-baseline.zip" "${BRANCH_FILENAME}/"
# ssh-key for pmd-code.org is setup already by pmd_ci_setup_secrets_ssh
scp "${BRANCH_FILENAME}-baseline.zip" pmd@pmd-code.org:/httpdocs/pmd-regression-tester/
pmd_ci_log_success "Successfully uploaded ${BRANCH_FILENAME}-baseline.zip to ${pmdcodeUrl}"
popd || exit 1
popd || exit 1
}
#
# Execute danger, which executes pmd-regression-tester (via Dangerfile).
#
function regression_tester_executeDanger() {
pmd_ci_log_debug "${FUNCNAME[0]}"
# git clone initially only fetched with depth 2. Danger and regression tester
# need more history, so we'll fetch more here
# and create local branches as well (${PMD_CI_BRANCH} and pr-fetch)
pmd_ci_log_info "Fetching 25 commits for ${PMD_CI_BRANCH} and pull/${PMD_CI_PULL_REQUEST_NUMBER}/head"
git fetch --no-tags --depth=25 origin "${PMD_CI_BRANCH}:${PMD_CI_BRANCH}" "pull/${PMD_CI_PULL_REQUEST_NUMBER}/head:pr-fetch"
# if the PR is older, base might have advanced more than 25 commits... fetch more, up to 150
for i in $(seq 1 3); do
if [ -z "$( git merge-base "${PMD_CI_BRANCH}" "pr-fetch" )" ]; then
pmd_ci_log_info "No merge-base yet - fetching more commits... (try $i)"
git fetch --no-tags --deepen=50 origin "${PMD_CI_BRANCH}:" "pull/${PMD_CI_PULL_REQUEST_NUMBER}/head:pr-fetch"
fi
done
pmd_ci_log_info "Merge base is: $( git merge-base "${PMD_CI_BRANCH}" "pr-fetch" )"
pmd_ci_log_info "Running danger on branch ${PMD_CI_BRANCH}"
bundle exec danger --verbose
pmd_ci_log_success "Executed danger successfully"
}

14
.gitattributes vendored
View File

@ -1,14 +0,0 @@
* text=auto
*.java text
*.xml text
*.jjt text
*.jj text
*.g4 text
*.md text
*.sh text eol=lf
*.bat text eol=crlf
mvnw.cmd text eol=crlf
*.png -text
*.jpg -text
*.svgz -text
*.jar -text

5
.github/FUNDING.yml vendored
View File

@ -1,5 +0,0 @@
#
# https://docs.github.com/en/github/administering-a-repository/displaying-a-sponsor-button-in-your-repository
#
github: pmd
open_collective: pmd

View File

@ -1,30 +0,0 @@
---
name: Rule violation (false-positive)
about: Let us know about a false-positive (a violation is reported on code that is not problematic)
title: ''
labels: 'a:false-positive'
assignees: ''
---
<!-- Please, prefix the report title with the language it applies to within brackets, such as [java] or [apex] -->
**Affects PMD Version:**
**Rule:**
Please provide the rule name and a link to the rule documentation:
<https://docs.pmd-code.org/latest/pmd_rules_XXX_XXX.html#XXX>
**Description:**
**Code Sample demonstrating the issue:**
```java
```
**Expected outcome:**
PMD reports a violation at line ..., but that's wrong. That's a false positive.
**Running PMD through:** *[CLI | Ant | Maven | Gradle | Designer | Other]*

View File

@ -1,30 +0,0 @@
---
name: Rule violation (false-negative)
about: Let us know about a false-negative (no violation is reported on problematic code)
title: ''
labels: 'a:false-negative'
assignees: ''
---
<!-- Please, prefix the report title with the language it applies to within brackets, such as [java] or [apex] -->
**Affects PMD Version:**
**Rule:**
Please provide the rule name and a link to the rule documentation:
<https://docs.pmd-code.org/latest/pmd_rules_XXX_XXX.html#XXX>
**Description:**
**Code Sample demonstrating the issue:**
```java
```
**Expected outcome:**
PMD should report a violation at line ..., but doesn't. This is a false-negative.
**Running PMD through:** *[CLI | Ant | Maven | Gradle | Designer | Other]*

View File

@ -1,27 +0,0 @@
---
name: New Rule
about: You have an idea for a new rule? Great!
title: ''
labels: 'a:new-rule'
assignees: ''
---
<!-- Please, prefix the report title with the language it applies to within brackets, such as [java] or [apex] -->
**Proposed Rule Name:**
**Proposed Category:** One of [Best Practices | Code Style | Design | Documentation | Error Prone | Multithreading | Performance | Security]
**Description:**
**Code Sample:** This should include code, that should be flagged by the rule. If possible, the "correct" code
according to this new rule should also be demonstrated.
```java
```
**Possible Properties:**
* Should this rule be customizable via properties?

View File

@ -1,20 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: 'an:enhancement'
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context about the feature request here.

View File

@ -1,41 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'a:bug'
assignees: ''
---
<!-- Please, prefix the report title with the language it applies to within brackets, such as [java] or [apex].
If not specific to a language, you can use [core]. -->
**Affects PMD Version:**
Make sure, to test with the latest PMD version.
**Description:**
A clear and concise description of what the bug is.
**Exception Stacktrace:**
```
# Copy-paste the stack trace here
```
**Code Sample demonstrating the issue:**
```java
```
**Steps to reproduce:**
Please provide detailed steps for how we can reproduce the bug.
1. ... (e.g. if you're using maven: `mvn clean verify`)
2. ...
**Running PMD through:** *[CLI | Ant | Maven | Gradle | Designer | Other]*
<!-- If relevant, also include your JDK and OS information, e.g. for ClassNotFoundException, LinkageError, reflection failures, etc. -->

View File

@ -1,11 +0,0 @@
blank_issues_enabled: false
contact_links:
- name: Question
url: https://github.com/pmd/pmd/discussions?discussions_q=category%3AQ%26A
about: Feel free to ask any question about PMD and its usage
- name: PMD Designer Issues
url: https://github.com/pmd/pmd-designer/issues
about: Issues about the rule designer
- name: PMD Eclipse Plugin Issues
url: https://github.com/pmd/pmd-eclipse-plugin/issues
about: Issues about the PMD Eclipse Plugin

View File

@ -1,19 +0,0 @@
## Describe the PR
<!-- A clear and concise description of the bug the PR fixes or the feature the PR introduces. -->
## Related issues
<!-- PR relates to issues in the `pmd` repo: -->
- Fixes #
## Ready?
<!-- If you feel like you can help to check off the following tasks, that'd be great. If not, don't worry - we will take care of it. -->
- [ ] Added unit tests for fixed bug/feature
- [ ] Passing all unit tests
- [ ] Complete build `./mvnw clean verify` passes (checked automatically by github actions)
- [ ] Added (in-code) documentation (if needed)

View File

@ -1,23 +0,0 @@
version: 2
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
updates:
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "bundler"
directories:
- "/"
- "/docs"
schedule:
interval: "weekly"
groups:
all-gems:
patterns: [ "*" ]
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
all-actions:
patterns: [ "*" ]

View File

@ -1,86 +0,0 @@
name: build
on:
push:
branches:
- main
tags:
- '**'
pull_request:
merge_group:
schedule:
# build it monthly: At 04:00 on day-of-month 1.
- cron: '0 4 1 * *'
workflow_dispatch:
inputs:
build_cli_dist_only:
description: "Build only modules cli and dist"
required: true
type: boolean
default: false
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
build:
runs-on: ${{ matrix.os }}
permissions:
# read to fetch code (actions/checkout)
# write to push code to gh-pages, create releases
# note: forked repositories will have maximum read access
contents: write
continue-on-error: false
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: actions/cache@v4
with:
path: |
~/.m2/repository
~/.gradle/caches
~/.cache
~/work/pmd/target/repositories
vendor/bundle
key: v3-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
v3-${{ runner.os }}-
- name: Set up Ruby 3.3
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
- name: Setup Environment
shell: bash
run: |
echo "LANG=en_US.UTF-8" >> $GITHUB_ENV
echo "MAVEN_OPTS=-Daether.connector.http.connectionMaxTtl=180 -DautoReleaseAfterClose=true -DstagingProgressTimeoutMinutes=30" >> $GITHUB_ENV
echo "PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/27/scripts" >> $GITHUB_ENV
- name: Check Environment
shell: bash
run: |
f=check-environment.sh; \
mkdir -p .ci && \
( [ -e .ci/$f ] || curl -sSL "${PMD_CI_SCRIPTS_URL}/$f" > ".ci/$f" ) && \
chmod 755 .ci/$f && \
.ci/$f
- name: Build
run: .ci/build.sh
shell: bash
env:
BUILD_CLI_DIST_ONLY: ${{ inputs.build_cli_dist_only }}
PMD_CI_SECRET_PASSPHRASE: ${{ secrets.PMD_CI_SECRET_PASSPHRASE }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Workaround actions/upload-artifact#176
run: |
echo "artifacts_path=$(realpath ..)" >> $GITHUB_ENV
- name: Upload regression tester report
uses: actions/upload-artifact@v4
with:
name: pmd-regression-tester
path: ${{ env.artifacts_path }}/target/pr-*-diff-report-*.tar.gz
if-no-files-found: ignore

View File

@ -1,32 +0,0 @@
name: git-repo-sync
on:
push:
branches:
- main
tags:
- '**'
workflow_dispatch:
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
build:
runs-on: ubuntu-latest
continue-on-error: false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 100
- name: Setup Environment
shell: bash
run: |
echo "LANG=en_US.UTF-8" >> $GITHUB_ENV
echo "PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/27/scripts" >> $GITHUB_ENV
- name: Sync
run: .ci/git-repo-sync.sh
shell: bash
env:
PMD_CI_SECRET_PASSPHRASE: ${{ secrets.PMD_CI_SECRET_PASSPHRASE }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,58 +0,0 @@
name: troubleshooting
on: workflow_dispatch
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.os }}
continue-on-error: false
strategy:
matrix:
#os: [ ubuntu-latest, windows-latest, macos-latest ]
os: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.m2/repository
~/.gradle/caches
~/.cache
~/work/pmd/target/repositories
vendor/bundle
key: v3-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
v3-${{ runner.os }}-
- name: Set up Ruby 3.3
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
- name: Setup Environment
shell: bash
run: |
echo "LANG=en_US.UTF-8" >> $GITHUB_ENV
echo "MAVEN_OPTS=-Daether.connector.http.connectionMaxTtl=180 -DstagingProgressTimeoutMinutes=30" >> $GITHUB_ENV
echo "PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/27/scripts" >> $GITHUB_ENV
- name: Check Environment
shell: bash
run: |
f=check-environment.sh; \
mkdir -p .ci && \
( [ -e .ci/$f ] || curl -sSL "${PMD_CI_SCRIPTS_URL}/$f" > ".ci/$f" ) && \
chmod 755 .ci/$f && \
.ci/$f
- name: Build
run: |
f=openjdk.bash; \
mkdir -p .ci/inc && \
( [ -e .ci/inc/$f ] || curl -sSL "${PMD_CI_SCRIPTS_URL}/inc/$f" > ".ci/inc/$f" ) && \
source .ci/inc/$f ; \
pmd_ci_openjdk_install_adoptium 11 ; \
pmd_ci_openjdk_setdefault 11
shell: bash
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3

24
.gitignore vendored
View File

@ -1,24 +0,0 @@
target/
bin/
.project
.classpath
.checkstyle
.pmd
.pmdruleset.xml
.ruleset
.settings/
*.iml
.idea
*.patch
*/src/site/site.xml
pmd-core/dependency-reduced-pom.xml
.bundle
vendor
.DS_Store
# node modules for https://allcontributors.org/docs/en/cli/installation
node_modules
# rule docs are generated
docs/pages/pmd/rules
.history/*

View File

@ -1,19 +0,0 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
wrapperVersion=3.3.2
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.8/apache-maven-3.9.8-bin.zip

View File

@ -1,44 +0,0 @@
# How to build PMD
PMD uses [Maven](https://maven.apache.org/) and requires at least Java 11 for building.
You can get Java 11 from [Oracle](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
or from [AdoptOpenJdk](https://adoptopenjdk.net/).
PMD uses the [maven wrapper](https://maven.apache.org/wrapper/), so you can simply build PMD as following:
* `./mvnw clean verify` (on Unix-like platform such as Linux and Mac OS X)
* `mvnw.cmd clean verify` (on Windows)
This will create the zip files in the directory `pmd-dist/target`:
cd pmd-dist/target
ls *.zip
That's all !
**Note:** While Java 11 is required for building, running PMD only requires Java 7
(or Java 8 for Apex, JavaScript, Scala, Visualforce, and the Designer).
**Note:** With PMD 6.24.0, we are creating [Reproducible Builds](https://reproducible-builds.org/). Since we use
[Maven](https://maven.apache.org/guides/mini/guide-reproducible-builds.html) for building, the following
limitations apply:
* Generally give **different results on Windows and Unix** because of different newlines.
(carriage return linefeed on Windows, linefeed on Unixes).
We build our releases under **Linux** on [Github Actions](https://github.com/pmd/pmd/actions).
* Generally depend on the **major version of the JDK** used to compile. (Even with source/target defined,
each major JDK version changes the generated bytecode.).
We build our releases using OpenJDK 11.
## How to build the documentation?
cd docs
bundle install # once
bundle exec jekyll build
You'll find the built site in the directory `_site/`.
For more info, see [README in docs directory](docs/README.md).

View File

@ -1,76 +0,0 @@
# How to contribute to PMD
First off, thanks for taking the time to contribute!
Please note that this project is released with a Contributor Code of Conduct.
By participating in this project you agree to abide by its terms.
You can find the code of conduct in the file [code_of_conduct.md](code_of_conduct.md).
| NB: the rule designer is developed over at [pmd/pmd-designer](https://github.com/pmd/pmd-designer). Please refer to the specific [contributor documentation](https://github.com/pmd/pmd-designer/blob/main/CONTRIBUTING.md) if your issue, feature request or PR touches the designer. |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
## Pull requests
* Please create your pull request against the `main` branch. We will rebase/merge it to the maintenance
branches, if necessary.
* We are using [checkstyle](http://checkstyle.sourceforge.net/) to enforce a common code style.
The check is integrated into the default build - so, make sure, you can [build PMD](BUILDING.md) without errors.
See [code style](#code-style) for more info.
## Bug reports
We use the issue tracker on Github. Please report new bugs at <https://github.com/pmd/pmd/issues>.
When filing a bug report, please provide as much information as possible, so that we can reproduce the issue:
* The name of the rule, that is buggy
* A code snippet, which triggers a false positive/negative or crash
* How do you execute PMD? (command line, ant, maven, gradle, other)
## Documentation
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/main/docs>. You can find build instructions there.
For more on contributing documentation check <https://docs.pmd-code.org/latest/pmd_devdocs_writing_documentation.html>
## Questions
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 new discussion for your question at <https://github.com/pmd/pmd/discussions>.
* Ask your question in our [Gitter room](https://app.gitter.im/#/room/#pmd_pmd:gitter.im).
## Code Style
PMD uses [checkstyle](http://checkstyle.sourceforge.net/) to enforce a common code style.
See [pmd-checkstyle-config.xml](https://github.com/pmd/build-tools/blob/main/src/main/resources/net/sourceforge/pmd/pmd-checkstyle-config.xml) for the configuration and
[the eclipse configuration files](https://github.com/pmd/build-tools/tree/main/eclipse) that can
be imported into a fresh workspace.
## Add yourself as contributor
We use [All Contributors](https://allcontributors.org/en).
To add yourself to the table of contributors, follow the
[bot usage instructions](https://allcontributors.org/docs/en/bot/usage) ;).
Or use the CLI:
1. Install the CLI: `npm i` (in PMD's top level directory)
2. Add yourself: `npx all-contributors add <username> <contribution>`
Where `username` is your GitHub username and `contribution` is a `,`-separated list
of contributions. See [Emoji Key](https://allcontributors.org/docs/en/emoji-key) for a list
of valid types. Common types are: "code", "doc", "bug", "blog", "talk", "test", "tutorial".
See also [cli documentation](https://allcontributors.org/docs/en/cli/usage)

View File

@ -1,98 +0,0 @@
require 'pmdtester'
require 'time'
require 'logger'
require 'fileutils'
require 'etc'
@logger = Logger.new(STDOUT)
def get_args(base_branch, autogen = true, patch_config = './pmd/.ci/files/all-regression-rules.xml')
['--local-git-repo', './pmd',
'--list-of-project', './pmd/.ci/files/project-list.xml',
'--base-branch', base_branch,
'--patch-branch', 'HEAD',
'--patch-config', patch_config,
'--mode', 'online',
autogen ? '--auto-gen-config' : '--filter-with-patch-config',
'--keep-reports',
'--error-recovery',
'--baseline-download-url', 'https://pmd-code.org/pmd-regression-tester/',
'--threads', Etc.nprocessors.to_s,
# '--debug',
]
end
def run_pmdtester
Dir.chdir('..') do
begin
@base_branch = ENV['PMD_CI_BRANCH']
@logger.info "\n\n--------------------------------------"
@logger.info "Run against PR base #{@base_branch}"
@summary = PmdTester::Runner.new(get_args(@base_branch)).run
unless Dir.exist?('target/reports/diff')
message("No regression tested rules have been changed.", sticky: true)
return
end
# move the generated report out of the way
FileUtils.mv 'target/reports/diff', 'target/diff1'
message1 = create_message
# run against main branch (if the PR is not already against main)
unless ENV['PMD_CI_BRANCH'] == 'main'
@base_branch = 'main'
@logger.info "\n\n--------------------------------------"
@logger.info "Run against #{@base_branch}"
@summary = PmdTester::Runner.new(get_args(@base_branch, false, 'target/diff1/patch_config.xml')).run
# move the generated report out of the way
FileUtils.mv 'target/reports/diff', 'target/diff2'
message2 = create_message
end
tar_report
message1 += "[Download full report as build artifact](#{ENV['PMD_CI_JOB_URL']}?pr=#{ENV['PMD_CI_PULL_REQUEST_NUMBER']})"
# set value of sticky to true and the message is kept after new commits are submitted to the PR
message(message1, sticky: true)
if message2
message2 += "[Download full report as build artifact](#{ENV['PMD_CI_JOB_URL']}?pr=#{ENV['PMD_CI_PULL_REQUEST_NUMBER']})"
# set value of sticky to true and the message is kept after new commits are submitted to the PR
message(message2, sticky: true)
end
rescue StandardError => e
warn("Running pmdtester failed, this message is mainly used to remind the maintainers of PMD.")
@logger.error "Running pmdtester failed: #{e.inspect}"
end
end
end
def create_message
"Compared to #{@base_branch}:\n"\
"This changeset " \
"changes #{@summary[:violations][:changed]} violations,\n" \
"introduces #{@summary[:violations][:new]} new violations, " \
"#{@summary[:errors][:new]} new errors and " \
"#{@summary[:configerrors][:new]} new configuration errors,\n" \
"removes #{@summary[:violations][:removed]} violations, "\
"#{@summary[:errors][:removed]} errors and " \
"#{@summary[:configerrors][:removed]} configuration errors.\n"
end
def tar_report
Dir.chdir('target') do
tar_filename = "pr-#{ENV['PMD_CI_PULL_REQUEST_NUMBER']}-diff-report-#{Time.now.strftime("%Y-%m-%dT%H-%M-%SZ")}.tar.gz"
`tar czf #{tar_filename} diff1/ diff2/`
tar_size = (10 * File.size(tar_filename) / 1024 / 1024)/10.0
@logger.info "Created file #{tar_filename} (#{tar_size}mb)"
end
end
# Perform regression testing
run_pmdtester
# vim: syntax=ruby

19
Gemfile
View File

@ -1,19 +0,0 @@
source 'https://rubygems.org/'
# bleeding edge from git
#gem 'pmdtester', :git => 'https://github.com/pmd/pmd-regression-tester.git', branch: 'main'
gem 'pmdtester'
gem 'danger'
# This group is only needed for rendering release notes (docs/render_release_notes.rb)
# this happens during release (.ci/build.sh and do-release.sh)
# but also during regular builds (.ci/build.sh)
group :release_notes_preprocessing do
gem 'liquid'
gem 'safe_yaml'
gem 'rouge'
gem 'bigdecimal'
end
# vim: syntax=ruby

Some files were not shown because too many files have changed in this diff Show More