-
Couldn't load subscription status.
- Fork 0
feat(sdk): add linter and fix linter findings #39
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
Merged
Merged
Changes from 28 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
be54320
feat(sdk): add linter and fix linter findings
rubenhoenle 7a3fb20
adapt pmd commentsize
Benjosh95 700e032
apply make fmt
Benjosh95 5dff990
shorten deprecated comments
Benjosh95 7670547
fix commentDefaultAccessModifier
Benjosh95 bcf629a
fix pmd ImmutableField
Benjosh95 2e0f841
fix pmd AvoidUncheckedExceptionsInSignatures
Benjosh95 dc61aa0
fix pmd AvoidThrowingRawExceptionTypes
Benjosh95 fba3469
fix pmd avoidsynchronized statement or method
Benjosh95 62c44e0
fix pmd law-of-demeter in ruleset
Benjosh95 d7aec54
fix pmd GuardLogStatement
Benjosh95 c6b1de5
fix pmd commentsize
Benjosh95 92c9c3f
fix pmd SystemPrintln
Benjosh95 4c988e1
fix pmd commentsize
Benjosh95 26134b3
fix pmd commentsize
Benjosh95 c1f8862
fix pmd systemprintln, guardlogstatement
Benjosh95 071954b
fix pmd AvoidThrowingRawExceptionTypes
Benjosh95 03f6849
fix pmd NPathComplexity
Benjosh95 0eaef38
rework fix pmd systemprintln, guardlogstatement
Benjosh95 53176a3
fix pmd AvoidThrowingRawExceptionTypes
Benjosh95 10a0662
fix pmd UseUtilityClass
Benjosh95 a9cc5bc
fix pmd useutilityclass, refactor example class modifiers
Benjosh95 8330da9
fix pms useutilityclass classlevel
Benjosh95 75ccc27
apply make fmt
Benjosh95 f4e40c8
update ci pipeline to include new linter
Benjosh95 245233d
remove comments
Benjosh95 ddb2f62
remove pmd utilityclass, add priv. constructors
Benjosh95 05d29e0
remove some pmd NPathComplexity
Benjosh95 52951fe
add exception for authentication related issues
Benjosh95 66a8b67
add exception for example/sdk related issues
Benjosh95 e9e2555
fix format
Benjosh95 f367752
add proper serialVersionUID
Benjosh95 6d6032d
update changelogs and version
Benjosh95 858a3fb
suppress example runtimeException, update changelogs
Benjosh95 c00c55d
fix fmt
Benjosh95 f7e72cb
fix duplicate warning and parameter typo
Benjosh95 469106a
undo fix of config typo
Benjosh95 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| <?xml version="1.0"?> | ||
| <ruleset name="Custom Ruleset" | ||
| xmlns="http://pmd.sourceforge.net/ruleset/2.0.0" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd"> | ||
|
|
||
| <description> | ||
| Custom ruleset that excludes generated code from PMD analysis. | ||
| </description> | ||
|
|
||
| <exclude-pattern>.*/cloud/stackit/sdk/.*/model/.*</exclude-pattern> | ||
| <exclude-pattern>.*/cloud/stackit/sdk/.*/api/.*</exclude-pattern> | ||
| <exclude-pattern>.*/cloud/stackit/sdk/.*/ApiCallback.java</exclude-pattern> | ||
| <exclude-pattern>.*/cloud/stackit/sdk/.*/ApiClient.java</exclude-pattern> | ||
| <exclude-pattern>.*/cloud/stackit/sdk/.*/ApiResponse.java</exclude-pattern> | ||
| <exclude-pattern>.*/cloud/stackit/sdk/.*/GzipRequestInterceptor.java</exclude-pattern> | ||
| <exclude-pattern>.*/cloud/stackit/sdk/.*/JSON.java</exclude-pattern> | ||
| <exclude-pattern>.*/cloud/stackit/sdk/.*/Pair.java</exclude-pattern> | ||
| <exclude-pattern>.*/cloud/stackit/sdk/.*/ProgressRequestBody.java</exclude-pattern> | ||
| <exclude-pattern>.*/cloud/stackit/sdk/.*/ProgressResponseBody.java</exclude-pattern> | ||
| <exclude-pattern>.*/cloud/stackit/sdk/.*/ServerConfiguration.java</exclude-pattern> | ||
| <exclude-pattern>.*/cloud/stackit/sdk/.*/ServerVariable.java</exclude-pattern> | ||
| <exclude-pattern>.*/cloud/stackit/sdk/.*/StringUtil.java</exclude-pattern> | ||
|
|
||
| <rule ref="category/java/bestpractices.xml"> | ||
| <exclude name="UnitTestContainsTooManyAsserts"/> | ||
| <exclude name="UnitTestAssertionsShouldIncludeMessage"/> | ||
| </rule> | ||
|
|
||
| <rule ref="category/java/codestyle.xml"> | ||
| <exclude name="LocalVariableCouldBeFinal"/> | ||
| <exclude name="MethodArgumentCouldBeFinal"/> | ||
| <exclude name="AtLeastOneConstructor"/> | ||
| <exclude name="LongVariable"/> | ||
| <exclude name="OnlyOneReturn"/> | ||
| </rule> | ||
|
|
||
| <!-- Excluded this rule to allow simple behaviour like parameter.method() | ||
| or chained getter calls (transversing dtos) --> | ||
| <rule ref="category/java/design.xml"> | ||
| <exclude name="LawOfDemeter"/> | ||
| </rule> | ||
|
|
||
| <rule ref="category/java/documentation.xml"> | ||
| <exclude name="CommentRequired"/> | ||
| </rule> | ||
|
|
||
| <rule ref="category/java/documentation.xml/CommentSize"> | ||
| <properties> | ||
| <property name="maxLineLength" value="100"/> | ||
| <property name="maxLines" value="40"/> | ||
| </properties> | ||
| </rule> | ||
|
|
||
| <rule ref="category/java/errorprone.xml"> | ||
| <exclude name="AvoidFieldNameMatchingMethodName"/> | ||
| </rule> | ||
|
|
||
| <rule ref="category/java/multithreading.xml"> | ||
| </rule> | ||
|
|
||
| <rule ref="category/java/performance.xml"> | ||
| </rule> | ||
|
|
||
| <rule ref="category/java/security.xml"> | ||
| </rule> | ||
|
|
||
| </ruleset> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.