Skip to content

Commit a781914

Browse files
authored
Merge pull request #51 from xdev-software/develop
Release
2 parents b7bb069 + 2e7ef44 commit a781914

File tree

27 files changed

+949
-103
lines changed

27 files changed

+949
-103
lines changed

.config/pmd/ruleset.xml

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ruleset name="Default"
3+
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">
6+
7+
<description>
8+
This ruleset checks the code for discouraged programming constructs.
9+
</description>
10+
11+
<!-- Only rules that don't overlap with CheckStyle! -->
12+
13+
<rule ref="category/java/bestpractices.xml/AvoidUsingHardCodedIP"/>
14+
<rule ref="category/java/bestpractices.xml/PreserveStackTrace"/>
15+
<rule ref="category/java/bestpractices.xml/UseCollectionIsEmpty"/>
16+
<rule ref="category/java/bestpractices.xml/UseStandardCharsets"/>
17+
18+
<!-- Native code is platform dependent; Loading external native libs might pose a security threat -->
19+
<rule ref="category/java/codestyle.xml/AvoidUsingNativeCode"/>
20+
<rule ref="category/java/codestyle.xml/IdenticalCatchBranches"/>
21+
<rule ref="category/java/codestyle.xml/NoPackage"/>
22+
<rule ref="category/java/codestyle.xml/PrematureDeclaration"/>
23+
24+
<rule ref="category/java/design.xml">
25+
<!-- Sometimes abstract classes have just fields -->
26+
<exclude name="AbstractClassWithoutAnyMethod"/>
27+
28+
<!-- Using RuntimeExceptions is ok -->
29+
<exclude name="AvoidCatchingGenericException"/>
30+
<exclude name="AvoidThrowingRawExceptionTypes"/>
31+
32+
<!-- Limit too low -->
33+
<exclude name="AvoidDeeplyNestedIfStmts"/>
34+
35+
<!-- Limit too low -->
36+
<exclude name="CouplingBetweenObjects"/>
37+
38+
<!-- Limit too low -->
39+
<exclude name="CyclomaticComplexity"/>
40+
41+
<!-- Makes entity classes impossible -->
42+
<exclude name="DataClass"/>
43+
44+
<!-- Used commonly particular in bigger methods with upstream throws -->
45+
<exclude name="ExceptionAsFlowControl"/>
46+
47+
<!-- Limit too low -->
48+
<exclude name="ExcessiveImports"/>
49+
50+
<!-- Handled by TooManyFields/TooManyMethods -->
51+
<exclude name="ExcessivePublicCount"/>
52+
53+
<!-- Prohibits accessing members using multiple depths -->
54+
<exclude name="LawOfDemeter"/>
55+
56+
<!-- No effect -->
57+
<exclude name="LoosePackageCoupling"/>
58+
59+
<!-- Prohibits singleton pattern -->
60+
<exclude name="MutableStaticState"/>
61+
62+
<!-- Checks LoC, already handled by Checkstyle -->
63+
<exclude name="NcssCount"/>
64+
65+
<!-- Some override methods or Junit require this -->
66+
<exclude name="SignatureDeclareThrowsException"/>
67+
68+
<!-- Reports FP for equals methods -->
69+
<exclude name="SimplifyBooleanReturns"/>
70+
71+
<!-- Limit too low -->
72+
<exclude name="TooManyFields"/>
73+
74+
<!-- Limit too low -->
75+
<exclude name="TooManyMethods"/>
76+
77+
<!-- Limit too low -->
78+
<exclude name="UseObjectForClearerAPI"/>
79+
80+
<!-- Handled by checkstyle -->
81+
<exclude name="UseUtilityClass"/>
82+
</rule>
83+
84+
<rule ref="category/java/design.xml/AvoidDeeplyNestedIfStmts">
85+
<properties>
86+
<property name="problemDepth" value="4"/>
87+
</properties>
88+
</rule>
89+
<rule ref="category/java/design.xml/CouplingBetweenObjects">
90+
<properties>
91+
<property name="threshold" value="100"/>
92+
</properties>
93+
</rule>
94+
<rule ref="category/java/design.xml/CyclomaticComplexity">
95+
<properties>
96+
<property name="classReportLevel" value="150"/>
97+
<property name="methodReportLevel" value="25"/>
98+
<property name="cycloOptions" value=""/>
99+
</properties>
100+
</rule>
101+
<rule ref="category/java/design.xml/ExcessiveImports">
102+
<properties>
103+
<property name="minimum" value="200"/>
104+
</properties>
105+
</rule>
106+
<rule ref="category/java/design.xml/TooManyFields">
107+
<properties>
108+
<property name="maxfields" value="50"/>
109+
</properties>
110+
</rule>
111+
<rule ref="category/java/design.xml/TooManyMethods">
112+
<properties>
113+
<property name="maxmethods" value="100"/>
114+
</properties>
115+
</rule>
116+
117+
<rule ref="category/java/errorprone.xml/AvoidUsingOctalValues"/>
118+
<rule ref="category/java/errorprone.xml/BrokenNullCheck"/>
119+
<rule ref="category/java/errorprone.xml/ComparisonWithNaN"/>
120+
<rule ref="category/java/errorprone.xml/DoNotCallGarbageCollectionExplicitly"/>
121+
<rule ref="category/java/errorprone.xml/DontImportSun"/>
122+
<rule ref="category/java/errorprone.xml/MisplacedNullCheck"/>
123+
<rule ref="category/java/errorprone.xml/UnnecessaryCaseChange"/>
124+
125+
126+
<rule ref="category/java/multithreading.xml">
127+
<!-- Just bloats code -->
128+
<exclude name="AvoidSynchronizedAtMethodLevel"/>
129+
130+
<!-- NOPE -->
131+
<exclude name="DoNotUseThreads"/>
132+
133+
<!-- Doesn't detect nested thread safe singleton pattern -->
134+
<exclude name="NonThreadSafeSingleton"/>
135+
136+
<!-- Should relevant for fields that use multithreading which is rare -->
137+
<exclude name="UseConcurrentHashMap"/>
138+
</rule>
139+
140+
<rule ref="category/java/performance.xml">
141+
<!-- This was fixed in Java 10 -->
142+
<exclude name="AvoidFileStream"/>
143+
144+
<!-- Used everywhere and has neglectable performance impact -->
145+
<exclude name="AvoidInstantiatingObjectsInLoops"/>
146+
147+
<!-- Handled by checkstyle -->
148+
<exclude name="RedundantFieldInitializer"/>
149+
150+
<!-- Nowadays optimized by compiler; No code bloating needed -->
151+
<exclude name="UseStringBufferForStringAppends"/>
152+
</rule>
153+
154+
<rule ref="category/java/security.xml"/>
155+
</ruleset>

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
# Auto detect text files and perform LF normalization
22
* text=auto
3+
4+
# Force sh files to have LF
5+
*.sh text eol=lf
6+
7+
# Force MVN Wrapper Linux files LF
8+
mvnw text eol=lf
9+
.mvn/wrapper/maven-wrapper.properties text eol=lf

.github/.lycheeignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ignorefile for broken link check
2+
localhost
3+
mvnrepository.com

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: 🐞 Bug
2+
description: Create a bug report for something that is broken
3+
labels: [bug]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thank you for reporting a bug.
9+
10+
Please fill in as much information as possible about your bug so that we don't have to play "information ping-pong" and can help you immediately.
11+
12+
- type: checkboxes
13+
id: checklist
14+
attributes:
15+
label: "Checklist"
16+
options:
17+
- label: "I am able to reproduce the bug with the [latest version](https://github.com/xdev-software/testcontainers-selenium/releases/latest)"
18+
required: true
19+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/testcontainers-selenium/issues) or [closed](https://github.com/xdev-software/testcontainers-selenium/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
20+
required: true
21+
- label: "I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise."
22+
required: true
23+
- label: "This issue contains only one bug."
24+
required: true
25+
26+
- type: input
27+
id: app-version
28+
attributes:
29+
label: Affected version
30+
description: "In which version did you encounter the bug?"
31+
placeholder: "x.x.x"
32+
validations:
33+
required: true
34+
35+
- type: textarea
36+
id: steps-to-reproduce
37+
attributes:
38+
label: Steps to reproduce the bug
39+
description: |
40+
What did you do for the bug to show up?
41+
42+
If you can't cause the bug to show up again reliably (and hence don't have a proper set of steps to give us), please still try to give as many details as possible on how you think you encountered the bug.
43+
placeholder: |
44+
1. Use '...'
45+
2. Do '...'
46+
validations:
47+
required: true
48+
49+
- type: textarea
50+
id: expected-behavior
51+
attributes:
52+
label: Expected behavior
53+
description: |
54+
Tell us what you expect to happen.
55+
56+
- type: textarea
57+
id: actual-behavior
58+
attributes:
59+
label: Actual behavior
60+
description: |
61+
Tell us what happens with the steps given above.
62+
63+
- type: textarea
64+
id: additional-information
65+
attributes:
66+
label: Additional information
67+
description: |
68+
Any other relevant information you'd like to include

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
contact_links:
2+
- name: 💬 Contact support
3+
url: https://xdev.software/en/services/support
4+
about: "If you need support as soon as possible or/and you can't wait for any pull request"
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: ✨ Feature/Enhancement
2+
description: Suggest a new feature or enhancement
3+
labels: [enhancement]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thank you for suggesting a new feature/enhancement.
9+
10+
- type: checkboxes
11+
id: checklist
12+
attributes:
13+
label: "Checklist"
14+
options:
15+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/testcontainers-selenium/issues) or [closed](https://github.com/xdev-software/testcontainers-selenium/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
16+
required: true
17+
- label: "I have taken the time to fill in all the required details. I understand that the feature request will be dismissed otherwise."
18+
required: true
19+
- label: "This issue contains only one feature request/enhancement."
20+
required: true
21+
22+
- type: textarea
23+
id: description
24+
attributes:
25+
label: Description
26+
validations:
27+
required: true
28+
29+
- type: textarea
30+
id: additional-information
31+
attributes:
32+
label: Additional information

.github/ISSUE_TEMPLATE/question.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: ❓ Question
2+
description: Ask a question
3+
labels: [question]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking the time to fill out this form!
9+
10+
- type: checkboxes
11+
id: checklist
12+
attributes:
13+
label: "Checklist"
14+
options:
15+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/testcontainers-selenium/issues) or [closed](https://github.com/xdev-software/testcontainers-selenium/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
16+
required: true
17+
- label: "I have taken the time to fill in all the required details. I understand that the question will be dismissed otherwise."
18+
required: true
19+
20+
- type: textarea
21+
id: what-is-the-question
22+
attributes:
23+
label: What is/are your question(s)?
24+
validations:
25+
required: true
26+
27+
- type: textarea
28+
id: additional-information
29+
attributes:
30+
label: Additional information
31+
description: "Any other information you'd like to include - for instance logs, screenshots, etc."

.github/labels.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Default
2+
## Required for template
3+
- name: bug
4+
description: "Something isn't working"
5+
color: 'd73a4a'
6+
- name: enhancement
7+
description: New feature or request
8+
color: '#a2eeef'
9+
- name: question
10+
description: Information is requested
11+
color: '#d876e3'
12+
## Others
13+
- name: duplicate
14+
description: This already exists
15+
color: '#cfd3d7'
16+
- name: good first issue
17+
description: Good for newcomers
18+
color: '#7057ff'
19+
- name: help wanted
20+
description: Extra attention is needed
21+
color: '#008672'
22+
- name: invalid
23+
description: "This doesn't seem right"
24+
color: '#e4e669'
25+
# Custom
26+
- name: automated
27+
description: Created by an automation
28+
color: '#000000'
29+
- name: "can't reproduce"
30+
color: '#e95f2c'
31+
- name: customer-requested
32+
description: Was requested by a customer of us
33+
color: '#068374'
34+
- name: stale
35+
color: '#ededed'
36+
- name: waiting-for-response
37+
description: If no response is received after a certain time the issue will be closed
38+
color: '#202020'

.github/workflows/broken-links.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Broken links
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "23 23 * * 0"
7+
8+
permissions:
9+
issues: write
10+
11+
jobs:
12+
link-checker:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- run: mv .github/.lycheeignore .lycheeignore
18+
19+
- name: Link Checker
20+
id: lychee
21+
uses: lycheeverse/lychee-action@v1
22+
23+
- name: Find already existing issue
24+
id: find-issue
25+
run: |
26+
echo "number=$(gh issue list -l 'bug' -l 'automated' -L 1 -S 'in:title \"Link Checker Report\"' -s 'open' --json 'number' --jq '.[].number')" >> $GITHUB_OUTPUT
27+
env:
28+
GH_TOKEN: ${{ github.token }}
29+
30+
- name: Close issue if everything is fine
31+
if: env.lychee_exit_code == 0 && steps.find-issue.outputs.number != ''
32+
run: gh issue close -r 'not planned' ${{ steps.find-issue.outputs.number }}
33+
env:
34+
GH_TOKEN: ${{ github.token }}
35+
36+
- name: Create Issue From File
37+
if: env.lychee_exit_code != 0
38+
uses: peter-evans/create-issue-from-file@v5
39+
with:
40+
issue-number: ${{ steps.find-issue.outputs.number }}
41+
title: Link Checker Report
42+
content-filepath: ./lychee/out.md
43+
labels: bug, automated

0 commit comments

Comments
 (0)