Skip to content

Commit 3616eb9

Browse files
committed
Merge remote-tracking branch 'origin/master' into 443-introduce-collection-property
2 parents a38aec6 + 89d1f7e commit 3616eb9

File tree

76 files changed

+3530
-1213
lines changed

Some content is hidden

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

76 files changed

+3530
-1213
lines changed

.checkstyle.xml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
<?xml version="1.0"?>
22
<!DOCTYPE module PUBLIC
3-
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
4-
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
3+
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
4+
"https://checkstyle.org/dtds/configuration_1_3.dtd">
55
<!--
6-
In order to be compatible with CodeClimate, we have to stay in sync with the version of Checkstyle that they are using.
7-
It doesn't seem to be updated much by default, but we can specify a channel, which is currently using 10.7.0.
8-
Check the links below to get up-to-date version information.
9-
https://github.com/codeclimate/codeclimate-checkstyle/branches/all (channel/ branches)
10-
https://docs.codeclimate.com/docs/checkstyle
11-
https://github.com/codeclimate/codeclimate-checkstyle/blob/master/bin/install-checkstyle.sh
6+
In order to be compatible with Megalint, we have to stay in sync with the version of Checkstyle that they are using.
7+
This is, at the time of writing, 10.25.0. Check the documentation to get up-to-date version information:
8+
https://megalinter.io/8.8.0/descriptors/java_checkstyle/
9+
The output of the GitHub Action also reports the Checkstyle version:
10+
https://github.com/AuthMe/ConfigMe/actions/workflows/mega-linter.yml?query=branch%3Amaster
1211
-->
1312

1413
<module name="Checker">
1514
<property name="charset" value="UTF-8" />
16-
<property name="severity" value="warning" />
15+
<property name="severity" value="error" />
1716
<property name="fileExtensions" value="java" />
1817

1918
<module name="SuppressWarningsFilter" />
@@ -147,7 +146,7 @@
147146
<module name="JavadocTagContinuationIndentation" />
148147
<module name="JavadocType" />
149148
<module name="JavadocVariable">
150-
<property name="scope" value="package" />
149+
<property name="accessModifiers" value="package" />
151150
</module>
152151
<module name="MissingJavadocMethod">
153152
<property name="scope" value="package" />

.codeclimate.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.config/yamllint.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
rules:
2+
line-length:
3+
max: 120
4+
5+
# GitHub Actions use 'on' as key in their config, which hits the "truthy" check. Disable it.
6+
# https://github.com/adrienverge/yamllint/issues/430
7+
truthy:
8+
check-keys: false

.github/dependabot.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
version: 2
22
updates:
3-
- package-ecosystem: maven
4-
directory: "/"
5-
schedule:
6-
interval: daily
7-
open-pull-requests-limit: 10
8-
target-branch: dependencies
9-
ignore:
10-
- dependency-name: "org.mockito:mockito-core"
11-
versions: ">= 5"
12-
- dependency-name: "org.mockito:mockito-junit-jupiter"
13-
versions: ">= 5"
14-
- package-ecosystem: "github-actions"
15-
directory: "/"
16-
schedule:
17-
interval: daily
18-
target-branch: master
3+
- package-ecosystem: maven
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
open-pull-requests-limit: 10
8+
target-branch: dependencies
9+
ignore:
10+
- dependency-name: "org.mockito:mockito-core"
11+
versions: [">= 5"]
12+
- dependency-name: "org.mockito:mockito-junit-jupiter"
13+
versions: [">= 5"]
14+
- package-ecosystem: "github-actions"
15+
directory: "/"
16+
schedule:
17+
interval: daily
18+
target-branch: master

.github/workflows/maven_jdk11.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/maven_jdk8.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
name: Java 8 build
44
on: [push, pull_request]
5+
permissions:
6+
contents: read
57

68
jobs:
79
build:
@@ -10,10 +12,10 @@ jobs:
1012
coveralls_repo_token: ${{ secrets.COVERALLS_REPO_TOKEN }}
1113

1214
steps:
13-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v5
1416

1517
- name: Set up JDK 8
16-
uses: actions/setup-java@v4
18+
uses: actions/setup-java@v5
1719
with:
1820
java-version: '8'
1921
distribution: 'adopt'
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Secondary build that builds the project with JDK 11+. Note that the target in the pom.xml is still Java 8.
2+
3+
name: Maven build
4+
on: [push, pull_request]
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
# Java 8 has its own file so we can do other stuff like Coveralls
14+
java: ['11', '17', '21']
15+
name: Java ${{ matrix.java }} build
16+
17+
steps:
18+
- uses: actions/checkout@v5
19+
- name: Set up Java
20+
uses: actions/setup-java@v5
21+
with:
22+
java-version: ${{ matrix.java }}
23+
distribution: 'adopt'
24+
- name: Build with Maven
25+
run: mvn -B --file pom.xml package

.github/workflows/mega-linter.yml

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
# MegaLinter GitHub Action configuration file
2+
# More info at https://megalinter.io
3+
---
4+
name: MegaLinter
5+
6+
# Trigger mega-linter at every push. Action will also be visible from
7+
# Pull Requests to master
8+
on:
9+
# Comment this line to trigger action only on pull-requests
10+
# (not recommended if you don't pay for GH Actions)
11+
push:
12+
13+
pull_request:
14+
branches:
15+
- master
16+
17+
# Permissions. Depending on config, contents: write, issues: write and pull-requests: write should be added
18+
permissions:
19+
contents: read
20+
pull-requests: write
21+
22+
# Comment env block if you do not want to apply fixes
23+
env:
24+
# Apply linter fixes configuration
25+
#
26+
# When active, APPLY_FIXES must also be defined as environment variable
27+
# (in github/workflows/mega-linter.yml or other CI tool)
28+
APPLY_FIXES: none
29+
30+
# Decide which event triggers application of fixes in a commit or a PR
31+
# (pull_request, push, all)
32+
APPLY_FIXES_EVENT: pull_request
33+
34+
# If APPLY_FIXES is used, defines if the fixes are directly committed (commit)
35+
# or posted in a PR (pull_request)
36+
APPLY_FIXES_MODE: commit
37+
38+
concurrency:
39+
group: ${{ github.ref }}-${{ github.workflow }}
40+
cancel-in-progress: true
41+
42+
jobs:
43+
megalinter:
44+
name: MegaLinter
45+
runs-on: ubuntu-latest
46+
47+
steps:
48+
# Git Checkout
49+
- name: Checkout Code
50+
uses: actions/checkout@v4
51+
with:
52+
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
53+
54+
# If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to
55+
# improve performance
56+
fetch-depth: 0
57+
58+
# MegaLinter
59+
- name: MegaLinter
60+
61+
# You can override MegaLinter flavor used to have faster performances
62+
# More info at https://megalinter.io/latest/flavors/
63+
uses: oxsecurity/megalinter/flavors/java@v8
64+
65+
id: ml
66+
67+
# All available variables are described in documentation
68+
# https://megalinter.io/latest/config-file/
69+
env:
70+
# Validates all source when push on master, else just the git diff with
71+
# master. Override with true if you always want to lint all sources
72+
#
73+
# To validate the entire codebase, set to:
74+
# VALIDATE_ALL_CODEBASE: true
75+
#
76+
# To validate only diff with master, set to:
77+
# VALIDATE_ALL_CODEBASE: >-
78+
# ${{
79+
# github.event_name == 'push' &&
80+
# github.ref == 'refs/heads/master'
81+
# }}
82+
VALIDATE_ALL_CODEBASE: true
83+
84+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
85+
86+
# Uncomment to use ApiReporter (Grafana)
87+
# API_REPORTER: true
88+
# API_REPORTER_URL: ${{ secrets.API_REPORTER_URL }}
89+
# API_REPORTER_BASIC_AUTH_USERNAME: ${{ secrets.API_REPORTER_BASIC_AUTH_USERNAME }}
90+
# API_REPORTER_BASIC_AUTH_PASSWORD: ${{ secrets.API_REPORTER_BASIC_AUTH_PASSWORD }}
91+
# API_REPORTER_METRICS_URL: ${{ secrets.API_REPORTER_METRICS_URL }}
92+
# API_REPORTER_METRICS_BASIC_AUTH_USERNAME: ${{ secrets.API_REPORTER_METRICS_BASIC_AUTH_USERNAME }}
93+
# API_REPORTER_METRICS_BASIC_AUTH_PASSWORD: ${{ secrets.API_REPORTER_METRICS_BASIC_AUTH_PASSWORD }}
94+
# API_REPORTER_DEBUG: false
95+
96+
# ADD YOUR CUSTOM ENV VARIABLES HERE TO OVERRIDE VALUES OF
97+
# .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY
98+
99+
# Upload MegaLinter artifacts
100+
- name: Archive production artifacts
101+
uses: actions/upload-artifact@v4
102+
if: success() || failure()
103+
with:
104+
name: MegaLinter reports
105+
include-hidden-files: "true"
106+
path: |
107+
megalinter-reports
108+
mega-linter.log
109+
110+
# Create pull request if applicable
111+
# (for now works only on PR from same repository, not from forks)
112+
- name: Create Pull Request with applied fixes
113+
uses: peter-evans/create-pull-request@v6
114+
id: cpr
115+
if: >-
116+
steps.ml.outputs.has_updated_sources == 1 &&
117+
(
118+
env.APPLY_FIXES_EVENT == 'all' ||
119+
env.APPLY_FIXES_EVENT == github.event_name
120+
) &&
121+
env.APPLY_FIXES_MODE == 'pull_request' &&
122+
(
123+
github.event_name == 'push' ||
124+
github.event.pull_request.head.repo.full_name == github.repository
125+
) &&
126+
!contains(github.event.head_commit.message, 'skip fix')
127+
with:
128+
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
129+
commit-message: "[MegaLinter] Apply linters automatic fixes"
130+
title: "[MegaLinter] Apply linters automatic fixes"
131+
labels: bot
132+
133+
- name: Create PR output
134+
if: >-
135+
steps.ml.outputs.has_updated_sources == 1 &&
136+
(
137+
env.APPLY_FIXES_EVENT == 'all' ||
138+
env.APPLY_FIXES_EVENT == github.event_name
139+
) &&
140+
env.APPLY_FIXES_MODE == 'pull_request' &&
141+
(
142+
github.event_name == 'push' ||
143+
github.event.pull_request.head.repo.full_name == github.repository
144+
) &&
145+
!contains(github.event.head_commit.message, 'skip fix')
146+
run: |
147+
echo "PR Number - ${{ steps.cpr.outputs.pull-request-number }}"
148+
echo "PR URL - ${{ steps.cpr.outputs.pull-request-url }}"
149+
150+
# Push new commit if applicable
151+
# (for now works only on PR from same repository, not from forks)
152+
- name: Prepare commit
153+
if: >-
154+
steps.ml.outputs.has_updated_sources == 1 &&
155+
(
156+
env.APPLY_FIXES_EVENT == 'all' ||
157+
env.APPLY_FIXES_EVENT == github.event_name
158+
) &&
159+
env.APPLY_FIXES_MODE == 'commit' &&
160+
github.ref != 'refs/heads/master' &&
161+
(
162+
github.event_name == 'push' ||
163+
github.event.pull_request.head.repo.full_name == github.repository
164+
) &&
165+
!contains(github.event.head_commit.message, 'skip fix')
166+
run: sudo chown -Rc $UID .git/
167+
168+
- name: Commit and push applied linter fixes
169+
uses: stefanzweifel/git-auto-commit-action@v5
170+
if: >-
171+
steps.ml.outputs.has_updated_sources == 1 &&
172+
(
173+
env.APPLY_FIXES_EVENT == 'all' ||
174+
env.APPLY_FIXES_EVENT == github.event_name
175+
) &&
176+
env.APPLY_FIXES_MODE == 'commit' &&
177+
github.ref != 'refs/heads/master' &&
178+
(
179+
github.event_name == 'push' ||
180+
github.event.pull_request.head.repo.full_name == github.repository
181+
) &&
182+
!contains(github.event.head_commit.message, 'skip fix')
183+
with:
184+
branch: >-
185+
${{
186+
github.event.pull_request.head.ref ||
187+
github.head_ref ||
188+
github.ref
189+
}}
190+
commit_message: "[MegaLinter] Apply linters fixes"
191+
commit_user_name: megalinter-bot
192+
commit_user_email: [email protected]

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,5 @@ nb-configuration.xml
109109
### Git ###
110110
# Don't exclude the .gitignore itself
111111
!.gitignore
112+
113+
megalinter-reports/

.idea/checkstyle-idea.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)