Compare commits
377
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f766035a4 | ||
|
|
9da17877ac | ||
|
|
3e9e128aa7 | ||
|
|
918684c154 | ||
|
|
e63edf358e | ||
|
|
0d11f151bd | ||
|
|
28b4139cd4 | ||
|
|
d61f691559 | ||
|
|
12f7f98803 | ||
|
|
2e4f16d516 | ||
|
|
46ef55c9a9 | ||
|
|
79c0ce0415 | ||
|
|
8fdfd369b0 | ||
|
|
80b8bc47df | ||
|
|
a9b6c946b4 | ||
|
|
2910ab0403 | ||
|
|
5a0220da2e | ||
|
|
bc4a49deac | ||
|
|
a40c30c8c1 | ||
|
|
44c15aae6d | ||
|
|
85aeebbab0 | ||
|
|
a5925eb5ea | ||
|
|
c456396931 | ||
|
|
1ee0f53608 | ||
|
|
e60f460e02 | ||
|
|
ee1ab976bc | ||
|
|
15cab177d2 | ||
|
|
b6f45ed618 | ||
|
|
1ceae38880 | ||
|
|
f7de8d3e7e | ||
|
|
59864a7c6c | ||
|
|
a6746fcffa | ||
|
|
aad8e93a2f | ||
|
|
3bb943e0e5 | ||
|
|
3356dd949d | ||
|
|
b264fa14e1 | ||
|
|
c1aa4e0381 | ||
|
|
a72ac5845b | ||
|
|
4e1f4be009 | ||
|
|
c73e5cb8b1 | ||
|
|
5931b6601c | ||
|
|
9d15c900db | ||
|
|
69a24126f7 | ||
|
|
ef3a4cc15e | ||
|
|
4ef8fb21a9 | ||
|
|
f803aa36dc | ||
|
|
0cf8f2c18b | ||
|
|
178f9541e2 | ||
|
|
79026f98c9 | ||
|
|
0e0f347f51 | ||
|
|
0d606a7122 | ||
|
|
d60b234a47 | ||
|
|
b050ce353e | ||
|
|
32f55e22e3 | ||
|
|
206ed8bbd3 | ||
|
|
e1d4f27e19 | ||
|
|
093683bc59 | ||
|
|
509452577d | ||
|
|
991bc2c41d | ||
|
|
8c58a0b3f5 | ||
|
|
01b8ca765b | ||
|
|
3fdbf7d6cb | ||
|
|
bb729e02f4 | ||
|
|
bf388d7fd0 | ||
|
|
61eb116833 | ||
|
|
634a525286 | ||
|
|
2df68ed168 | ||
|
|
04dfb782f0 | ||
|
|
a79d3e6557 | ||
|
|
bb2782241e | ||
|
|
2340168421 | ||
|
|
e5a1236981 | ||
|
|
ed5e862aa3 | ||
|
|
529693c916 | ||
|
|
1a9e721fb6 | ||
|
|
4e4ca6bb70 | ||
|
|
3659a2cb7d | ||
|
|
07de5559bc | ||
|
|
b05b8240a7 | ||
|
|
ee7d6fed3e | ||
|
|
fe88498ee8 | ||
|
|
944e1e8f7a | ||
|
|
ca208d2241 | ||
|
|
9dcb697f13 | ||
|
|
733ac4bba0 | ||
|
|
1ee6494429 | ||
|
|
a1996554d8 | ||
|
|
e15c05721e | ||
|
|
f0daed5874 | ||
|
|
36dfcf8211 | ||
|
|
83d8ca0169 | ||
|
|
be3c34fe1a | ||
|
|
52fb6c814b | ||
|
|
93929deef6 | ||
|
|
3ed370f61d | ||
|
|
5eaefd2841 | ||
|
|
a709be1dcb | ||
|
|
c079d8c544 | ||
|
|
7bfa581511 | ||
|
|
6ae7404941 | ||
|
|
94095df872 | ||
|
|
7119424d96 | ||
|
|
69a92de52d | ||
|
|
73dbc7a67f | ||
|
|
c81cd1d520 | ||
|
|
4473aa6667 | ||
|
|
97d68e331c | ||
|
|
16eafc89c2 | ||
|
|
d68d6c57ef | ||
|
|
9c098b2531 | ||
|
|
3f697aff35 | ||
|
|
74ec6f45ee | ||
|
|
c179834288 | ||
|
|
7739f2b840 | ||
|
|
919e73f6b0 | ||
|
|
e2d59c0e64 | ||
|
|
8f2d47dfb7 | ||
|
|
e6097d6090 | ||
|
|
5e83246469 | ||
|
|
62c2858f70 | ||
|
|
0d8878d58e | ||
|
|
4b23718aac | ||
|
|
3a501a0f6b | ||
|
|
36654ed52e | ||
|
|
45b1217485 | ||
|
|
662759755d | ||
|
|
d9d6b57f2a | ||
|
|
6c35c73919 | ||
|
|
e37f82b62d | ||
|
|
6f5af6e585 | ||
|
|
66d879f707 | ||
|
|
93f6279ea7 | ||
|
|
156f293ef3 | ||
|
|
40ed4590be | ||
|
|
7358289bbe | ||
|
|
a180258033 | ||
|
|
63675eaa18 | ||
|
|
49f2c15b83 | ||
|
|
15520211b5 | ||
|
|
c4b8f18a36 | ||
|
|
c95817a75d | ||
|
|
09b0864eff | ||
|
|
1517a18956 | ||
|
|
61b1c372cd | ||
|
|
97fe389dcc | ||
|
|
7df70ea7c1 | ||
|
|
7ad4e0f0fc | ||
|
|
c47f5a6062 | ||
|
|
6d55f6f053 | ||
|
|
b60b4d8a68 | ||
|
|
5df7dccfb6 | ||
|
|
f4941433ce | ||
|
|
665504decc | ||
|
|
ef0db9a166 | ||
|
|
fd8fcd67d6 | ||
|
|
dafdc964a5 | ||
|
|
81429a4628 | ||
|
|
fb94e2493c | ||
|
|
a0d4b38b53 | ||
|
|
f317e8bee5 | ||
|
|
99f4c9c044 | ||
|
|
656b9052ad | ||
|
|
f0375d61dd | ||
|
|
a24c8aa002 | ||
|
|
5ffb953191 | ||
|
|
d5faa1c74a | ||
|
|
867b142ee4 | ||
|
|
0ea42b94e0 | ||
|
|
f834b8744d | ||
|
|
ab1976382a | ||
|
|
08bcf29190 | ||
|
|
85e0695ca6 | ||
|
|
47a59b1810 | ||
|
|
e50234563e | ||
|
|
9a123bff94 | ||
|
|
9077c6a71f | ||
|
|
36f713b4c7 | ||
|
|
ed6312e3ba | ||
|
|
8ac55e7ad7 | ||
|
|
6bd7a9db8e | ||
|
|
7655cfc63b | ||
|
|
fbde9b967f | ||
|
|
7ae3155325 | ||
|
|
c595fea83f | ||
|
|
8b2af2db8a | ||
|
|
54dfabea9b | ||
|
|
07840cace2 | ||
|
|
ff1b9b2cdd | ||
|
|
b724b4dd33 | ||
|
|
2c1a7f026e | ||
|
|
f68130eaf9 | ||
|
|
31018611c6 | ||
|
|
e3cd599da2 | ||
|
|
ca71d76553 | ||
|
|
93a019765d | ||
|
|
00bf6fe2f7 | ||
|
|
377670f267 | ||
|
|
5ecc29245b | ||
|
|
079eb238b9 | ||
|
|
b3157825d8 | ||
|
|
6f081e111a | ||
|
|
59403fc9e1 | ||
|
|
13cc79af62 | ||
|
|
1f31f771ad | ||
|
|
d9db4dbcab | ||
|
|
855e5175d4 | ||
|
|
b87944a565 | ||
|
|
90f436fd28 | ||
|
|
375fb72f3c | ||
|
|
49deb8d4a0 | ||
|
|
312d8e46ae | ||
|
|
e5ff5532d4 | ||
|
|
0c858b0a7b | ||
|
|
a0818d5ab2 | ||
|
|
5ce4d292fa | ||
|
|
d2c42d2426 | ||
|
|
c6fd064054 | ||
|
|
07cd250a74 | ||
|
|
c0023dd942 | ||
|
|
9fbaa4fbfb | ||
|
|
7d4961f303 | ||
|
|
9337e5a7a2 | ||
|
|
33c737718c | ||
|
|
b7c4a5e492 | ||
|
|
d77a63da95 | ||
|
|
463ca964dc | ||
|
|
57497738c1 | ||
|
|
525435bd68 | ||
|
|
c5246eca46 | ||
|
|
4796da0fb2 | ||
|
|
7dcab3f189 | ||
|
|
39b8bdf171 | ||
|
|
5fe19b2096 | ||
|
|
d8d4d3d061 | ||
|
|
6d48907259 | ||
|
|
5261a6d60e | ||
|
|
ac8c873168 | ||
|
|
c2445c7bb5 | ||
|
|
03fba2443a | ||
|
|
6f518c8304 | ||
|
|
c84ffb8e0b | ||
|
|
74f9d75897 | ||
|
|
a2b5ae64a7 | ||
|
|
242b45a180 | ||
|
|
083e296c1e | ||
|
|
e4107ccaaa | ||
|
|
028444453d | ||
|
|
29ed91795b | ||
|
|
4930e98706 | ||
|
|
7b5ef10093 | ||
|
|
1acaedc158 | ||
|
|
b03a46fa8c | ||
|
|
ae080786bd | ||
|
|
687f7f89e4 | ||
|
|
cd50d392d1 | ||
|
|
2bdeadb094 | ||
|
|
ddb1eb8dd8 | ||
|
|
8ea3f32f5f | ||
|
|
2c48dc0644 | ||
|
|
df1a6797c6 | ||
|
|
802decbbcf | ||
|
|
9490dc0043 | ||
|
|
909e86ca99 | ||
|
|
36c1738135 | ||
|
|
d2d9ddff4a | ||
|
|
ac2e476e4c | ||
|
|
6e65c2b3ab | ||
|
|
dd6e64a94d | ||
|
|
dff06c9b4d | ||
|
|
cae71e7a5e | ||
|
|
029130a478 | ||
|
|
e18336a581 | ||
|
|
4ab926209e | ||
|
|
5f42a45bbe | ||
|
|
0253b9d3cd | ||
|
|
8a9aec831d | ||
|
|
59c88e9bb0 | ||
|
|
31efceae4d | ||
|
|
0889e3d9dc | ||
|
|
47f204cb19 | ||
|
|
91f17838d4 | ||
|
|
77b763e321 | ||
|
|
469b2a67ae | ||
|
|
b410199992 | ||
|
|
537148c90a | ||
|
|
341e089a47 | ||
|
|
6d1fb3e4cd | ||
|
|
aae54f4b33 | ||
|
|
48c2e325dc | ||
|
|
efa875727d | ||
|
|
04b3361dec | ||
|
|
e6346ab6b9 | ||
|
|
402eed5073 | ||
|
|
6fddf06b49 | ||
|
|
2cfbac30b1 | ||
|
|
5f1b13cadd | ||
|
|
1038eaa283 | ||
|
|
fe0d05d8d5 | ||
|
|
97fe106724 | ||
|
|
9810bfc3cc | ||
|
|
6b0a2a1ffa | ||
|
|
92bab6a38f | ||
|
|
9ecc8897be | ||
|
|
68820a4c77 | ||
|
|
9d925b513d | ||
|
|
7ba88e9eba | ||
|
|
07ae01b4ea | ||
|
|
c46fe6e6aa | ||
|
|
eee22e0c17 | ||
|
|
aa9a38de0e | ||
|
|
fe341cf400 | ||
|
|
73d3c59205 | ||
|
|
88596a2f5a | ||
|
|
025356dadc | ||
|
|
52c66e4dad | ||
|
|
2ed25964b8 | ||
|
|
74ada426af | ||
|
|
453f6690b0 | ||
|
|
bff14449b2 | ||
|
|
8b44d2f374 | ||
|
|
537dab95e4 | ||
|
|
819b6bc5fb | ||
|
|
ada303de83 | ||
|
|
a44a5ca4ef | ||
|
|
c6ef54326c | ||
|
|
488807ff90 | ||
|
|
20b667d7e4 | ||
|
|
773f792dd6 | ||
|
|
d7f564782a | ||
|
|
610f937bc4 | ||
|
|
3c3be3c81d | ||
|
|
a4cac6b74f | ||
|
|
93db59bea5 | ||
|
|
672fd635c9 | ||
|
|
93bfe7df0f | ||
|
|
d7d8c9cb29 | ||
|
|
9c0c7f28e2 | ||
|
|
e597e21eda | ||
|
|
60e0109bbb | ||
|
|
d7a15d1854 | ||
|
|
08b68d7dd0 | ||
|
|
d6736903f0 | ||
|
|
8a39917fa2 | ||
|
|
3dd47a3b94 | ||
|
|
b51be09795 | ||
|
|
13b8556bf6 | ||
|
|
21d499d5ef | ||
|
|
17a4a487a6 | ||
|
|
c53462b3b6 | ||
|
|
d171bcbdb3 | ||
|
|
cbc475ede3 | ||
|
|
55d57acc63 | ||
|
|
0823c88cba | ||
|
|
47470b5d0c | ||
|
|
176e522721 | ||
|
|
7a6662fcda | ||
|
|
bb40b754a2 | ||
|
|
20750f9591 | ||
|
|
a7eab294b4 | ||
|
|
10681cd6a8 | ||
|
|
f13e886757 | ||
|
|
2a04d9858a | ||
|
|
568314bb89 | ||
|
|
f7b5398a04 | ||
|
|
dbe5624a9e | ||
|
|
8b1da5d651 | ||
|
|
838705c8da | ||
|
|
f24635b55c | ||
|
|
5b42381061 | ||
|
|
61a7459247 | ||
|
|
bd89f9185b | ||
|
|
7725897373 | ||
|
|
9f1ab89d31 | ||
|
|
ffec30f392 | ||
|
|
5301a8e852 | ||
|
|
691731cdd4 | ||
|
|
55686dbef4 |
No files matched your search
+160
-2
@@ -1929,7 +1929,8 @@
|
|||||||
"avatar_url": "https://avatars.githubusercontent.com/u/1444125?v=4",
|
"avatar_url": "https://avatars.githubusercontent.com/u/1444125?v=4",
|
||||||
"profile": "http://www.linkedin.com/in/chonton",
|
"profile": "http://www.linkedin.com/in/chonton",
|
||||||
"contributions": [
|
"contributions": [
|
||||||
"bug"
|
"bug",
|
||||||
|
"code"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -7452,7 +7453,8 @@
|
|||||||
"avatar_url": "https://avatars.githubusercontent.com/u/16755668?v=4",
|
"avatar_url": "https://avatars.githubusercontent.com/u/16755668?v=4",
|
||||||
"profile": "https://github.com/emouty",
|
"profile": "https://github.com/emouty",
|
||||||
"contributions": [
|
"contributions": [
|
||||||
"code"
|
"code",
|
||||||
|
"bug"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -7515,6 +7517,7 @@
|
|||||||
"avatar_url": "https://avatars.githubusercontent.com/u/18402464?v=4",
|
"avatar_url": "https://avatars.githubusercontent.com/u/18402464?v=4",
|
||||||
"profile": "https://github.com/mitchspano",
|
"profile": "https://github.com/mitchspano",
|
||||||
"contributions": [
|
"contributions": [
|
||||||
|
"code",
|
||||||
"bug"
|
"bug"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -7735,6 +7738,161 @@
|
|||||||
"contributions": [
|
"contributions": [
|
||||||
"bug"
|
"bug"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "AB-xdev",
|
||||||
|
"name": "Alex B",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/45384811?v=4",
|
||||||
|
"profile": "https://xdev.software/",
|
||||||
|
"contributions": [
|
||||||
|
"bug"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "dschach",
|
||||||
|
"name": "David Schach",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/636977?v=4",
|
||||||
|
"profile": "https://github.com/dschach",
|
||||||
|
"contributions": [
|
||||||
|
"bug",
|
||||||
|
"code",
|
||||||
|
"doc"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "vedantchokshi",
|
||||||
|
"name": "Vedant Chokshi",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/22137048?v=4",
|
||||||
|
"profile": "https://github.com/vedantchokshi",
|
||||||
|
"contributions": [
|
||||||
|
"bug"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "random1223",
|
||||||
|
"name": "Tony",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/3987237?v=4",
|
||||||
|
"profile": "https://codety.io/",
|
||||||
|
"contributions": [
|
||||||
|
"doc"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "imax-erik",
|
||||||
|
"name": "imax-erik",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/62863607?v=4",
|
||||||
|
"profile": "https://github.com/imax-erik",
|
||||||
|
"contributions": [
|
||||||
|
"bug"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "lukasgraef",
|
||||||
|
"name": "Lukas Gräf",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/48957581?v=4",
|
||||||
|
"profile": "https://github.com/lukasgraef",
|
||||||
|
"contributions": [
|
||||||
|
"code"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "SaschaRiemer",
|
||||||
|
"name": "Sascha Riemer",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/108794941?v=4",
|
||||||
|
"profile": "https://github.com/SaschaRiemer",
|
||||||
|
"contributions": [
|
||||||
|
"bug"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "kratoon",
|
||||||
|
"name": "Ondrej Kratochvil",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/26163421?v=4",
|
||||||
|
"profile": "https://github.com/kratoon",
|
||||||
|
"contributions": [
|
||||||
|
"bug"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "mattr9124",
|
||||||
|
"name": "Matthew Rossner",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/8940608?v=4",
|
||||||
|
"profile": "https://github.com/mattr9124",
|
||||||
|
"contributions": [
|
||||||
|
"bug"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "thesunlover",
|
||||||
|
"name": "Iskren Stanislavov",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/6734600?v=4",
|
||||||
|
"profile": "https://interop.io/",
|
||||||
|
"contributions": [
|
||||||
|
"bug"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "gudzpoz",
|
||||||
|
"name": "gudzpoz",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/14026120?v=4",
|
||||||
|
"profile": "https://kyo.iroiro.party/",
|
||||||
|
"contributions": [
|
||||||
|
"bug"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "phansys",
|
||||||
|
"name": "Javier Spagnoletti",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/1231441?v=4",
|
||||||
|
"profile": "https://github.com/phansys",
|
||||||
|
"contributions": [
|
||||||
|
"bug"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "Aryant-Tripathi",
|
||||||
|
"name": "Aryant Tripathi",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/60316716?v=4",
|
||||||
|
"profile": "https://github.com/Aryant-Tripathi",
|
||||||
|
"contributions": [
|
||||||
|
"code"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "jdupak",
|
||||||
|
"name": "Jakub Dupak",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/22683640?v=4",
|
||||||
|
"profile": "https://github.com/jdupak",
|
||||||
|
"contributions": [
|
||||||
|
"code"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "chenguangqi",
|
||||||
|
"name": "天热吃西瓜",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/6231010?v=4",
|
||||||
|
"profile": "http://chenguangqi.github.io/",
|
||||||
|
"contributions": [
|
||||||
|
"bug"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "wahajenius",
|
||||||
|
"name": "Willem A. Hajenius",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/7836322?v=4",
|
||||||
|
"profile": "https://github.com/wahajenius",
|
||||||
|
"contributions": [
|
||||||
|
"code"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "VitaliiIevtushenko",
|
||||||
|
"name": "Vitalii Yevtushenko",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/11145125?v=4",
|
||||||
|
"profile": "https://github.com/VitaliiIevtushenko",
|
||||||
|
"contributions": [
|
||||||
|
"bug"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"contributorsPerLine": 7,
|
"contributorsPerLine": 7,
|
||||||
|
|||||||
+3
-3
@@ -45,12 +45,12 @@ Start docker without binding to local directory, so that we can do a fresh check
|
|||||||
|
|
||||||
```
|
```
|
||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
export PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/master/scripts
|
export PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/main/scripts
|
||||||
|
|
||||||
export PMD_CI_SECRET_PASSPHRASE="xyz"
|
export PMD_CI_SECRET_PASSPHRASE="xyz"
|
||||||
export PMD_CI_DEBUG=true
|
export PMD_CI_DEBUG=true
|
||||||
|
|
||||||
MAIN_BRANCH="master"
|
MAIN_BRANCH="main"
|
||||||
eval $(~/create-gh-actions-env.sh push pmd/pmd $MAIN_BRANCH)
|
eval $(~/create-gh-actions-env.sh push pmd/pmd $MAIN_BRANCH)
|
||||||
|
|
||||||
cd /workspaces/pmd
|
cd /workspaces/pmd
|
||||||
@@ -108,7 +108,7 @@ $(~/create-gh-actions-env.sh push adangel/pmd $MAIN_BRANCH)
|
|||||||
|
|
||||||
```
|
```
|
||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
export PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/master/scripts
|
export PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/main/scripts
|
||||||
|
|
||||||
export PMD_CI_SECRET_PASSPHRASE="xyz"
|
export PMD_CI_SECRET_PASSPHRASE="xyz"
|
||||||
export PMD_CI_DEBUG=true
|
export PMD_CI_DEBUG=true
|
||||||
|
|||||||
+4
-4
@@ -280,9 +280,9 @@ function pmd_ci_deploy_build_artifacts() {
|
|||||||
# Renders release notes and uploads them as ReadMe.md to sourceforge
|
# Renders release notes and uploads them as ReadMe.md to sourceforge
|
||||||
#
|
#
|
||||||
function pmd_ci_build_and_upload_doc() {
|
function pmd_ci_build_and_upload_doc() {
|
||||||
# generate the site only for snapshots from master and for release builds for case a) (everything without cli/dist)
|
# generate the site only for snapshots from main and for release builds for case a) (everything without cli/dist)
|
||||||
# to avoid building it twice during a release...
|
# to avoid building it twice during a release...
|
||||||
if pmd_ci_maven_isSnapshotBuild && [ "${PMD_CI_BRANCH}" = "master" ] || [ "${BUILD_CLI_DIST_ONLY}" = "false" ]; then
|
if pmd_ci_maven_isSnapshotBuild && [ "${PMD_CI_BRANCH}" = "main" ] || [ "${BUILD_CLI_DIST_ONLY}" = "false" ]; then
|
||||||
pmd_doc_generate_jekyll_site
|
pmd_doc_generate_jekyll_site
|
||||||
pmd_doc_create_archive
|
pmd_doc_create_archive
|
||||||
|
|
||||||
@@ -312,8 +312,8 @@ function pmd_ci_build_and_upload_doc() {
|
|||||||
pmd_ci_sourceforge_uploadReleaseNotes "pmd/${PMD_CI_MAVEN_PROJECT_VERSION}" "${rendered_release_notes}"
|
pmd_ci_sourceforge_uploadReleaseNotes "pmd/${PMD_CI_MAVEN_PROJECT_VERSION}" "${rendered_release_notes}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if pmd_ci_maven_isSnapshotBuild && [ "${PMD_CI_BRANCH}" = "master" ]; then
|
if pmd_ci_maven_isSnapshotBuild && [ "${PMD_CI_BRANCH}" = "main" ]; then
|
||||||
# only for snapshot builds from branch master: https://docs.pmd-code.org/snapshot -> pmd-doc-${PMD_CI_MAVEN_PROJECT_VERSION}
|
# only for snapshot builds from branch main: https://docs.pmd-code.org/snapshot -> pmd-doc-${PMD_CI_MAVEN_PROJECT_VERSION}
|
||||||
pmd_code_createSymlink "${PMD_CI_MAVEN_PROJECT_VERSION}" "snapshot"
|
pmd_code_createSymlink "${PMD_CI_MAVEN_PROJECT_VERSION}" "snapshot"
|
||||||
|
|
||||||
# update github pages https://pmd.github.io/pmd/
|
# update github pages https://pmd.github.io/pmd/
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ function fetch_ci_scripts() {
|
|||||||
local inc_dir
|
local inc_dir
|
||||||
local inc_url
|
local inc_url
|
||||||
inc_dir="$(dirname "$0")/inc"
|
inc_dir="$(dirname "$0")/inc"
|
||||||
inc_url="${PMD_CI_SCRIPTS_URL:-https://raw.githubusercontent.com/pmd/build-tools/master/scripts}/inc"
|
inc_url="${PMD_CI_SCRIPTS_URL:-https://raw.githubusercontent.com/pmd/build-tools/main/scripts}/inc"
|
||||||
|
|
||||||
mkdir -p "${inc_dir}"
|
mkdir -p "${inc_dir}"
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- master
|
|
||||||
tags:
|
tags:
|
||||||
- '**'
|
- '**'
|
||||||
pull_request:
|
pull_request:
|
||||||
@@ -60,7 +59,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "LANG=en_US.UTF-8" >> $GITHUB_ENV
|
echo "LANG=en_US.UTF-8" >> $GITHUB_ENV
|
||||||
echo "MAVEN_OPTS=-Daether.connector.http.connectionMaxTtl=180 -DautoReleaseAfterClose=true -DstagingProgressTimeoutMinutes=30" >> $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/26/scripts" >> $GITHUB_ENV
|
echo "PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/27/scripts" >> $GITHUB_ENV
|
||||||
- name: Check Environment
|
- name: Check Environment
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- master
|
|
||||||
tags:
|
tags:
|
||||||
- '**'
|
- '**'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@@ -24,7 +23,7 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "LANG=en_US.UTF-8" >> $GITHUB_ENV
|
echo "LANG=en_US.UTF-8" >> $GITHUB_ENV
|
||||||
echo "PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/26/scripts" >> $GITHUB_ENV
|
echo "PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/27/scripts" >> $GITHUB_ENV
|
||||||
- name: Sync
|
- name: Sync
|
||||||
run: .ci/git-repo-sync.sh
|
run: .ci/git-repo-sync.sh
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "LANG=en_US.UTF-8" >> $GITHUB_ENV
|
echo "LANG=en_US.UTF-8" >> $GITHUB_ENV
|
||||||
echo "MAVEN_OPTS=-Daether.connector.http.connectionMaxTtl=180 -DstagingProgressTimeoutMinutes=30" >> $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/26/scripts" >> $GITHUB_ENV
|
echo "PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/27/scripts" >> $GITHUB_ENV
|
||||||
- name: Check Environment
|
- name: Check Environment
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
+6
-6
@@ -7,12 +7,12 @@ 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).
|
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/master/CONTRIBUTING.md) if your issue, feature request or PR touches the designer. |
|
| 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
|
## Pull requests
|
||||||
|
|
||||||
* Please create your pull request against the `master` branch. We will rebase/merge it to the maintenance
|
* Please create your pull request against the `main` branch. We will rebase/merge it to the maintenance
|
||||||
branches, if necessary.
|
branches, if necessary.
|
||||||
|
|
||||||
* We are using [checkstyle](http://checkstyle.sourceforge.net/) to enforce a common code style.
|
* We are using [checkstyle](http://checkstyle.sourceforge.net/) to enforce a common code style.
|
||||||
@@ -36,7 +36,7 @@ When filing a bug report, please provide as much information as possible, so tha
|
|||||||
There is some documentation available under <https://docs.pmd-code.org/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).
|
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.
|
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>
|
For more on contributing documentation check <https://docs.pmd-code.org/latest/pmd_devdocs_writing_documentation.html>
|
||||||
|
|
||||||
## Questions
|
## Questions
|
||||||
@@ -53,8 +53,8 @@ There are various channels, on which you can ask questions:
|
|||||||
|
|
||||||
PMD uses [checkstyle](http://checkstyle.sourceforge.net/) to enforce a common 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/master/src/main/resources/net/sourceforge/pmd/pmd-checkstyle-config.xml) for the configuration and
|
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/master/eclipse) that can
|
[the eclipse configuration files](https://github.com/pmd/build-tools/tree/main/eclipse) that can
|
||||||
be imported into a fresh workspace.
|
be imported into a fresh workspace.
|
||||||
|
|
||||||
## Add yourself as contributor
|
## Add yourself as contributor
|
||||||
|
|||||||
+3
-3
@@ -39,9 +39,9 @@ def run_pmdtester
|
|||||||
FileUtils.mv 'target/reports/diff', 'target/diff1'
|
FileUtils.mv 'target/reports/diff', 'target/diff1'
|
||||||
message1 = create_message
|
message1 = create_message
|
||||||
|
|
||||||
# run against master branch (if the PR is not already against master)
|
# run against main branch (if the PR is not already against main)
|
||||||
unless ENV['PMD_CI_BRANCH'] == 'master'
|
unless ENV['PMD_CI_BRANCH'] == 'main'
|
||||||
@base_branch = 'master'
|
@base_branch = 'main'
|
||||||
@logger.info "\n\n--------------------------------------"
|
@logger.info "\n\n--------------------------------------"
|
||||||
@logger.info "Run against #{@base_branch}"
|
@logger.info "Run against #{@base_branch}"
|
||||||
@summary = PmdTester::Runner.new(get_args(@base_branch, false, 'target/diff1/patch_config.xml')).run
|
@summary = PmdTester::Runner.new(get_args(@base_branch, false, 'target/diff1/patch_config.xml')).run
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
source 'https://rubygems.org/'
|
source 'https://rubygems.org/'
|
||||||
|
|
||||||
# bleeding edge from git
|
# bleeding edge from git
|
||||||
#gem 'pmdtester', :git => 'https://github.com/pmd/pmd-regression-tester.git', branch: 'master'
|
#gem 'pmdtester', :git => 'https://github.com/pmd/pmd-regression-tester.git', branch: 'main'
|
||||||
|
|
||||||
gem 'pmdtester'
|
gem 'pmdtester'
|
||||||
gem 'danger'
|
gem 'danger'
|
||||||
|
|||||||
+16
-12
@@ -3,6 +3,7 @@ GEM
|
|||||||
specs:
|
specs:
|
||||||
addressable (2.8.7)
|
addressable (2.8.7)
|
||||||
public_suffix (>= 2.0.2, < 7.0)
|
public_suffix (>= 2.0.2, < 7.0)
|
||||||
|
base64 (0.2.0)
|
||||||
bigdecimal (3.1.8)
|
bigdecimal (3.1.8)
|
||||||
claide (1.1.0)
|
claide (1.1.0)
|
||||||
claide-plugins (0.9.2)
|
claide-plugins (0.9.2)
|
||||||
@@ -13,7 +14,8 @@ GEM
|
|||||||
concurrent-ruby (1.3.4)
|
concurrent-ruby (1.3.4)
|
||||||
cork (0.3.0)
|
cork (0.3.0)
|
||||||
colored2 (~> 3.1)
|
colored2 (~> 3.1)
|
||||||
danger (9.5.0)
|
danger (9.5.1)
|
||||||
|
base64 (~> 0.2)
|
||||||
claide (~> 1.0)
|
claide (~> 1.0)
|
||||||
claide-plugins (>= 0.9.2)
|
claide-plugins (>= 0.9.2)
|
||||||
colored2 (~> 3.1)
|
colored2 (~> 3.1)
|
||||||
@@ -24,12 +26,14 @@ GEM
|
|||||||
kramdown (~> 2.3)
|
kramdown (~> 2.3)
|
||||||
kramdown-parser-gfm (~> 1.0)
|
kramdown-parser-gfm (~> 1.0)
|
||||||
octokit (>= 4.0)
|
octokit (>= 4.0)
|
||||||
|
pstore (~> 0.1)
|
||||||
terminal-table (>= 1, < 4)
|
terminal-table (>= 1, < 4)
|
||||||
differ (0.1.2)
|
differ (0.1.2)
|
||||||
et-orbi (1.2.11)
|
et-orbi (1.2.11)
|
||||||
tzinfo
|
tzinfo
|
||||||
faraday (2.11.0)
|
faraday (2.12.0)
|
||||||
faraday-net_http (>= 2.0, < 3.4)
|
faraday-net_http (>= 2.0, < 3.4)
|
||||||
|
json
|
||||||
logger
|
logger
|
||||||
faraday-http-cache (2.5.1)
|
faraday-http-cache (2.5.1)
|
||||||
faraday (>= 0.8)
|
faraday (>= 0.8)
|
||||||
@@ -41,19 +45,20 @@ GEM
|
|||||||
git (1.19.1)
|
git (1.19.1)
|
||||||
addressable (~> 2.8)
|
addressable (~> 2.8)
|
||||||
rchardet (~> 1.8)
|
rchardet (~> 1.8)
|
||||||
|
json (2.7.5)
|
||||||
kramdown (2.4.0)
|
kramdown (2.4.0)
|
||||||
rexml
|
rexml
|
||||||
kramdown-parser-gfm (1.1.0)
|
kramdown-parser-gfm (1.1.0)
|
||||||
kramdown (~> 2.0)
|
kramdown (~> 2.0)
|
||||||
liquid (5.5.1)
|
liquid (5.5.1)
|
||||||
logger (1.6.0)
|
logger (1.6.1)
|
||||||
logger-colors (1.0.0)
|
logger-colors (1.0.0)
|
||||||
nap (1.1.0)
|
nap (1.1.0)
|
||||||
net-http (0.4.1)
|
net-http (0.4.1)
|
||||||
uri
|
uri
|
||||||
nokogiri (1.16.7-x86_64-linux)
|
nokogiri (1.16.7-x86_64-linux)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
octokit (9.1.0)
|
octokit (9.2.0)
|
||||||
faraday (>= 1, < 3)
|
faraday (>= 1, < 3)
|
||||||
sawyer (~> 0.9)
|
sawyer (~> 0.9)
|
||||||
open4 (1.3.4)
|
open4 (1.3.4)
|
||||||
@@ -64,26 +69,25 @@ GEM
|
|||||||
nokogiri (~> 1.13)
|
nokogiri (~> 1.13)
|
||||||
rufus-scheduler (~> 3.8)
|
rufus-scheduler (~> 3.8)
|
||||||
slop (~> 4.9)
|
slop (~> 4.9)
|
||||||
|
pstore (0.1.3)
|
||||||
public_suffix (6.0.1)
|
public_suffix (6.0.1)
|
||||||
raabro (1.4.0)
|
raabro (1.4.0)
|
||||||
racc (1.8.1)
|
racc (1.8.1)
|
||||||
rchardet (1.8.0)
|
rchardet (1.8.0)
|
||||||
rexml (3.3.6)
|
rexml (3.3.9)
|
||||||
strscan
|
rouge (4.5.1)
|
||||||
rouge (4.3.0)
|
rufus-scheduler (3.9.2)
|
||||||
rufus-scheduler (3.9.1)
|
fugit (~> 1.1, >= 1.11.1)
|
||||||
fugit (~> 1.1, >= 1.1.6)
|
|
||||||
safe_yaml (1.0.5)
|
safe_yaml (1.0.5)
|
||||||
sawyer (0.9.2)
|
sawyer (0.9.2)
|
||||||
addressable (>= 2.3.5)
|
addressable (>= 2.3.5)
|
||||||
faraday (>= 0.17.3, < 3)
|
faraday (>= 0.17.3, < 3)
|
||||||
slop (4.10.1)
|
slop (4.10.1)
|
||||||
strscan (3.1.0)
|
|
||||||
terminal-table (3.0.2)
|
terminal-table (3.0.2)
|
||||||
unicode-display_width (>= 1.1.1, < 3)
|
unicode-display_width (>= 1.1.1, < 3)
|
||||||
tzinfo (2.0.6)
|
tzinfo (2.0.6)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
unicode-display_width (2.5.0)
|
unicode-display_width (2.6.0)
|
||||||
uri (0.13.1)
|
uri (0.13.1)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
@@ -98,4 +102,4 @@ DEPENDENCIES
|
|||||||
safe_yaml
|
safe_yaml
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
2.5.3
|
2.5.22
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
# PMD - source code analyzer
|
# PMD - source code analyzer
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
[](https://app.gitter.im/#/room/#pmd_pmd:gitter.im?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
[](https://app.gitter.im/#/room/#pmd_pmd:gitter.im?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||||
[](https://github.com/pmd/pmd/actions)
|
[](https://github.com/pmd/pmd/actions)
|
||||||
[](https://maven-badges.herokuapp.com/maven-central/net.sourceforge.pmd/pmd)
|
[](https://maven-badges.herokuapp.com/maven-central/net.sourceforge.pmd/pmd)
|
||||||
[](https://github.com/jvm-repo-rebuild/reproducible-central/tree/master/content/net/sourceforge/pmd#readme)
|
[](https://github.com/jvm-repo-rebuild/reproducible-central/tree/master/content/net/sourceforge/pmd#readme)
|
||||||
[](https://coveralls.io/github/pmd/pmd)
|
[](https://coveralls.io/github/pmd/pmd?branch=main)
|
||||||
[](https://app.codacy.com/organizations/gh/pmd/dashboard)
|
[](https://app.codacy.com/organizations/gh/pmd/dashboard)
|
||||||
[](code_of_conduct.md)
|
[](code_of_conduct.md)
|
||||||
[](https://docs.pmd-code.org/latest/)
|
[](https://docs.pmd-code.org/latest/)
|
||||||
|
|||||||
+96
-5
@@ -11,10 +11,11 @@
|
|||||||
- root-node-name: name of the root node without prefix (eg "TopLevel"), will be made to implement RootNode
|
- root-node-name: name of the root node without prefix (eg "TopLevel"), will be made to implement RootNode
|
||||||
|
|
||||||
See AntlrGeneratedParserBase
|
See AntlrGeneratedParserBase
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
<taskdef resource="net/sf/antcontrib/antcontrib.properties" />
|
||||||
|
|
||||||
<property name="target-package-dir" value="${antlr4.outputDirectory}/net/sourceforge/pmd/lang/${lang-id}/ast"/>
|
<property name="target-package-dir" value="${antlr4.outputDirectory}/net/sourceforge/pmd/lang/${lang-id}/ast"/>
|
||||||
|
<property name="stamp-file" value="${project.build.directory}/last-generated-timestamp" />
|
||||||
|
|
||||||
|
|
||||||
<property name="lang-ast-package" value="net.sourceforge.pmd.lang.${lang-id}.ast" />
|
<property name="lang-ast-package" value="net.sourceforge.pmd.lang.${lang-id}.ast" />
|
||||||
@@ -32,14 +33,100 @@
|
|||||||
<property name="base-visitor-file" value="${target-package-dir}/${base-visitor-name}.java"/>
|
<property name="base-visitor-file" value="${target-package-dir}/${base-visitor-name}.java"/>
|
||||||
|
|
||||||
<property name="listener-name" value="${lang-name}Listener"/>
|
<property name="listener-name" value="${lang-name}Listener"/>
|
||||||
<property name="listener-file" value="${target-package-dir}/${visitor-name}.java"/>
|
<property name="listener-file" value="${target-package-dir}/${listener-name}.java"/>
|
||||||
|
|
||||||
<property name="base-listener-name" value="${lang-name}BaseListener"/>
|
<property name="base-listener-name" value="${lang-name}BaseListener"/>
|
||||||
<property name="base-listener-file" value="${target-package-dir}/${base-visitor-name}.java"/>
|
<property name="base-listener-file" value="${target-package-dir}/${base-listener-name}.java"/>
|
||||||
|
|
||||||
<property name="node-itf-name" value="${lang-name}Node"/>
|
<property name="node-itf-name" value="${lang-name}Node"/>
|
||||||
<property name="base-class-name" value="Abstract${lang-name}Node"/>
|
<property name="base-class-name" value="Abstract${lang-name}Node"/>
|
||||||
|
|
||||||
|
<property name="lexer-name" value="${lang-name}Lexer"/>
|
||||||
|
<property name="lexer-file" value="${target-package-dir}/${lexer-name}.java"/>
|
||||||
|
|
||||||
|
<target name="check-up-to-date"
|
||||||
|
description="Checks the input files are up to date">
|
||||||
|
|
||||||
|
<uptodate property="processing-not-required" targetfile="${stamp-file}">
|
||||||
|
<srcfiles dir="${target-package-dir}" includes="*.java" />
|
||||||
|
<srcfiles file="${ant.file}" />
|
||||||
|
</uptodate>
|
||||||
|
<echo message="Up-to-date check: processing-not-required=${processing-not-required}" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="update-stamp-file" unless="processing-not-required">
|
||||||
|
<touch file="${stamp-file}" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="annotate-classes" description="Adds the @Generated annotation to all classes"
|
||||||
|
unless="processing-not-required">
|
||||||
|
<if>
|
||||||
|
<available file="${parser-file}"/>
|
||||||
|
<then>
|
||||||
|
<replace file="${parser-file}"
|
||||||
|
token="public class ${parser-name}"
|
||||||
|
value='@net.sourceforge.pmd.annotation.Generated("org.antlr.v4.Tool")${line.separator}
|
||||||
|
public class ${parser-name}'/>
|
||||||
|
|
||||||
|
<!-- Parse tree classes for each element -->
|
||||||
|
<replace file="${parser-file}"
|
||||||
|
token="public static class "
|
||||||
|
value='@net.sourceforge.pmd.annotation.Generated("org.antlr.v4.Tool")${line.separator}
|
||||||
|
public static class '/>
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if>
|
||||||
|
<available file="${visitor-file}"/>
|
||||||
|
<then>
|
||||||
|
<replace file="${visitor-file}"
|
||||||
|
token="public interface ${visitor-name}"
|
||||||
|
value='@net.sourceforge.pmd.annotation.Generated("org.antlr.v4.Tool")${line.separator}
|
||||||
|
public interface ${visitor-name}'/>
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if>
|
||||||
|
<available file="${base-visitor-file}"/>
|
||||||
|
<then>
|
||||||
|
<replace file="${base-visitor-file}"
|
||||||
|
token="public class ${base-visitor-name}"
|
||||||
|
value='@net.sourceforge.pmd.annotation.Generated("org.antlr.v4.Tool")${line.separator}
|
||||||
|
public class ${base-visitor-name}'/>
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if>
|
||||||
|
<available file="${listener-file}"/>
|
||||||
|
<then>
|
||||||
|
<replace file="${listener-file}"
|
||||||
|
token="public interface ${listener-name}"
|
||||||
|
value='@net.sourceforge.pmd.annotation.Generated("org.antlr.v4.Tool")${line.separator}
|
||||||
|
public interface ${listener-name}'/>
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if>
|
||||||
|
<available file="${base-listener-file}"/>
|
||||||
|
<then>
|
||||||
|
<replace file="${base-listener-file}"
|
||||||
|
token="public class ${base-listener-name}"
|
||||||
|
value='@net.sourceforge.pmd.annotation.Generated("org.antlr.v4.Tool")${line.separator}
|
||||||
|
public class ${base-listener-name}'/>
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if>
|
||||||
|
<available file="${lexer-file}"/>
|
||||||
|
<then>
|
||||||
|
<replace file="${lexer-file}"
|
||||||
|
token="public class ${lexer-name}"
|
||||||
|
value='@net.sourceforge.pmd.annotation.Generated("org.antlr.v4.Tool")${line.separator}
|
||||||
|
public class ${lexer-name}'/>
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
</target>
|
||||||
|
|
||||||
<condition property="rename-parser">
|
<condition property="rename-parser">
|
||||||
<and>
|
<and>
|
||||||
<not>
|
<not>
|
||||||
@@ -72,7 +159,9 @@
|
|||||||
tofile="${parser-file}"/>
|
tofile="${parser-file}"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="cpd-language" description="Adapt Antlr sources for CPD-only languages">
|
<target name="cpd-language" depends="check-up-to-date, annotate-classes, cpd-language-processing, update-stamp-file"/>
|
||||||
|
<target name="cpd-language-processing" description="Adapt Antlr sources for CPD-only languages"
|
||||||
|
unless="processing-not-required">
|
||||||
<!-- We only need the Lexer file. -->
|
<!-- We only need the Lexer file. -->
|
||||||
<delete file="${parser-file}"/>
|
<delete file="${parser-file}"/>
|
||||||
<delete>
|
<delete>
|
||||||
@@ -83,7 +172,9 @@
|
|||||||
</delete>
|
</delete>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="pmd-language" description="Adapt Antlr sources for PMD languages" depends="rename-parser">
|
<target name="pmd-language" depends="check-up-to-date, rename-parser, annotate-classes, pmd-language-processing, update-stamp-file"/>
|
||||||
|
<target name="pmd-language-processing" description="Adapt Antlr sources for PMD languages"
|
||||||
|
unless="processing-not-required">
|
||||||
|
|
||||||
<!-- Adapt parser. -->
|
<!-- Adapt parser. -->
|
||||||
<replace file="${parser-file}">
|
<replace file="${parser-file}">
|
||||||
|
|||||||
+1
-1
@@ -311,7 +311,7 @@ echo " <https://repo.maven.apache.org/maven2/net/sourceforge/pmd/pmd/maven-me
|
|||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo "Then proceed with releasing pmd-designer..."
|
echo "Then proceed with releasing pmd-designer..."
|
||||||
echo "<https://github.com/pmd/pmd-designer/blob/master/releasing.md>"
|
echo "<https://github.com/pmd/pmd-designer/blob/main/releasing.md>"
|
||||||
echo
|
echo
|
||||||
echo "Press enter to continue when pmd-designer is available in maven-central..."
|
echo "Press enter to continue when pmd-designer is available in maven-central..."
|
||||||
echo "<https://repo.maven.apache.org/maven2/net/sourceforge/pmd/pmd-designer/maven-metadata.xml>."
|
echo "<https://repo.maven.apache.org/maven2/net/sourceforge/pmd/pmd-designer/maven-metadata.xml>."
|
||||||
|
|||||||
+12
-10
@@ -1,8 +1,9 @@
|
|||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
activesupport (7.2.1)
|
activesupport (7.2.2)
|
||||||
base64
|
base64
|
||||||
|
benchmark (>= 0.3)
|
||||||
bigdecimal
|
bigdecimal
|
||||||
concurrent-ruby (~> 1.0, >= 1.3.1)
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
||||||
connection_pool (>= 2.2.5)
|
connection_pool (>= 2.2.5)
|
||||||
@@ -15,6 +16,7 @@ GEM
|
|||||||
addressable (2.8.7)
|
addressable (2.8.7)
|
||||||
public_suffix (>= 2.0.2, < 7.0)
|
public_suffix (>= 2.0.2, < 7.0)
|
||||||
base64 (0.2.0)
|
base64 (0.2.0)
|
||||||
|
benchmark (0.3.0)
|
||||||
bigdecimal (3.1.8)
|
bigdecimal (3.1.8)
|
||||||
coffee-script (2.4.1)
|
coffee-script (2.4.1)
|
||||||
coffee-script-source
|
coffee-script-source
|
||||||
@@ -34,9 +36,10 @@ GEM
|
|||||||
ethon (0.16.0)
|
ethon (0.16.0)
|
||||||
ffi (>= 1.15.0)
|
ffi (>= 1.15.0)
|
||||||
eventmachine (1.2.7)
|
eventmachine (1.2.7)
|
||||||
execjs (2.9.1)
|
execjs (2.10.0)
|
||||||
faraday (2.11.0)
|
faraday (2.12.0)
|
||||||
faraday-net_http (>= 2.0, < 3.4)
|
faraday-net_http (>= 2.0, < 3.4)
|
||||||
|
json
|
||||||
logger
|
logger
|
||||||
faraday-net_http (3.3.0)
|
faraday-net_http (3.3.0)
|
||||||
net-http
|
net-http
|
||||||
@@ -99,7 +102,7 @@ GEM
|
|||||||
activesupport (>= 2)
|
activesupport (>= 2)
|
||||||
nokogiri (>= 1.4)
|
nokogiri (>= 1.4)
|
||||||
http_parser.rb (0.8.0)
|
http_parser.rb (0.8.0)
|
||||||
i18n (1.14.5)
|
i18n (1.14.6)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
jekyll (3.10.0)
|
jekyll (3.10.0)
|
||||||
addressable (~> 2.4)
|
addressable (~> 2.4)
|
||||||
@@ -211,6 +214,7 @@ GEM
|
|||||||
gemoji (>= 3, < 5)
|
gemoji (>= 3, < 5)
|
||||||
html-pipeline (~> 2.2)
|
html-pipeline (~> 2.2)
|
||||||
jekyll (>= 3.0, < 5.0)
|
jekyll (>= 3.0, < 5.0)
|
||||||
|
json (2.7.5)
|
||||||
kramdown (2.4.0)
|
kramdown (2.4.0)
|
||||||
rexml
|
rexml
|
||||||
kramdown-parser-gfm (1.1.0)
|
kramdown-parser-gfm (1.1.0)
|
||||||
@@ -219,7 +223,7 @@ GEM
|
|||||||
listen (3.9.0)
|
listen (3.9.0)
|
||||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||||
rb-inotify (~> 0.9, >= 0.9.10)
|
rb-inotify (~> 0.9, >= 0.9.10)
|
||||||
logger (1.6.0)
|
logger (1.6.1)
|
||||||
mercenary (0.3.6)
|
mercenary (0.3.6)
|
||||||
minima (2.5.1)
|
minima (2.5.1)
|
||||||
jekyll (>= 3.5, < 5.0)
|
jekyll (>= 3.5, < 5.0)
|
||||||
@@ -240,8 +244,7 @@ GEM
|
|||||||
rb-fsevent (0.11.2)
|
rb-fsevent (0.11.2)
|
||||||
rb-inotify (0.11.1)
|
rb-inotify (0.11.1)
|
||||||
ffi (~> 1.0)
|
ffi (~> 1.0)
|
||||||
rexml (3.3.6)
|
rexml (3.3.9)
|
||||||
strscan
|
|
||||||
rouge (3.30.0)
|
rouge (3.30.0)
|
||||||
rubyzip (2.3.2)
|
rubyzip (2.3.2)
|
||||||
safe_yaml (1.0.5)
|
safe_yaml (1.0.5)
|
||||||
@@ -255,7 +258,6 @@ GEM
|
|||||||
faraday (>= 0.17.3, < 3)
|
faraday (>= 0.17.3, < 3)
|
||||||
securerandom (0.3.1)
|
securerandom (0.3.1)
|
||||||
simpleidn (0.2.3)
|
simpleidn (0.2.3)
|
||||||
strscan (3.1.0)
|
|
||||||
terminal-table (1.8.0)
|
terminal-table (1.8.0)
|
||||||
unicode-display_width (~> 1.1, >= 1.1.1)
|
unicode-display_width (~> 1.1, >= 1.1.1)
|
||||||
typhoeus (1.4.1)
|
typhoeus (1.4.1)
|
||||||
@@ -264,7 +266,7 @@ GEM
|
|||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
unicode-display_width (1.8.0)
|
unicode-display_width (1.8.0)
|
||||||
uri (0.13.1)
|
uri (0.13.1)
|
||||||
webrick (1.8.1)
|
webrick (1.9.0)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
x86_64-linux
|
x86_64-linux
|
||||||
@@ -276,4 +278,4 @@ DEPENDENCIES
|
|||||||
webrick
|
webrick
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
2.5.3
|
2.5.22
|
||||||
+4
-4
@@ -1,9 +1,9 @@
|
|||||||
repository: pmd/pmd
|
repository: pmd/pmd
|
||||||
|
|
||||||
pmd:
|
pmd:
|
||||||
version: 7.5.0-SNAPSHOT
|
version: 7.8.0-SNAPSHOT
|
||||||
previous_version: 7.4.0
|
previous_version: 7.7.0
|
||||||
date: 2024-08-30
|
date: 2024-11-29
|
||||||
# release types: major, minor, bugfix
|
# release types: major, minor, bugfix
|
||||||
release_type: minor
|
release_type: minor
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ site_title: PMD Source Code Analyzer
|
|||||||
company_name: PMD Open Source Project
|
company_name: PMD Open Source Project
|
||||||
# this appears in the footer
|
# this appears in the footer
|
||||||
|
|
||||||
github_editme_path: pmd/pmd/blob/master/docs/
|
github_editme_path: pmd/pmd/blob/main/docs/
|
||||||
# if you're using Github, provide the basepath to the branch you've created for reviews, following the sample here. if not, leave this value blank.
|
# if you're using Github, provide the basepath to the branch you've created for reviews, following the sample here. if not, leave this value blank.
|
||||||
|
|
||||||
host: 127.0.0.1
|
host: 127.0.0.1
|
||||||
|
|||||||
@@ -260,6 +260,9 @@ entries:
|
|||||||
- title: Error Prone
|
- title: Error Prone
|
||||||
output: web, pdf
|
output: web, pdf
|
||||||
url: /pmd_rules_ecmascript_errorprone.html
|
url: /pmd_rules_ecmascript_errorprone.html
|
||||||
|
- title: Performance
|
||||||
|
output: web, pdf
|
||||||
|
url: /pmd_rules_ecmascript_performance.html
|
||||||
- title: null
|
- title: null
|
||||||
output: web, pdf
|
output: web, pdf
|
||||||
subfolders:
|
subfolders:
|
||||||
@@ -521,7 +524,7 @@ entries:
|
|||||||
url: /pmd_devdocs_building.html
|
url: /pmd_devdocs_building.html
|
||||||
output: web, pdf
|
output: web, pdf
|
||||||
- title: Contributing
|
- title: Contributing
|
||||||
external_url: https://github.com/pmd/pmd/blob/master/CONTRIBUTING.md
|
external_url: https://github.com/pmd/pmd/blob/main/CONTRIBUTING.md
|
||||||
output: web, pdf
|
output: web, pdf
|
||||||
- title: Writing documentation
|
- title: Writing documentation
|
||||||
url: /pmd_devdocs_writing_documentation.html
|
url: /pmd_devdocs_writing_documentation.html
|
||||||
|
|||||||
@@ -45,9 +45,9 @@ See also
|
|||||||
|
|
||||||
## Git branches/tags policy
|
## Git branches/tags policy
|
||||||
|
|
||||||
* Main development happens on the main branch (currently called `master`).
|
* Main development happens on the main branch (currently called `main`).
|
||||||
* PR and enhancements are done on the main branch.
|
* PR and enhancements are done on the main branch.
|
||||||
* Release are usually done directly from the main branch, we don't create release branches.
|
* Releases are usually done directly from the main branch, we don't create release branches.
|
||||||
* Each release has its own tag named `pmd_releases/MAJOR.MINOR.PATCH`.
|
* Each release has its own tag named `pmd_releases/MAJOR.MINOR.PATCH`.
|
||||||
* In case of a patch release, we either do it from the main branch (if there was no development ongoing)
|
* In case of a patch release, we either do it from the main branch (if there was no development ongoing)
|
||||||
or create a separate branch off the last release tag.
|
or create a separate branch off the last release tag.
|
||||||
|
|||||||
@@ -36,5 +36,5 @@ The latest release documentation is always available under [docs.pmd-code.org/la
|
|||||||
|
|
||||||
First off, thanks for taking the time to contribute!
|
First off, thanks for taking the time to contribute!
|
||||||
|
|
||||||
Please have a look at [CONTRIBUTING.md](https://github.com/pmd/pmd/blob/master/CONTRIBUTING.md) and
|
Please have a look at [CONTRIBUTING.md](https://github.com/pmd/pmd/blob/main/CONTRIBUTING.md) and
|
||||||
[BUILDING.md](https://github.com/pmd/pmd/blob/master/BUILDING.md).
|
[BUILDING.md](https://github.com/pmd/pmd/blob/main/BUILDING.md).
|
||||||
@@ -64,7 +64,7 @@ definitely don't come for free. It is much effort and requires perseverance to i
|
|||||||
### 2. Implement an AST parser for your language
|
### 2. Implement an AST parser for your language
|
||||||
* ANTLR will generate the parser for you based on the grammar file. The grammar file needs to be placed in the
|
* ANTLR will generate the parser for you based on the grammar file. The grammar file needs to be placed in the
|
||||||
folder `src/main/antlr4` in the appropriate sub package `ast` of the language. E.g. for swift, the grammar
|
folder `src/main/antlr4` in the appropriate sub package `ast` of the language. E.g. for swift, the grammar
|
||||||
file is [Swift.g4](https://github.com/pmd/pmd/blob/master/pmd-swift/src/main/antlr4/net/sourceforge/pmd/lang/swift/ast/Swift.g4)
|
file is [Swift.g4](https://github.com/pmd/pmd/blob/main/pmd-swift/src/main/antlr4/net/sourceforge/pmd/lang/swift/ast/Swift.g4)
|
||||||
and is placed in the package `net.sourceforge.pmd.lang.swift.ast`.
|
and is placed in the package `net.sourceforge.pmd.lang.swift.ast`.
|
||||||
* Configure the options "superClass" and "contextSuperClass". These are the base classes for the generated
|
* Configure the options "superClass" and "contextSuperClass". These are the base classes for the generated
|
||||||
classes.
|
classes.
|
||||||
@@ -72,39 +72,39 @@ definitely don't come for free. It is much effort and requires perseverance to i
|
|||||||
### 3. Create AST node classes
|
### 3. Create AST node classes
|
||||||
* The individual AST nodes are generated, but you need to define the common interface for them.
|
* The individual AST nodes are generated, but you need to define the common interface for them.
|
||||||
* You need to define the supertype interface for all nodes of the language. For that, we provide
|
* You need to define the supertype interface for all nodes of the language. For that, we provide
|
||||||
[`AntlrNode`](https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/impl/antlr4/AntlrNode.java).
|
[`AntlrNode`](https://github.com/pmd/pmd/blob/main/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/impl/antlr4/AntlrNode.java).
|
||||||
* See [`SwiftNode`](https://github.com/pmd/pmd/blob/master/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/ast/SwiftNode.java)
|
* See [`SwiftNode`](https://github.com/pmd/pmd/blob/main/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/ast/SwiftNode.java)
|
||||||
as an example.
|
as an example.
|
||||||
* Additionally, you need several base classes:
|
* Additionally, you need several base classes:
|
||||||
* a language specific inner node - these nodes represent the production rules from the grammar.
|
* a language specific inner node - these nodes represent the production rules from the grammar.
|
||||||
In Antlr, they are called "ParserRuleContext". We call them "InnerNode". Use the
|
In Antlr, they are called "ParserRuleContext". We call them "InnerNode". Use the
|
||||||
base class from pmd-core
|
base class from pmd-core
|
||||||
[`BaseAntlrInnerNode`](https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/impl/antlr4/BaseAntlrInnerNode.java)
|
[`BaseAntlrInnerNode`](https://github.com/pmd/pmd/blob/main/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/impl/antlr4/BaseAntlrInnerNode.java)
|
||||||
. And example is [`SwiftInnerNode`](https://github.com/pmd/pmd/blob/master/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/ast/SwiftInnerNode.java).
|
. And example is [`SwiftInnerNode`](https://github.com/pmd/pmd/blob/main/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/ast/SwiftInnerNode.java).
|
||||||
Note that this language specific inner node is package-private, as it is only the base class for the concrete
|
Note that this language specific inner node is package-private, as it is only the base class for the concrete
|
||||||
nodes generated by ANLTR.
|
nodes generated by ANLTR.
|
||||||
* a language specific root node - this provides the root of the AST and our parser will return
|
* a language specific root node - this provides the root of the AST and our parser will return
|
||||||
subtypes of this node. The root node itself is a "InnerNode".
|
subtypes of this node. The root node itself is a "InnerNode".
|
||||||
See [`SwiftRootNode`](https://github.com/pmd/pmd/blob/master/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/ast/SwiftRootNode.java).
|
See [`SwiftRootNode`](https://github.com/pmd/pmd/blob/main/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/ast/SwiftRootNode.java).
|
||||||
Note that this language specific root node is package-private, as it is only the base class for the concrete
|
Note that this language specific root node is package-private, as it is only the base class for the concrete
|
||||||
node generated by ANLTR.
|
node generated by ANLTR.
|
||||||
* a language specific terminal node.
|
* a language specific terminal node.
|
||||||
See [`SwiftTerminalNode`](https://github.com/pmd/pmd/blob/master/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/ast/SwiftTerminalNode.java).
|
See [`SwiftTerminalNode`](https://github.com/pmd/pmd/blob/main/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/ast/SwiftTerminalNode.java).
|
||||||
* a language specific error node.
|
* a language specific error node.
|
||||||
See [`SwiftErrorNode`](https://github.com/pmd/pmd/blob/master/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/ast/SwiftErrorNode.java).
|
See [`SwiftErrorNode`](https://github.com/pmd/pmd/blob/main/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/ast/SwiftErrorNode.java).
|
||||||
* a language name dictionary. This is used to convert ANTLR node names to useful XPath node names.
|
* a language name dictionary. This is used to convert ANTLR node names to useful XPath node names.
|
||||||
See [`SwiftNameDictionary'](https://github.com/pmd/pmd/blob/master/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/ast/SwiftNameDictionary.java).
|
See [`SwiftNameDictionary'](https://github.com/pmd/pmd/blob/main/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/ast/SwiftNameDictionary.java).
|
||||||
* Once these base classes exist, you need to change the ANTLR grammar to add additional members via `@parser::members`
|
* Once these base classes exist, you need to change the ANTLR grammar to add additional members via `@parser::members`
|
||||||
* Define a package private field `DICO` which creates a new instance of your language name dictionary using the
|
* Define a package private field `DICO` which creates a new instance of your language name dictionary using the
|
||||||
vocabulary from the generated parser (`VOCABULARY`).
|
vocabulary from the generated parser (`VOCABULARY`).
|
||||||
* Define two additional methods to help converting the ANTLR context objects into PMD AST nodes.
|
* Define two additional methods to help converting the ANTLR context objects into PMD AST nodes.
|
||||||
The methods are abstract in [`AntlrGeneratedParserBase`](https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/impl/antlr4/AntlrGeneratedParserBase.java)
|
The methods are abstract in [`AntlrGeneratedParserBase`](https://github.com/pmd/pmd/blob/main/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/impl/antlr4/AntlrGeneratedParserBase.java)
|
||||||
and need to be implemented here for the concrete language: `createPmdTerminal()` and `createPmdError()`.
|
and need to be implemented here for the concrete language: `createPmdTerminal()` and `createPmdError()`.
|
||||||
* In order for the generated code to match and use our custom classes, we have a common ant script, that fiddles with
|
* In order for the generated code to match and use our custom classes, we have a common ant script, that fiddles with
|
||||||
the generated code. The ant script is [`antlr4-wrapper.xml`](https://github.com/pmd/pmd/blob/master/antlr4-wrapper.xml)
|
the generated code. The ant script is [`antlr4-wrapper.xml`](https://github.com/pmd/pmd/blob/main/antlr4-wrapper.xml)
|
||||||
and does not need to be adjusted - it has plenty of parameters that can be configured.
|
and does not need to be adjusted - it has plenty of parameters that can be configured.
|
||||||
The ant script is added in the language module's `pom.xml` where the parameters are set (e.g. name of root name
|
The ant script is added in the language module's `pom.xml` where the parameters are set (e.g. name of root name
|
||||||
class). Have a look at Swift's example: [`pmd-swift/pom.xml`](https://github.com/pmd/pmd/blob/master/pmd-swift/pom.xml).
|
class). Have a look at Swift's example: [`pmd-swift/pom.xml`](https://github.com/pmd/pmd/blob/main/pmd-swift/pom.xml).
|
||||||
* You can add additional methods in your "InnerNode" (e.g. `SwiftInnerNode`) that are available on all nodes.
|
* You can add additional methods in your "InnerNode" (e.g. `SwiftInnerNode`) that are available on all nodes.
|
||||||
But on most cases you won't need to do anything.
|
But on most cases you won't need to do anything.
|
||||||
|
|
||||||
@@ -115,31 +115,31 @@ definitely don't come for free. It is much effort and requires perseverance to i
|
|||||||
have the parser generated.
|
have the parser generated.
|
||||||
* The generated code will be placed under `target/generated-sources/antlr4` and will not be committed to
|
* The generated code will be placed under `target/generated-sources/antlr4` and will not be committed to
|
||||||
source control.
|
source control.
|
||||||
* You should review [`pmd-swift/pom.xml`](https://github.com/pmd/pmd/blob/master/pmd-swift/pom.xml).
|
* You should review [`pmd-swift/pom.xml`](https://github.com/pmd/pmd/blob/main/pmd-swift/pom.xml).
|
||||||
|
|
||||||
### 5. Create a TokenManager
|
### 5. Create a TokenManager
|
||||||
* This is needed to support CPD (copy paste detection)
|
* This is needed to support CPD (copy paste detection)
|
||||||
* We provide a default implementation using [`AntlrTokenManager`](https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/impl/antlr4/AntlrTokenManager.java).
|
* We provide a default implementation using [`AntlrTokenManager`](https://github.com/pmd/pmd/blob/main/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/impl/antlr4/AntlrTokenManager.java).
|
||||||
* You must create your own "AntlrCpdLexer" such as we do with
|
* You must create your own "AntlrCpdLexer" such as we do with
|
||||||
[`SwiftCpdLexer`](https://github.com/pmd/pmd/blob/master/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/cpd/SwiftCpdLexer.java).
|
[`SwiftCpdLexer`](https://github.com/pmd/pmd/blob/main/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/cpd/SwiftCpdLexer.java).
|
||||||
* If you wish to filter specific tokens (e.g. comments to support CPD suppression via "CPD-OFF" and "CPD-ON")
|
* If you wish to filter specific tokens (e.g. comments to support CPD suppression via "CPD-OFF" and "CPD-ON")
|
||||||
you can create your own implementation of
|
you can create your own implementation of
|
||||||
[`AntlrTokenFilter`](https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/cpd/impl/AntlrTokenFilter.java).
|
[`AntlrTokenFilter`](https://github.com/pmd/pmd/blob/main/pmd-core/src/main/java/net/sourceforge/pmd/cpd/impl/AntlrTokenFilter.java).
|
||||||
You'll need to override then the protected method `getTokenFilter(AntlrTokenManager)`
|
You'll need to override then the protected method `getTokenFilter(AntlrTokenManager)`
|
||||||
and return your custom filter. See the CpdLexer for C# as an exmaple:
|
and return your custom filter. See the CpdLexer for C# as an exmaple:
|
||||||
[`CsCpdLexer`](https://github.com/pmd/pmd/blob/master/pmd-cs/src/main/java/net/sourceforge/pmd/lang/cs/cpd/CsCpdLexer.java).
|
[`CsCpdLexer`](https://github.com/pmd/pmd/blob/main/pmd-cs/src/main/java/net/sourceforge/pmd/lang/cs/cpd/CsCpdLexer.java).
|
||||||
|
|
||||||
If you don't need a custom token filter, you don't need to override the method. It returns the default
|
If you don't need a custom token filter, you don't need to override the method. It returns the default
|
||||||
`AntlrTokenFilter` which doesn't filter anything.
|
`AntlrTokenFilter` which doesn't filter anything.
|
||||||
|
|
||||||
### 6. Create a PMD parser “adapter”
|
### 6. Create a PMD parser “adapter”
|
||||||
* Create your own parser, that adapts the ANLTR interface to PMD's parser interface.
|
* Create your own parser, that adapts the ANLTR interface to PMD's parser interface.
|
||||||
* We provide a [`AntlrBaseParser`](https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/impl/antlr4/AntlrBaseParser.java)
|
* We provide a [`AntlrBaseParser`](https://github.com/pmd/pmd/blob/main/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/impl/antlr4/AntlrBaseParser.java)
|
||||||
implementation that you need to extend to create your own adapter as we do with
|
implementation that you need to extend to create your own adapter as we do with
|
||||||
[`PmdSwiftParser`](https://github.com/pmd/pmd/blob/master/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/ast/PmdSwiftParser.java).
|
[`PmdSwiftParser`](https://github.com/pmd/pmd/blob/main/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/ast/PmdSwiftParser.java).
|
||||||
|
|
||||||
### 7. Create a language version handler
|
### 7. Create a language version handler
|
||||||
* Now you need to create your version handler, as we did with [`SwiftHandler`](https://github.com/pmd/pmd/blob/master/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/SwiftHandler.java).
|
* Now you need to create your version handler, as we did with [`SwiftHandler`](https://github.com/pmd/pmd/blob/main/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/SwiftHandler.java).
|
||||||
* This class is sort of a gateway between PMD and all parsing logic specific to your language.
|
* This class is sort of a gateway between PMD and all parsing logic specific to your language.
|
||||||
* For a minimal implementation, it just needs to return a parser *(see step #6)*.
|
* For a minimal implementation, it just needs to return a parser *(see step #6)*.
|
||||||
* It can be used to provide other features for your language like
|
* It can be used to provide other features for your language like
|
||||||
@@ -154,15 +154,15 @@ definitely don't come for free. It is much effort and requires perseverance to i
|
|||||||
* A parser visitor adapter is not needed anymore with PMD 7. The visitor interface now provides a default
|
* A parser visitor adapter is not needed anymore with PMD 7. The visitor interface now provides a default
|
||||||
implementation.
|
implementation.
|
||||||
* The visitor for ANTLR based AST is generated along the parser from the ANTLR grammar file. The
|
* The visitor for ANTLR based AST is generated along the parser from the ANTLR grammar file. The
|
||||||
base interface for a visitor is [`AstVisitor`](https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/AstVisitor.java).
|
base interface for a visitor is [`AstVisitor`](https://github.com/pmd/pmd/blob/main/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/AstVisitor.java).
|
||||||
* The generated visitor class for Swift is called `SwiftVisitor`.
|
* The generated visitor class for Swift is called `SwiftVisitor`.
|
||||||
* In order to help use this visitor later on, a base visitor class should be created.
|
* In order to help use this visitor later on, a base visitor class should be created.
|
||||||
See [`SwiftVisitorBase`](https://github.com/pmd/pmd/blob/master/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/ast/SwiftVisitorBase.java)
|
See [`SwiftVisitorBase`](https://github.com/pmd/pmd/blob/main/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/ast/SwiftVisitorBase.java)
|
||||||
as an example.
|
as an example.
|
||||||
|
|
||||||
### 9. Make PMD recognize your language
|
### 9. Make PMD recognize your language
|
||||||
* Create your own subclass of `net.sourceforge.pmd.lang.impl.SimpleLanguageModuleBase`, see Swift as an example:
|
* Create your own subclass of `net.sourceforge.pmd.lang.impl.SimpleLanguageModuleBase`, see Swift as an example:
|
||||||
[`SwiftLanguageModule`](https://github.com/pmd/pmd/blob/master/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/SwiftLanguageModule.java).
|
[`SwiftLanguageModule`](https://github.com/pmd/pmd/blob/main/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/SwiftLanguageModule.java).
|
||||||
* Add for each version of your language a call to `addVersion` in your language module’s constructor.
|
* Add for each version of your language a call to `addVersion` in your language module’s constructor.
|
||||||
Use `addDefaultVersion` for defining the default version.
|
Use `addDefaultVersion` for defining the default version.
|
||||||
* You’ll need to refer the language version handler created in step #7.
|
* You’ll need to refer the language version handler created in step #7.
|
||||||
@@ -172,9 +172,9 @@ definitely don't come for free. It is much effort and requires perseverance to i
|
|||||||
### 10. Create an abstract rule class for the language
|
### 10. Create an abstract rule class for the language
|
||||||
* You need to create your own abstract rule class in order to interface your language with PMD's generic rule
|
* You need to create your own abstract rule class in order to interface your language with PMD's generic rule
|
||||||
execution.
|
execution.
|
||||||
* See [`AbstractSwiftRule`](https://github.com/pmd/pmd/blob/master/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/rule/AbstractSwiftRule.java) as an example.
|
* See [`AbstractSwiftRule`](https://github.com/pmd/pmd/blob/main/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/rule/AbstractSwiftRule.java) as an example.
|
||||||
* The rule basically just extends
|
* The rule basically just extends
|
||||||
[`AbstractVisitorRule`](https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/AbstractVisitorRule.java)
|
[`AbstractVisitorRule`](https://github.com/pmd/pmd/blob/main/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/AbstractVisitorRule.java)
|
||||||
and only redefines the abstract `buildVisitor()` method to return our own type of visitor.
|
and only redefines the abstract `buildVisitor()` method to return our own type of visitor.
|
||||||
In this case our `SwiftVisitor` is used.
|
In this case our `SwiftVisitor` is used.
|
||||||
While there is no real functionality added, every language should have its own base class for rules.
|
While there is no real functionality added, every language should have its own base class for rules.
|
||||||
@@ -192,7 +192,7 @@ definitely don't come for free. It is much effort and requires perseverance to i
|
|||||||
* PMD supports 2 types of rules, through visitors or XPath.
|
* PMD supports 2 types of rules, through visitors or XPath.
|
||||||
* To add a visitor rule:
|
* To add a visitor rule:
|
||||||
* You need to extend the abstract rule you created on the previous step, you can use the swift
|
* You need to extend the abstract rule you created on the previous step, you can use the swift
|
||||||
rule [UnavailableFunctionRule](https://github.com/pmd/pmd/blob/master/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/rule/bestpractices/UnavailableFunctionRule.java)
|
rule [UnavailableFunctionRule](https://github.com/pmd/pmd/blob/main/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/rule/bestpractices/UnavailableFunctionRule.java)
|
||||||
as an example. Note, that all rule classes should be suffixed with `Rule` and should be placed
|
as an example. Note, that all rule classes should be suffixed with `Rule` and should be placed
|
||||||
in a package the corresponds to their category.
|
in a package the corresponds to their category.
|
||||||
* To add an XPath rule you can follow our guide [Writing XPath Rules](pmd_userdocs_extending_writing_xpath_rules.html).
|
* To add an XPath rule you can follow our guide [Writing XPath Rules](pmd_userdocs_extending_writing_xpath_rules.html).
|
||||||
@@ -213,16 +213,16 @@ definitely don't come for free. It is much effort and requires perseverance to i
|
|||||||
* Testing rules is described in depth in [Testing your rules](pmd_userdocs_extending_testing.html).
|
* Testing rules is described in depth in [Testing your rules](pmd_userdocs_extending_testing.html).
|
||||||
* Each rule has its own test class: Create a test class for your rule extending `PmdRuleTst`
|
* Each rule has its own test class: Create a test class for your rule extending `PmdRuleTst`
|
||||||
*(see
|
*(see
|
||||||
[`UnavailableFunctionTest`](https://github.com/pmd/pmd/blob/master/pmd-swift/src/test/java/net/sourceforge/pmd/lang/swift/rule/bestpractices/UnavailableFunctionTest.java)
|
[`UnavailableFunctionTest`](https://github.com/pmd/pmd/blob/main/pmd-swift/src/test/java/net/sourceforge/pmd/lang/swift/rule/bestpractices/UnavailableFunctionTest.java)
|
||||||
for example)*
|
for example)*
|
||||||
* Create a category rule set for your language *(see
|
* Create a category rule set for your language *(see
|
||||||
[`pmd-swift/src/main/resources/bestpractices.xml`](https://github.com/pmd/pmd/blob/master/pmd-swift/src/main/resources/category/swift/bestpractices.xml)
|
[`pmd-swift/src/main/resources/bestpractices.xml`](https://github.com/pmd/pmd/blob/main/pmd-swift/src/main/resources/category/swift/bestpractices.xml)
|
||||||
for example)*
|
for example)*
|
||||||
* Place the test XML file with the test cases in the correct location
|
* Place the test XML file with the test cases in the correct location
|
||||||
* When executing the test class
|
* When executing the test class
|
||||||
* this triggers the unit test to read the corresponding XML file with the rule test data
|
* this triggers the unit test to read the corresponding XML file with the rule test data
|
||||||
*(see
|
*(see
|
||||||
[`UnavailableFunction.xml`](https://github.com/pmd/pmd/blob/master/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/rule/bestpractices/xml/UnavailableFunction.xml)
|
[`UnavailableFunction.xml`](https://github.com/pmd/pmd/blob/main/pmd-swift/src/test/resources/net/sourceforge/pmd/lang/swift/rule/bestpractices/xml/UnavailableFunction.xml)
|
||||||
for example)*
|
for example)*
|
||||||
* This test XML file contains sample pieces of code which should trigger a specified number of
|
* This test XML file contains sample pieces of code which should trigger a specified number of
|
||||||
violations of this rule. The unit test will execute the rule on this piece of code, and verify
|
violations of this rule. The unit test will execute the rule on this piece of code, and verify
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ easy to implement the Tokenizer interface.
|
|||||||
|
|
||||||
Use the following guide to set up a new language module that supports CPD.
|
Use the following guide to set up a new language module that supports CPD.
|
||||||
|
|
||||||
1. Create a new Maven module for your language. You can take [the Golang module](https://github.com/pmd/pmd/tree/master/pmd-go/pom.xml) as an example.
|
1. Create a new Maven module for your language. You can take [the Golang module](https://github.com/pmd/pmd/tree/main/pmd-go/pom.xml) as an example.
|
||||||
- Make sure to add your new module to the parent pom as `<module>` entry, so that it is built alongside the
|
- Make sure to add your new module to the parent pom as `<module>` entry, so that it is built alongside the
|
||||||
other languages.
|
other languages.
|
||||||
- Also add your new module to the dependencies list in "pmd-languages-deps/pom.xml", so that the new language
|
- Also add your new module to the dependencies list in "pmd-languages-deps/pom.xml", so that the new language
|
||||||
@@ -28,7 +28,7 @@ Use the following guide to set up a new language module that supports CPD.
|
|||||||
|
|
||||||
2. Implement a {% jdoc core::cpd.CpdLexer %}.
|
2. Implement a {% jdoc core::cpd.CpdLexer %}.
|
||||||
- For Antlr grammars you can take the grammar from [antlr/grammars-v4](https://github.com/antlr/grammars-v4) and place it in `src/main/antlr4` followed by the package name of the language. You then need to call the appropriate ant wrapper to generate
|
- For Antlr grammars you can take the grammar from [antlr/grammars-v4](https://github.com/antlr/grammars-v4) and place it in `src/main/antlr4` followed by the package name of the language. You then need to call the appropriate ant wrapper to generate
|
||||||
the lexer from the grammar. To do so, edit `pom.xml` (eg like [the Golang module](https://github.com/pmd/pmd/tree/master/pmd-go/pom.xml)).
|
the lexer from the grammar. To do so, edit `pom.xml` (eg like [the Golang module](https://github.com/pmd/pmd/tree/main/pmd-go/pom.xml)).
|
||||||
Once that is done, `mvn generate-sources` should generate the lexer sources for you.
|
Once that is done, `mvn generate-sources` should generate the lexer sources for you.
|
||||||
|
|
||||||
You can now implement a CpdLexer, for instance by extending {% jdoc core::cpd.impl.AntlrCpdLexer %}. The following reproduces the Go implementation:
|
You can now implement a CpdLexer, for instance by extending {% jdoc core::cpd.impl.AntlrCpdLexer %}. The following reproduces the Go implementation:
|
||||||
@@ -49,7 +49,7 @@ Use the following guide to set up a new language module that supports CPD.
|
|||||||
change each token e.g. into uppercase, so that CPD sees the same strings and can find duplicates even when
|
change each token e.g. into uppercase, so that CPD sees the same strings and can find duplicates even when
|
||||||
the casing differs. See {% jdoc tsql::lang.tsql.cpd.TSqlCpdLexer %} for an example. You will also need a
|
the casing differs. See {% jdoc tsql::lang.tsql.cpd.TSqlCpdLexer %} for an example. You will also need a
|
||||||
"CaseChangingCharStream", so that antlr itself is case-insensitive.
|
"CaseChangingCharStream", so that antlr itself is case-insensitive.
|
||||||
- For JavaCC grammars, place your grammar in `etc/grammar` and edit the `pom.xml` like the [Python implementation](https://github.com/pmd/pmd/blob/master/pmd-python/pom.xml) does.
|
- For JavaCC grammars, place your grammar in `etc/grammar` and edit the `pom.xml` like the [Python implementation](https://github.com/pmd/pmd/blob/main/pmd-python/pom.xml) does.
|
||||||
You can then subclass {% jdoc core::cpd.impl.JavaccCpdLexer %} instead of AntlrCpdLexer.
|
You can then subclass {% jdoc core::cpd.impl.JavaccCpdLexer %} instead of AntlrCpdLexer.
|
||||||
- If your JavaCC based language is case-insensitive (option `IGNORE_CASE=true`), then you need to implement
|
- If your JavaCC based language is case-insensitive (option `IGNORE_CASE=true`), then you need to implement
|
||||||
{%jdoc core::lang.ast.impl.javacc.JavaccTokenDocument.TokenDocumentBehavior %}, which can change each token
|
{%jdoc core::lang.ast.impl.javacc.JavaccTokenDocument.TokenDocumentBehavior %}, which can change each token
|
||||||
@@ -82,7 +82,7 @@ If your language only supports CPD, then you can subclass {% jdoc core::lang.imp
|
|||||||
|
|
||||||
At this point the new language module should be available in {% jdoc core::lang.LanguageRegistry#CPD %} and usable by CPD like any other language.
|
At this point the new language module should be available in {% jdoc core::lang.LanguageRegistry#CPD %} and usable by CPD like any other language.
|
||||||
|
|
||||||
4. Update the test that asserts the list of supported languages by updating the `SUPPORTED_LANGUAGES` constant in [BinaryDistributionIT](https://github.com/pmd/pmd/blob/master/pmd-dist/src/test/java/net/sourceforge/pmd/dist/BinaryDistributionIT.java).
|
4. Update the test that asserts the list of supported languages by updating the `SUPPORTED_LANGUAGES` constant in [BinaryDistributionIT](https://github.com/pmd/pmd/blob/main/pmd-dist/src/test/java/net/sourceforge/pmd/dist/BinaryDistributionIT.java).
|
||||||
|
|
||||||
5. Add some tests for your CpdLexer by following the [section below](#testing-your-implementation).
|
5. Add some tests for your CpdLexer by following the [section below](#testing-your-implementation).
|
||||||
|
|
||||||
@@ -119,7 +119,7 @@ of {% jdoc core::cpd.CpdCapableLanguage#createCpdTokenizer(core::lang.LanguagePr
|
|||||||
|
|
||||||
To implement simple token filtering, you can use {% jdoc core::cpd.impl.BaseTokenFilter %}
|
To implement simple token filtering, you can use {% jdoc core::cpd.impl.BaseTokenFilter %}
|
||||||
as a base class, or another base class in {% jdoc_package core::cpd.impl %}.
|
as a base class, or another base class in {% jdoc_package core::cpd.impl %}.
|
||||||
Take a look at the [Kotlin token filter implementation](https://github.com/pmd/pmd/blob/master/pmd-kotlin/src/main/java/net/sourceforge/pmd/lang/kotlin/cpd/KotlinCpdLexer.java), or the [Java one](https://github.com/pmd/pmd/blob/master/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/cpd/JavaCpdLexer.java).
|
Take a look at the [Kotlin token filter implementation](https://github.com/pmd/pmd/blob/main/pmd-kotlin/src/main/java/net/sourceforge/pmd/lang/kotlin/cpd/KotlinCpdLexer.java), or the [Java one](https://github.com/pmd/pmd/blob/master/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/cpd/JavaCpdLexer.java).
|
||||||
|
|
||||||
|
|
||||||
### Testing your implementation
|
### Testing your implementation
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ Regression difference reports are commented back to the PR for the reviewer's in
|
|||||||
|
|
||||||
**Verifying your local changes and generate a diff-report locally**
|
**Verifying your local changes and generate a diff-report locally**
|
||||||
|
|
||||||
`pmdtester -r YOUR_LOCAL_PMD_GIT_REPO_ROOT_DIR -b master -p YOUR_DEVELOPMENT_BRANCH`
|
`pmdtester -r YOUR_LOCAL_PMD_GIT_REPO_ROOT_DIR -b main -p YOUR_DEVELOPMENT_BRANCH`
|
||||||
|
|
||||||
The regression difference report is placed in the `YOUR_WORKING_DIR/target/reports/diff` directory.
|
The regression difference report is placed in the `YOUR_WORKING_DIR/target/reports/diff` directory.
|
||||||
|
|
||||||
For more documentation on pmdtester, see [README.rdoc](https://github.com/pmd/pmd-regression-tester/blob/master/README.rdoc)
|
For more documentation on pmdtester, see [README.rdoc](https://github.com/pmd/pmd-regression-tester/blob/main/README.rdoc)
|
||||||
@@ -33,7 +33,7 @@ This makes it easy to view the documentation also offline.
|
|||||||
|
|
||||||
The categories for a language `%lang%` are located in
|
The categories for a language `%lang%` are located in
|
||||||
`pmd-%lang%/src/main/resources/category/%lang% `. So for Java the categories
|
`pmd-%lang%/src/main/resources/category/%lang% `. So for Java the categories
|
||||||
can be found under [pmd-java/src/main/resources/category/java](https://github.com/pmd/pmd/tree/master/pmd-java/src/main/resources/category/java).
|
can be found under [pmd-java/src/main/resources/category/java](https://github.com/pmd/pmd/tree/main/pmd-java/src/main/resources/category/java).
|
||||||
The XML category files in this directory are transformed during build into markdown pages
|
The XML category files in this directory are transformed during build into markdown pages
|
||||||
describing the rules they contain. These pages are placed under `docs/` like the handwritten
|
describing the rules they contain. These pages are placed under `docs/` like the handwritten
|
||||||
documentation, and are then rendered with Jekyll like the rest of them. The rule documentation
|
documentation, and are then rendered with Jekyll like the rest of them. The rule documentation
|
||||||
@@ -83,7 +83,7 @@ Here's a short overview:
|
|||||||
|
|
||||||
For the javadoc tags, the standard PMD maven modules are already defined as namespaces, e.g. `core`, `java`, `apex`, ....
|
For the javadoc tags, the standard PMD maven modules are already defined as namespaces, e.g. `core`, `java`, `apex`, ....
|
||||||
|
|
||||||
For the implementation of these tags, see the [_plugins](https://github.com/pmd/pmd/tree/master/docs/_plugins) folder.
|
For the implementation of these tags, see the [_plugins](https://github.com/pmd/pmd/tree/main/docs/_plugins) folder.
|
||||||
|
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
title: Java support
|
title: Java support
|
||||||
permalink: pmd_languages_java.html
|
permalink: pmd_languages_java.html
|
||||||
author: Clément Fournier
|
author: Clément Fournier
|
||||||
last_updated: December 2023 (7.0.0)
|
last_updated: July 2024 (7.5.0)
|
||||||
tags: [languages, PmdCapableLanguage, CpdCapableLanguage]
|
tags: [languages, PmdCapableLanguage, CpdCapableLanguage]
|
||||||
summary: "Java-specific features and guidance"
|
summary: "Java-specific features and guidance"
|
||||||
---
|
---
|
||||||
@@ -15,9 +15,10 @@ Usually the latest non-preview Java Version is the default version.
|
|||||||
|
|
||||||
| Java Version | Alias | Supported by PMD since |
|
| Java Version | Alias | Supported by PMD since |
|
||||||
|--------------|-------|------------------------|
|
|--------------|-------|------------------------|
|
||||||
|
| 23-preview | | 7.5.0 |
|
||||||
|
| 23 (default) | | 7.5.0 |
|
||||||
| 22-preview | | 7.0.0 |
|
| 22-preview | | 7.0.0 |
|
||||||
| 22 (default) | | 7.0.0 |
|
| 22 | | 7.0.0 |
|
||||||
| 21-preview | | 7.0.0 |
|
|
||||||
| 21 | | 7.0.0 |
|
| 21 | | 7.0.0 |
|
||||||
| 20 | | 6.55.0 |
|
| 20 | | 6.55.0 |
|
||||||
| 19 | | 6.48.0 |
|
| 19 | | 6.48.0 |
|
||||||
@@ -198,4 +199,4 @@ You can access these via {% jdoc core::reporting.RuleViolation#getAdditionalInfo
|
|||||||
There is no API yet for dataflow analysis. However, some rules such as {% rule java/bestpractices/UnusedAssignment %}
|
There is no API yet for dataflow analysis. However, some rules such as {% rule java/bestpractices/UnusedAssignment %}
|
||||||
or {% rule java/design/ImmutableField %} are using an internal implementation of an additional
|
or {% rule java/design/ImmutableField %} are using an internal implementation of an additional
|
||||||
AST pass that adds dataflow information. The implementation can be found in
|
AST pass that adds dataflow information. The implementation can be found in
|
||||||
[net.sourceforge.pmd.lang.java.rule.internal.DataflowPass](https://github.com/pmd/pmd/blob/master/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/internal/DataflowPass.java).
|
[net.sourceforge.pmd.lang.java.rule.internal.DataflowPass](https://github.com/pmd/pmd/blob/main/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/internal/DataflowPass.java).
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
title: Language configuration
|
title: Language configuration
|
||||||
permalink: pmd_languages_configuration.html
|
permalink: pmd_languages_configuration.html
|
||||||
author: Clément Fournier
|
author: Clément Fournier
|
||||||
last_updated: February 2024 (7.0.0)
|
last_updated: August 2024 (7.5.0)
|
||||||
tags: [languages]
|
tags: [languages]
|
||||||
keywords: [pmd, cpd, options, command, auxclasspath, language, properties]
|
keywords: [pmd, cpd, options, command, auxclasspath, language, properties]
|
||||||
summary: "Summary of language configuration options and properties"
|
summary: "Summary of language configuration options and properties"
|
||||||
@@ -98,6 +98,11 @@ The Java language can be configured with the following properties:
|
|||||||
|
|
||||||
Environment variable: `PMD_JAVA_X_TYPE_INFERENCE_LOGGING`
|
Environment variable: `PMD_JAVA_X_TYPE_INFERENCE_LOGGING`
|
||||||
|
|
||||||
|
- `xStrictTypeRes`: Whether to perform type resolution strictly at the start of execution or not (default: "true")
|
||||||
|
|
||||||
|
Since: 7.5.0
|
||||||
|
Environment variable: `PMD_JAVA_X_STRICT_TYPE_RES`
|
||||||
|
|
||||||
## Apex language properties
|
## Apex language properties
|
||||||
|
|
||||||
- `rootDirectory`: With this property the root directory of the Salesforce metadata, where `sfdx-project.json`
|
- `rootDirectory`: With this property the root directory of the Salesforce metadata, where `sfdx-project.json`
|
||||||
|
|||||||
@@ -18,15 +18,15 @@ It usually takes 15 minutes.
|
|||||||
## Contents
|
## Contents
|
||||||
|
|
||||||
* Main page - aka "Landing page": <https://pmd.github.io>
|
* Main page - aka "Landing page": <https://pmd.github.io>
|
||||||
* Layout: [_layouts/default.html](https://github.com/pmd/pmd.github.io/blob/master/_layouts/default.html).
|
* Layout: [_layouts/default.html](https://github.com/pmd/pmd.github.io/blob/main/_layouts/default.html).
|
||||||
It includes all the sub section, which can be found in the includes directory [_includes/](https://github.com/pmd/pmd.github.io/tree/master/_includes)
|
It includes all the sub section, which can be found in the includes directory [_includes/](https://github.com/pmd/pmd.github.io/tree/main/_includes)
|
||||||
* The latest PMD version is configured in `_config.yml` and the variables `site.pmd.latestVersion` are used
|
* The latest PMD version is configured in `_config.yml` and the variables `site.pmd.latestVersion` are used
|
||||||
e.g. in [_includes/home.html](https://github.com/pmd/pmd.github.io/blob/master/_includes/home.html).
|
e.g. in [_includes/home.html](https://github.com/pmd/pmd.github.io/blob/main/_includes/home.html).
|
||||||
* Blog - aka "News": <https://pmd.github.io/news/>
|
* Blog - aka "News": <https://pmd.github.io/news/>
|
||||||
* This is a section on main page. It shows the 5 latest news. See [_includes/news.html](https://github.com/pmd/pmd.github.io/blob/master/_includes/news.html).
|
* This is a section on main page. It shows the 5 latest news. See [_includes/news.html](https://github.com/pmd/pmd.github.io/blob/main/_includes/news.html).
|
||||||
* There is also a sub page "news" which lists all news.
|
* 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)
|
* Layout: [_layouts/news.html](https://github.com/pmd/pmd.github.io/blob/main/_layouts/news.html)
|
||||||
* Page (which is pretty empty): [news.html](https://github.com/pmd/pmd.github.io/blob/master/news.html)
|
* Page (which is pretty empty): [news.html](https://github.com/pmd/pmd.github.io/blob/main/news.html)
|
||||||
|
|
||||||
## Building the page locally
|
## Building the page locally
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ last_updated: October 2021
|
|||||||
author: Andreas Dangel <andreas.dangel@adangel.org>
|
author: Andreas Dangel <andreas.dangel@adangel.org>
|
||||||
---
|
---
|
||||||
|
|
||||||
## Example 1: Merging PR #123 into master
|
## Example 1: Merging PR #123 into main
|
||||||
|
|
||||||
1. Review the pull request
|
1. Review the pull request
|
||||||
|
|
||||||
@@ -20,15 +20,15 @@ author: Andreas Dangel <andreas.dangel@adangel.org>
|
|||||||
|
|
||||||
2. The actual merge commands:
|
2. The actual merge commands:
|
||||||
|
|
||||||
We assume, that the PR has been created from the master branch. If this is not the case,
|
We assume, that the PR has been created from the main branch. If this is not the case,
|
||||||
then we'll either need to rebase or ask for rebasing before merging.
|
then we'll either need to rebase or ask for rebasing before merging.
|
||||||
|
|
||||||
```
|
```
|
||||||
git checkout master && git pull origin master # make sure, you have the latest code
|
git checkout main && git pull origin main # make sure, you have the latest code
|
||||||
git fetch origin pull/123/head:pr-123 && git checkout pr-123 # creates a new temporary branch "pr-123"
|
git fetch origin pull/123/head:pr-123 && git checkout pr-123 # creates a new temporary branch "pr-123"
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Update the [release notes](https://github.com/pmd/pmd/blob/master/docs/pages/release_notes.md):
|
3. Update the [release notes](https://github.com/pmd/pmd/blob/main/docs/pages/release_notes.md):
|
||||||
|
|
||||||
* Are there any API changes, that need to be documented? (Section "API Changes")
|
* Are there any API changes, that need to be documented? (Section "API Changes")
|
||||||
* Are there any significant changes to existing rules, that should be mentioned?
|
* Are there any significant changes to existing rules, that should be mentioned?
|
||||||
@@ -61,13 +61,13 @@ author: Andreas Dangel <andreas.dangel@adangel.org>
|
|||||||
And follow the instructions. This will create a new commit into to the current branch (pr-123) updating both
|
And follow the instructions. This will create a new commit into to the current branch (pr-123) updating both
|
||||||
the file `.all-contributorsrc` and `docs/pages/pmd/projectdocs/credits.md`.
|
the file `.all-contributorsrc` and `docs/pages/pmd/projectdocs/credits.md`.
|
||||||
|
|
||||||
5. Now merge the pull request into the master branch:
|
5. Now merge the pull request into the main branch:
|
||||||
|
|
||||||
```
|
```
|
||||||
git checkout master
|
git checkout main
|
||||||
git merge --no-ff pr-123 -m "Merge pull request #123 from xyz:branch
|
git merge --no-ff pr-123 -m "Full-title-of-the-pr (#123)
|
||||||
|
|
||||||
Full-title-of-the-pr #123" --log
|
Merge pull request #123 from xyz:branch" --log
|
||||||
```
|
```
|
||||||
|
|
||||||
{%include note.html content="If there are merge conflicts, you'll need to deal with them here." %}
|
{%include note.html content="If there are merge conflicts, you'll need to deal with them here." %}
|
||||||
@@ -75,7 +75,7 @@ author: Andreas Dangel <andreas.dangel@adangel.org>
|
|||||||
6. Run the complete build: `./mvnw clean verify -Pgenerate-rule-docs`
|
6. Run the complete build: `./mvnw clean verify -Pgenerate-rule-docs`
|
||||||
|
|
||||||
{% include note.html content="This will execute all the unit tests and the checkstyle tests. It ensures,
|
{% include note.html content="This will execute all the unit tests and the checkstyle tests. It ensures,
|
||||||
that the complete project can be build and is functioning on top of the current master." %}
|
that the complete project can be build and is functioning on top of the current main." %}
|
||||||
|
|
||||||
{% include note.html content="The profile `generate-rule-docs` will run the doc checks, that would
|
{% include note.html content="The profile `generate-rule-docs` will run the doc checks, that would
|
||||||
otherwise only run on github actions and fail the build, if e.g. a jdoc or rule reference is wrong." %}
|
otherwise only run on github actions and fail the build, if e.g. a jdoc or rule reference is wrong." %}
|
||||||
@@ -83,7 +83,7 @@ author: Andreas Dangel <andreas.dangel@adangel.org>
|
|||||||
7. If the build was successful, you are ready to push:
|
7. If the build was successful, you are ready to push:
|
||||||
|
|
||||||
```
|
```
|
||||||
git push origin master
|
git push origin main
|
||||||
```
|
```
|
||||||
|
|
||||||
Since the temporary branch is now not needed anymore, you can delete it:
|
Since the temporary branch is now not needed anymore, you can delete it:
|
||||||
@@ -92,7 +92,7 @@ author: Andreas Dangel <andreas.dangel@adangel.org>
|
|||||||
|
|
||||||
## Example 2: Merging PR #124 into a maintenance branch
|
## Example 2: Merging PR #124 into a maintenance branch
|
||||||
|
|
||||||
We ask, to create every pull request against master, to make it easier to contribute.
|
We ask, to create every pull request against main, to make it easier to contribute.
|
||||||
But if a pull request is intended to fix a bug in an older version of PMD, then we need to backport this pull request.
|
But if a pull request is intended to fix a bug in an older version of PMD, then we need to backport this pull request.
|
||||||
|
|
||||||
### Creating a maintenance branch
|
### Creating a maintenance branch
|
||||||
@@ -124,7 +124,7 @@ PMD version 5.8.0, so that we can create a bugfix release 5.8.1.
|
|||||||
|
|
||||||
```
|
```
|
||||||
git fetch origin pull/124/head:pr-124 && git checkout pr-124 # creates a new temporary branch
|
git fetch origin pull/124/head:pr-124 && git checkout pr-124 # creates a new temporary branch
|
||||||
git rebase master --onto pmd/5.8.x
|
git rebase main --onto pmd/5.8.x
|
||||||
./mvnw clean verify # make sure, everything works after the rebase
|
./mvnw clean verify # make sure, everything works after the rebase
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -154,7 +154,7 @@ PMD version 5.8.0, so that we can create a bugfix release 5.8.1.
|
|||||||
You need to manually close the pull request. Leave a comment, that it has been
|
You need to manually close the pull request. Leave a comment, that it has been
|
||||||
rebased onto the maintenance branch.
|
rebased onto the maintenance branch.
|
||||||
|
|
||||||
### Merging into master
|
### Merging into main
|
||||||
|
|
||||||
Now the PR has been merged into the maintenance branch, but it is missing in any later version of PMD.
|
Now the PR has been merged into the maintenance branch, but it is missing in any later version of PMD.
|
||||||
Therefore, we merge first into the next minor version maintenance branch (if existing):
|
Therefore, we merge first into the next minor version maintenance branch (if existing):
|
||||||
@@ -162,17 +162,17 @@ Therefore, we merge first into the next minor version maintenance branch (if exi
|
|||||||
git checkout pmd/5.9.x
|
git checkout pmd/5.9.x
|
||||||
git merge pmd/5.8.x
|
git merge pmd/5.8.x
|
||||||
|
|
||||||
After that, we merge the changes into the master branch:
|
After that, we merge the changes into the main branch:
|
||||||
|
|
||||||
git checkout master
|
git checkout main
|
||||||
git merge pmd/5.9.x
|
git merge pmd/5.9.x
|
||||||
|
|
||||||
{%include note.html content="This ensures, that every change on the maintenance branch eventually ends
|
{%include note.html content="This ensures, that every change on the maintenance branch eventually ends
|
||||||
up in the master branch and therefore in any future version of PMD.<br>
|
up in the main branch and therefore in any future version of PMD.<br>
|
||||||
The downside is however, that there are inevitable merge conflicts for the maven `pom.xml` files, since
|
The downside is however, that there are inevitable merge conflicts for the maven `pom.xml` files, since
|
||||||
every branch changed the version number differently.<br>
|
every branch changed the version number differently.<br>
|
||||||
We could avoid this by merging only the temporary branch \"pr-124\" into each maintenance branch and
|
We could avoid this by merging only the temporary branch \"pr-124\" into each maintenance branch and
|
||||||
eventually into master, with the risk of missing single commits in a maintenance branch, that have been
|
eventually into main, with the risk of missing single commits in a maintenance branch, that have been
|
||||||
done outside the temporary branch." %}
|
done outside the temporary branch." %}
|
||||||
|
|
||||||
### Merging vs. Cherry-Picking
|
### Merging vs. Cherry-Picking
|
||||||
@@ -181,4 +181,4 @@ We are not using cherry-picking, so that each fix is represented by a single com
|
|||||||
Cherry-picking would duplicate the commit and you can't see in the log, on which branches the fix has been
|
Cherry-picking would duplicate the commit and you can't see in the log, on which branches the fix has been
|
||||||
integrated (e.g. gitk and github show the branches, from which the specific commit is reachable).
|
integrated (e.g. gitk and github show the branches, from which the specific commit is reachable).
|
||||||
|
|
||||||
The downside is a more complex history - the maintenance branches and master branch are "connected" and not separate.
|
The downside is a more complex history - the maintenance branches and main branch are "connected" and not separate.
|
||||||
@@ -140,7 +140,7 @@ echo "* Days since last release: $(( ( $(date +%s) - $(git log --max-count=1 --f
|
|||||||
|
|
||||||
Note: both shell snippets are also integrated into `do-release.sh`.
|
Note: both shell snippets are also integrated into `do-release.sh`.
|
||||||
|
|
||||||
Check in all (version) changes to branch master or any other branch, from which the release takes place:
|
Check in all (version) changes to branch main or any other branch, from which the release takes place:
|
||||||
|
|
||||||
$ git commit -a -m "Prepare pmd release <version>"
|
$ git commit -a -m "Prepare pmd release <version>"
|
||||||
$ git push
|
$ git push
|
||||||
@@ -180,7 +180,7 @@ NEW_RELEASE_NOTES=$(bundle exec docs/render_release_notes.rb docs/pages/release_
|
|||||||
cat > "../pmd.github.io/${RELEASE_NOTES_POST}" <<EOF
|
cat > "../pmd.github.io/${RELEASE_NOTES_POST}" <<EOF
|
||||||
```
|
```
|
||||||
|
|
||||||
Check in all (version, blog post) changes to branch master:
|
Check in all (version, blog post) changes to branch main:
|
||||||
|
|
||||||
$ git commit -a -m "Prepare pmd release <version>"
|
$ git commit -a -m "Prepare pmd release <version>"
|
||||||
$ git push
|
$ git push
|
||||||
@@ -259,7 +259,7 @@ Here is, what happens:
|
|||||||
under <https://pmd.sourceforge.io/archive.phtml>.
|
under <https://pmd.sourceforge.io/archive.phtml>.
|
||||||
|
|
||||||
The release on GitHub Actions currently takes about 30-45 minutes. Once this is done, you
|
The release on GitHub Actions currently takes about 30-45 minutes. Once this is done, you
|
||||||
can proceed with releasing pmd designer, see <https://github.com/pmd/pmd-designer/blob/master/releasing.md>.
|
can proceed with releasing pmd designer, see <https://github.com/pmd/pmd-designer/blob/main/releasing.md>.
|
||||||
Make sure to release the version, you have used earlier for the property `pmd-designer.version`.
|
Make sure to release the version, you have used earlier for the property `pmd-designer.version`.
|
||||||
|
|
||||||
Once the pmd-designer release is done, you can proceed with part 2. This is simply triggering manually
|
Once the pmd-designer release is done, you can proceed with part 2. This is simply triggering manually
|
||||||
@@ -374,7 +374,7 @@ This is a {{ site.pmd.release_type }} release.
|
|||||||
Finally, commit and push the changes:
|
Finally, commit and push the changes:
|
||||||
|
|
||||||
$ git commit -m "Prepare next development version"
|
$ git commit -m "Prepare next development version"
|
||||||
$ git push origin master
|
$ git push origin main
|
||||||
|
|
||||||
|
|
||||||
## Branches
|
## Branches
|
||||||
@@ -382,7 +382,7 @@ Finally, commit and push the changes:
|
|||||||
### Merging
|
### Merging
|
||||||
|
|
||||||
If the release was done on a maintenance branch, such as `pmd/5.4.x`, then this branch should be
|
If the release was done on a maintenance branch, such as `pmd/5.4.x`, then this branch should be
|
||||||
merged into the next "higher" branches, such as `pmd/5.5.x` and `master`.
|
merged into the next "higher" branches, such as `pmd/5.5.x` and `main`.
|
||||||
|
|
||||||
This ensures, that all fixes done on the maintenance branch, finally end up in the other branches.
|
This ensures, that all fixes done on the maintenance branch, finally end up in the other branches.
|
||||||
In theory, the fixes should already be there, but you never now.
|
In theory, the fixes should already be there, but you never now.
|
||||||
@@ -392,7 +392,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,
|
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
|
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
|
from there. Then merge into the `main` branch and release from there. This way, the last release done, becomes
|
||||||
automatically the latest release on <https://docs.pmd-code.org/latest/> and on sourceforge.
|
automatically the latest release on <https://docs.pmd-code.org/latest/> and on sourceforge.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
@@ -159,7 +159,7 @@ The tool comes with a rather extensive help text, simply running with `--help`!
|
|||||||
description="Path to a file to which report output is written. The file is created if it does not exist. If this option is not specified, the report is rendered to standard output."
|
description="Path to a file to which report output is written. The file is created if it does not exist. If this option is not specified, the report is rendered to standard output."
|
||||||
%}
|
%}
|
||||||
{% include custom/cli_option_row.html options="--show-suppressed"
|
{% include custom/cli_option_row.html options="--show-suppressed"
|
||||||
description="Causes the suppressed rule violations to be added to the report."
|
description="Causes the suppressed rule violations to be added to the report if supported by the report format. See [PMD Report formats](pmd_userdocs_report_formats.html) for details."
|
||||||
%}
|
%}
|
||||||
{% include custom/cli_option_row.html options="--suppress-marker"
|
{% include custom/cli_option_row.html options="--suppress-marker"
|
||||||
option_arg="marker"
|
option_arg="marker"
|
||||||
|
|||||||
Loaded 30 of 431 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user