Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#168 wip pmd 7.x #184

Merged
merged 37 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
9bc03f4
#168: Upgrade to pmd7 (#178)
dykov Sep 23, 2024
92158d7
Apply generic formatting
dgroup Sep 29, 2024
06f6073
qulice fixes
dgroup Sep 29, 2024
546c896
Ignore qulice checkstyle & pmd for now
dgroup Sep 29, 2024
3809a74
Enable jacoco and tests execution
dgroup Sep 29, 2024
eb85b6a
Fixed pmd issues
dgroup Sep 29, 2024
933e677
Fixed few checkstyle issues
dgroup Sep 29, 2024
f61de34
fix UseOpenApiInRestEndpoints, NoMandatoryConstructorInExceptionClass…
dykov Oct 8, 2024
f8f2486
Merge pull request #180 from dykov/168-wip-pmd-7.x
dykov Oct 10, 2024
452c67a
fix ruleset rules
dykov Oct 10, 2024
e8daa6b
Merge pull request #181 from dykov/168-wip-pmd-7.x
dykov Oct 10, 2024
6f99f7d
Merge pull request #1 from dgroup/168-wip-pmd-7.x
dykov Oct 13, 2024
5c94f5c
fix checkstyle in UseExistingConstant
dykov Oct 13, 2024
0f81a70
enable tests
dykov Oct 13, 2024
3b4fa5d
remove checkstyle exclude in qulice
dykov Oct 13, 2024
b11cdff
fix qulice PotentiallyThreadLocalPollutionByMdc
dykov Oct 13, 2024
fd81deb
fix qulice WrongRestMethodSignature
dykov Oct 13, 2024
869193d
fix qulice AvoidTypeAsLocalVariable
dykov Oct 13, 2024
b095fbe
fix qulice UseConstantAsMetricName
dykov Oct 13, 2024
25c7595
fix qulice AvoidProhibitedMethodsUsage
dykov Oct 13, 2024
f7a2129
fix qulice AvoidMdcOutsideTryStatement
dykov Oct 13, 2024
d172e30
fix qulice AvoidProhibitedClasses
dykov Oct 13, 2024
6d43e2d
fix qulice UseExistingConstant
dykov Oct 13, 2024
94f3029
fix qulice ObfuscationRequired
dykov Oct 13, 2024
5b99268
Merge pull request #182 from dykov/168-wip-pmd-7.x
dykov Oct 13, 2024
07fd531
Fixed few checkstyle issues
dgroup Oct 14, 2024
4504dc3
Increase code quality thresholds
dgroup Oct 14, 2024
cbd6334
Merge pull request #2 from dgroup/168-wip-pmd-7.x
dykov Oct 15, 2024
623b3ac
change pmd version in readme
dykov Oct 15, 2024
188ccd8
Merge pull request #185 from dykov/168-wip-pmd-7.x
dykov Oct 15, 2024
0791f9c
Upgrade JDK8 in CI
dgroup Oct 20, 2024
371819a
Upgrade JDK8 in CI
dgroup Oct 20, 2024
17ecf24
Upgrade JDK8 in CI
dgroup Oct 20, 2024
2332e08
mvn verbose
dgroup Oct 20, 2024
4d1f472
upgrade mvn surefire, failsafe plugins
dgroup Oct 20, 2024
b811d97
Use JDK11 for CI
dgroup Oct 20, 2024
9941205
Sonarqube fixes
dgroup Oct 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,240 changes: 1,240 additions & 0 deletions .editorconfig

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .githooks/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# MIT License
#
# Copyright (c) 2019-2022 Yurii Dubinka
# Copyright (c) 2019-2024 Yurii Dubinka
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
Expand Down
14 changes: 10 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ assignees: dgroup
---

### Summary
| Key | Value |
|:---------------|:------|
| Rule | ... |
| arch4u version | 0.1.1 or your version |

| Key | Value |
|:---------------|:----------------------|
| Rule | ... |
| arch4u version | 0.1.1 or your version |

### Your rule definition

```xml
<rule name="..."
since="0.2.0"
Expand All @@ -30,11 +32,15 @@ assignees: dgroup
```

### Describe the defect or false/positive rule violation

...

```java
// TBD
```

...

```java
TBD
```
24 changes: 15 additions & 9 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,19 @@ assignees: dgroup
---

### Summary
| Key | Value |
|:---------------|:------|
| Rule | ... |
| Ruleset | [io/github/dgroup/arch4u/pmd/....xml](https://github.com/dgroup/arch4u-pmd/blob/master/src/main/resources/io/github/dgroup/arch4u/pmd/....xml)|
| Category | Best Practices, Code Style, Design, Documentation, Error Prone, Multithreading, Performance, Security |
| Framework | ... |
| Since | 0.2.0 |
| Incidents in past at my experience | 10+ |
| Template | true/false |

| Key | Value |
|:-----------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------|
| Rule | ... |
| Ruleset | [io/github/dgroup/arch4u/pmd/....xml](https://github.com/dgroup/arch4u-pmd/blob/master/src/main/resources/io/github/dgroup/arch4u/pmd/....xml) |
| Category | Best Practices, Code Style, Design, Documentation, Error Prone, Multithreading, Performance, Security |
| Framework | ... |
| Since | 0.2.0 |
| Incidents in past at my experience | 10+ |
| Template | true/false |

### Rule definition

```xml
<rule name="..."
since="0.2.0"
Expand All @@ -35,11 +37,15 @@ assignees: dgroup
```

### Why?

...

```java
// TBD
```

...

```java
TBD
```
6 changes: 3 additions & 3 deletions .github/code_of_conduct.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ include:
Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
professional setting

## Our Responsibilities

Expand Down
4 changes: 0 additions & 4 deletions .github/contributing.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
Just send a pull request and call it a day.





Only if the build is green, you send us your pull request.

Thanks!
2 changes: 1 addition & 1 deletion .github/lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ daysUntilLock: 365
skipCreatedBefore: false

# Issues and pull requests with these labels will be ignored. Set to `[]` to disable
exemptLabels: []
exemptLabels: [ ]

# Label to add before locking, such as `outdated`. Set to `false` to disable
lockLabel: false
Expand Down
6 changes: 3 additions & 3 deletions .github/profanity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ censor: false
placeholder: '*'

# A list of extra forbidden words. Set to `[]` to disable
extraWords: []
extraWords: [ ]

# A list of forbidden words to be ignored. Set to `[]` to disable
exemptWords: []
exemptWords: [ ]

# Number of days of inactivity before an inappropriate Issue or Pull Request is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as inappropriate.
daysUntilClose: 2

# Issues or Pull Requests with these labels will never be considered inappropriate. Set to `[]` to disable
exemptLabels: []
exemptLabels: [ ]

# Set to true to ignore issues in a project (defaults to false)
exemptProjects: false
Expand Down
16 changes: 9 additions & 7 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
Many thanks for your contribution, we truly appreciate it. We will appreciate it even more, if you make sure that you can say "YES" to each point in this short checklist:
Many thanks for your contribution, we truly appreciate it. We will appreciate it even more, if you make sure that you
can say "YES" to each point in this short checklist:

- You made a small amount of changes (less than 100 lines, less than 10 files)
- You made changes related to only one bug (create separate PRs for separate problems)
- You are ready to defend your changes (there will be a code review)
- You don't touch what you don't understand
- You ran the build locally and it passed
- You made a small amount of changes (less than 100 lines, less than 10 files)
- You made changes related to only one bug (create separate PRs for separate problems)
- You are ready to defend your changes (there will be a code review)
- You don't touch what you don't understand
- You ran the build locally and it passed

This article will help you understand what we are looking for: http://www.yegor256.com/2015/02/09/serious-code-reviewer.html
This article will help you understand what we are looking
for: http://www.yegor256.com/2015/02/09/serious-code-reviewer.html

Thank you for your contribution!
70 changes: 35 additions & 35 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: CI
on:
on:
push:
branches:
- master
Expand Down Expand Up @@ -39,44 +39,44 @@ jobs:
fi
- name: Notify Telegram group
uses: yanzay/[email protected]
if: success() && github.ref == 'refs/heads/master'
if: success() && github.ref == 'refs/heads/master'
with:
chat: ${{ secrets.TELEGRAM_CHAT }} # user id or channel name secret
token: ${{ secrets.TELEGRAM_TOKEN }} # token secret
status: ${{ job.status }} # do not modify this line
sonarqube:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Inspection by SonarQube
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
MAVEN_OPTS: |
-Xmx1024m
-Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS
-Dorg.slf4j.simpleLogger.showDateTime=true
run: |
mvn -B -Pqulice clean install
if [ -n "${{ secrets.SONAR_TOKEN }}" ]; then
mvn -B -Pqulice org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
fi
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Inspection by SonarQube
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
MAVEN_OPTS: |
-Xmx1024m
-Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS
-Dorg.slf4j.simpleLogger.showDateTime=true
run: |
mvn -B -Pqulice clean install
if [ -n "${{ secrets.SONAR_TOKEN }}" ]; then
mvn -B -Pqulice org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
fi
64 changes: 32 additions & 32 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,41 +37,41 @@ jobs:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v4
# @todo #/DEV Setup java8 for inspection during CI/CD by CodeQL tool
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: '${{ env.java }}'
distribution: 'adopt'
check-latest: true
- name: Checkout repository
uses: actions/checkout@v4
# @todo #/DEV Setup java8 for inspection during CI/CD by CodeQL tool
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: '${{ env.java }}'
distribution: 'adopt'
check-latest: true

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
4 changes: 2 additions & 2 deletions .rultor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ readers:

assets:
settings.xml: "dgroup/home#settings.xml"
pubring.gpg: "dgroup/home#8DF36117-arch4u-pubring.gpg"
secring.gpg: "dgroup/home#8DF36117-arch4u-secring.gpg"
pubring.gpg: "dgroup/home#8DF36117-arch4u-pubring.gpg"
secring.gpg: "dgroup/home#8DF36117-arch4u-secring.gpg"

merge:
env:
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# MIT License
#
# Copyright (c) 2019-2022 Yurii Dubinka
# Copyright (c) 2019-2024 Yurii Dubinka
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
Expand Down
2 changes: 1 addition & 1 deletion license.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019-2022 Yurii Dubinka
Copyright (c) 2019-2024 Yurii Dubinka

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"),
Expand Down
Loading
Loading