Skip to content

Commit 0da431c

Browse files
authored
Merge branch 'main' into 6517
2 parents 9fe8c5e + a20a5d9 commit 0da431c

235 files changed

Lines changed: 4630 additions & 497 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.all-contributorsrc

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8531,6 +8531,34 @@
85318531
"contributions": [
85328532
"bug"
85338533
]
8534+
},
8535+
{
8536+
"login": "JonnyPower",
8537+
"name": "Jonny Alexander Power",
8538+
"avatar_url": "https://avatars.githubusercontent.com/u/1668924?v=4",
8539+
"profile": "https://jonnypower.com/",
8540+
"contributions": [
8541+
"bug",
8542+
"code"
8543+
]
8544+
},
8545+
{
8546+
"login": "martinvisser",
8547+
"name": "Martin Visser",
8548+
"avatar_url": "https://avatars.githubusercontent.com/u/3170236?v=4",
8549+
"profile": "https://warriorofmars.com/",
8550+
"contributions": [
8551+
"bug"
8552+
]
8553+
},
8554+
{
8555+
"login": "praful-gupta",
8556+
"name": "P Gupta",
8557+
"avatar_url": "https://avatars.githubusercontent.com/u/18356661?v=4",
8558+
"profile": "https://github.com/praful-gupta",
8559+
"contributions": [
8560+
"bug"
8561+
]
85348562
}
85358563
],
85368564
"contributorsPerLine": 7,

.ci/files/Gemfile.lock

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,37 @@ GEM
22
remote: https://rubygems.org/
33
specs:
44
base64 (0.3.0)
5-
bigdecimal (3.2.3)
6-
concurrent-ruby (1.3.5)
7-
differ (0.1.2)
8-
et-orbi (1.3.0)
5+
bigdecimal (4.1.1)
6+
concurrent-ruby (1.3.6)
7+
et-orbi (1.4.0)
98
tzinfo
10-
fugit (1.11.2)
11-
et-orbi (~> 1, >= 1.2.11)
9+
fugit (1.12.1)
10+
et-orbi (~> 1.4)
1211
raabro (~> 1.4)
13-
liquid (5.8.7)
12+
liquid (5.12.0)
1413
bigdecimal
1514
strscan (>= 3.1.1)
1615
logger (1.7.0)
17-
logger-colors (1.0.0)
18-
nokogiri (1.19.1-x86_64-linux-gnu)
16+
logger-colors (1.1.0)
17+
logger
18+
nokogiri (1.19.2-x86_64-linux-gnu)
1919
racc (~> 1.4)
2020
ostruct (0.6.3)
21-
pmdtester (1.6.2)
21+
pmdtester (1.7.0)
2222
base64 (~> 0.3)
23-
bigdecimal (~> 3.2)
24-
differ (~> 0.1)
25-
liquid (~> 5.8)
23+
bigdecimal (~> 4.0)
24+
liquid (~> 5.11)
2625
logger (~> 1.7)
27-
logger-colors (~> 1.0)
28-
nokogiri (~> 1.18)
26+
logger-colors (~> 1.1)
27+
nokogiri (~> 1.19)
2928
rufus-scheduler (~> 3.9)
3029
slop (~> 4.10)
3130
raabro (1.4.0)
3231
racc (1.8.1)
3332
rufus-scheduler (3.9.2)
3433
fugit (~> 1.1, >= 1.11.1)
3534
slop (4.10.1)
36-
strscan (3.1.5)
35+
strscan (3.1.8)
3736
tzinfo (2.0.6)
3837
concurrent-ruby (~> 1.0)
3938

@@ -47,4 +46,4 @@ DEPENDENCIES
4746
pmdtester
4847

4948
BUNDLED WITH
50-
2.6.9
49+
4.0.8

.ci/files/pmdtester.rb

Lines changed: 19 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -22,62 +22,40 @@ def get_args(base_branch, autogen = true, patch_config = './pmd/.ci/files/all-re
2222
]
2323
end
2424

25+
@summary_file = 'target/reports/diff/summary.txt'
26+
@conclusion_file = 'target/reports/diff/conclusion.txt'
27+
2528
def run_pmdtester
2629
Dir.chdir('..') do
2730
begin
2831
@base_branch = ENV['PMD_CI_BRANCH']
2932
@logger.info "Run against PR base #{@base_branch}"
3033
@summary = PmdTester::Runner.new(get_args(@base_branch)).run
3134

32-
if Dir.exist?('target/reports/diff')
33-
message = create_message
34-
conclusion = determine_conclusion
35-
else
36-
message = "No regression tested rules have been changed."
37-
conclusion = "skipped"
35+
unless File.exist?(@summary_file) && File.exist?(@conclusion_file)
36+
write_error_result
37+
@logger.error "Running pmdtester failed: summary or conclusion file not found."
3838
end
3939

4040
rescue StandardError => e
41-
message = "⚠️ Running pmdtester failed, this message is mainly used to remind the maintainers of PMD."
42-
conclusion = "failure"
43-
@logger.error "Running pmdtester failed: #{e.inspect}"
44-
end
45-
46-
unless Dir.exist?('target/reports/diff')
47-
Dir.mkdir('target/reports/diff')
41+
write_error_result
42+
@logger.error "Running pmdtester failed: #{e.inspect}\n\n#{e.backtrace.join("\n")}"
4843
end
49-
summary_file = 'target/reports/diff/summary.txt'
50-
File.write(summary_file, message)
51-
@logger.info "Wrote summary file #{summary_file}:\n\n#{message}"
52-
conclusion_file = 'target/reports/diff/conclusion.txt'
53-
File.write(conclusion_file, conclusion)
54-
@logger.info "Wrote conclusion file #{conclusion_file}: #{conclusion}"
5544
end
5645
end
5746

58-
def create_message
59-
"Compared to #{@base_branch}:\n"\
60-
"This changeset " \
61-
"changes #{@summary[:violations][:changed]} violations,\n" \
62-
"introduces #{@summary[:violations][:new]} new violations, " \
63-
"#{@summary[:errors][:new]} new errors and " \
64-
"#{@summary[:configerrors][:new]} new configuration errors,\n" \
65-
"removes #{@summary[:violations][:removed]} violations, "\
66-
"#{@summary[:errors][:removed]} errors and " \
67-
"#{@summary[:configerrors][:removed]} configuration errors.\n"
68-
end
69-
70-
def determine_conclusion
71-
total_changes = @summary[:violations][:changed]
72-
+ @summary[:violations][:new]
73-
+ @summary[:violations][:removed]
74-
+ @summary[:errors][:new]
75-
+ @summary[:configerrors][:new]
76-
if total_changes > 0
77-
"neutral"
78-
else
79-
"success"
47+
def write_error_result
48+
unless Dir.exist?('target/reports/diff')
49+
Dir.mkdir('target/reports/diff')
8050
end
51+
52+
message = "⚠️ Running pmdtester failed, this message is mainly used to remind the maintainers of PMD."
53+
File.write(@summary_file, message)
54+
@logger.info "Wrote summary file #{@summary_file}:\n\n#{message}"
55+
56+
conclusion = "failure"
57+
File.write(@conclusion_file, conclusion)
58+
@logger.info "Wrote conclusion file #{@conclusion_file}: #{conclusion}"
8159
end
8260

8361
# Perform regression testing

.ci/files/project-list.xml

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22

33
<projectlist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="projectlist_1_1_0.xsd">
4+
xsi:noNamespaceSchemaLocation="projectlist_1_3_0.xsd">
55
<description>Standard Projects</description>
66

77
<project>
@@ -29,6 +29,16 @@ mvn test-compile -B
2929
mvn dependency:build-classpath -DincludeScope=test -Dmdep.outputFile=classpath.txt -B
3030
]]></build-command>
3131
<auxclasspath-command>echo -n "${HOME}/openjdk11/lib/jrt-fs.jar:$(pwd)/target/classes:$(pwd)/target/test-classes:"; cat classpath.txt</auxclasspath-command>
32+
<cpd-options>
33+
<language>java</language>
34+
<minimum-tokens>50</minimum-tokens>
35+
<max-memory>4g</max-memory>
36+
<directories>
37+
<!-- this avoids analyzing src/test/resources-noncompilable ... -->
38+
<directory>src/main/java</directory>
39+
<directory>src/test/java</directory>
40+
</directories>
41+
</cpd-options>
3242
</project>
3343

3444
<project>
@@ -158,6 +168,11 @@ EOF
158168
./gradlew --console=plain --build-cache --no-daemon --max-workers=4 createSquishClasspath -q > classpath.txt
159169
]]></build-command>
160170
<auxclasspath-command>echo -n "${HOME}/openjdk11/lib/jrt-fs.jar:"; cat classpath.txt</auxclasspath-command>
171+
<cpd-options>
172+
<language>java</language>
173+
<minimum-tokens>150</minimum-tokens>
174+
<max-memory>4g</max-memory>
175+
</cpd-options>
161176
</project>
162177

163178
<project>
@@ -167,20 +182,38 @@ EOF
167182
<tag>jdk-11+28</tag>
168183
<src-subpath>src/java.base</src-subpath>
169184
<auxclasspath-command>echo -n "${HOME}/openjdk11/lib/jrt-fs.jar"</auxclasspath-command>
185+
<cpd-options>
186+
<language>java</language>
187+
<minimum-tokens>150</minimum-tokens>
188+
<max-memory>4g</max-memory>
189+
<directories>
190+
<directory>src/java.base</directory>
191+
</directories>
192+
</cpd-options>
170193
</project>
171194

172195
<project>
173196
<name>Schedul-o-matic-9000</name>
174197
<type>git</type>
175198
<connection>https://github.com/SalesforceLabs/Schedul-o-matic-9000</connection>
176199
<tag>6b1229ba43b38931fbbab5924bc9b9611d19a786</tag>
200+
<cpd-options>
201+
<language>apex</language>
202+
<minimum-tokens>100</minimum-tokens>
203+
<max-memory>512m</max-memory>
204+
</cpd-options>
177205
</project>
178206

179207
<project>
180208
<name>fflib-apex-common</name>
181209
<type>git</type>
182210
<connection>https://github.com/apex-enterprise-patterns/fflib-apex-common</connection>
183211
<tag>7e0891efb86d23de62811af56d87d0959082a322</tag>
212+
<cpd-options>
213+
<language>apex</language>
214+
<minimum-tokens>100</minimum-tokens>
215+
<max-memory>512m</max-memory>
216+
</cpd-options>
184217
</project>
185218

186219
<project>
@@ -189,6 +222,11 @@ EOF
189222
<connection>https://github.com/nawforce/apex-link</connection>
190223
<tag>v2.3.0</tag>
191224
<src-subpath>samples</src-subpath>
225+
<cpd-options>
226+
<language>apex</language>
227+
<minimum-tokens>100</minimum-tokens>
228+
<max-memory>512m</max-memory>
229+
</cpd-options>
192230
</project>
193231

194232
<project>
@@ -197,12 +235,34 @@ EOF
197235
<connection>https://github.com/pmd/java-regression-tests</connection>
198236
<tag>main</tag>
199237
<auxclasspath-command>realpath java-regression-tests-*.jar</auxclasspath-command>
238+
<cpd-options>
239+
<language>java</language>
240+
<minimum-tokens>100</minimum-tokens>
241+
<max-memory>512m</max-memory>
242+
</cpd-options>
200243
</project>
201244

202245
<project>
203246
<name>OracleDBUtils</name>
204247
<type>git</type>
205248
<connection>https://github.com/Qualtagh/OracleDBUtils</connection>
206249
<tag>0513fe6b053b31e6c09ac6f86eb2064733ecf32d</tag>
250+
<cpd-options>
251+
<language>plsql</language>
252+
<minimum-tokens>100</minimum-tokens>
253+
<max-memory>512m</max-memory>
254+
</cpd-options>
255+
</project>
256+
257+
<project>
258+
<name>alsa-firmware</name>
259+
<type>git</type>
260+
<connection>https://github.com/alsa-project/alsa-firmware</connection>
261+
<tag>v1.2.1</tag>
262+
<cpd-options>
263+
<language>cpp</language>
264+
<minimum-tokens>100</minimum-tokens>
265+
<max-memory>4g</max-memory>
266+
</cpd-options>
207267
</project>
208268
</projectlist>

.ci/tools/typos.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ TYPOS_GH_ANNOTATE=${TYPOS_GH_ANNOTATE:=""}
66
# whether to check for a new version of typos
77
TYPOS_CHECK_UPDATE=${TYPOS_CHECK_UPDATE:=""}
88

9-
TYPOS_VERSION="v1.44.0"
9+
TYPOS_VERSION="v1.45.1"
1010
if [ -n "$TYPOS_CHECK_UPDATE" ]; then
1111
echo "Checking for latest typos version..."
1212
LATEST_TYPO_VERSION=$(curl -s -L \

0 commit comments

Comments
 (0)