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

Hurricup/bugfixes #2892

Merged
merged 5 commits into from
Sep 1, 2024
Merged

Hurricup/bugfixes #2892

merged 5 commits into from
Sep 1, 2024

Conversation

hurricup
Copy link
Collaborator

@hurricup hurricup commented Sep 1, 2024

No description provided.

@hurricup hurricup enabled auto-merge (rebase) September 1, 2024 13:27
Copy link

github-actions bot commented Sep 1, 2024

Qodana for JVM

2760 new problems were found

Inspection name Severity Problems
Usage of API marked for removal 🔴 Failure 24
Missorted modifiers 🔶 Warning 613
Unused declaration 🔶 Warning 601
Deprecated API usage 🔶 Warning 257
Missing '@Override' annotation 🔶 Warning 252
Method can be made 'void' 🔶 Warning 78
Hardcoded strings 🔶 Warning 47
Method parameter always has the same value 🔶 Warning 46
Method always returns the same value 🔶 Warning 45
@NotNull/@Nullable problems 🔶 Warning 34
Can use bounded wildcard 🔶 Warning 28
'size() == 0' can be replaced with 'isEmpty()' 🔶 Warning 27
Class is exposed outside of its visibility scope 🔶 Warning 25
Static initialization in extension point implementations 🔶 Warning 25
Unnecessary semicolon 🔶 Warning 21
Declaration can have 'final' modifier 🔶 Warning 16
Non-platform TokenSet declared in ParserDefinition 🔶 Warning 16
'@RunWith' annotation already exists in a parent class 🔶 Warning 15
Redundant 'throws' clause 🔶 Warning 13
Field may be 'final' 🔶 Warning 9
C-style array declaration 🔶 Warning 7
'final' method in 'final' class 🔶 Warning 3
Missing required 'lang' attribute 🔶 Warning 3
Raw use of parameterized class 🔶 Warning 3
Incorrect string capitalization 🔶 Warning 2
A service can be converted to a light one 🔶 Warning 2
Explicit type can be replaced with '<>' 🔶 Warning 1
Lambda can be replaced with method reference 🔶 Warning 1
Copy of existing static method body 🔶 Warning 1
Plugin.xml dynamic plugin verification 🔶 Warning 1
'protected' member in 'final' class 🔶 Warning 1
Unnecessary conversion to 'String' 🔶 Warning 1
Unnecessary modifier 🔶 Warning 1
Duplicate branches in 'switch' ◽️ Notice 510
Link with unencrypted protocol ◽️ Notice 14
Non-distinguishable logging calls ◽️ Notice 8
Method can be extracted ◽️ Notice 5
Class can be record class ◽️ Notice 2
Immutable collection creation can be replaced with collection factory call ◽️ Notice 2

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Detected 11 dependencies

Third-party software list

This page lists the third-party software dependencies used in perl5

Dependency Version Licenses
ant-launcher 1.10.13 Apache-2.0
W3C-19980720
ant 1.10.13 Apache-2.0
W3C-19980720
com.jetbrains.performanceplugin 242.20224.300+165 Apache-2.0
com.jetbrains.performanceplugin 242.20224.300+811 Apache-2.0
docker 2024.2+385 Apache-2.0
jflex 1.9.2 BSD-3-Clause
jsr305 3.0.2 Apache-2.0
tanvd.grazi 242.20224.300+235 Apache-2.0
LGPL-2.0-or-later
LGPL-2.1-only
MIT
tanvd.grazi 242.20224.300+659 Apache-2.0
LGPL-2.0-or-later
LGPL-2.1-only
MIT
testng-j 242.20224.300+416 MIT
testng-j 242.20224.300+478 MIT
Contact Qodana team

Contact us at [email protected]

assertInstanceOf(projects.get(0), MojoApp.class);
LOG.info("Got: " + projects.get(0));
assertInstanceOf(projects.getFirst(), MojoApp.class);
LOG.info("Got: " + projects.getFirst());

Check notice

Code scanning / QDJVM

Non-distinguishable logging calls Note test

Similar log messages
assertInstanceOf(projects.get(0), MojoPlugin.class);
LOG.info("Got: " + projects.get(0));
assertInstanceOf(projects.getFirst(), MojoPlugin.class);
LOG.info("Got: " + projects.getFirst());

Check notice

Code scanning / QDJVM

Non-distinguishable logging calls Note test

Similar log messages
else {
return PerlDocUtil.getPerlFuncDocFromText(element, subName);
return switch (element) {
case null -> null;

Check notice

Code scanning / QDJVM

Duplicate branches in 'switch' Note documentation

Branch in 'switch' is a duplicate of the default branch
return completionProcessor.result();
return switch (element) {
case PerlImplicitSubDefinition implicitSubDefinition
when implicitSubDefinition.isAnonymous() -> completionProcessor.result();

Check notice

Code scanning / QDJVM

Duplicate branches in 'switch' Note

Branch in 'switch' is a duplicate of the default branch
@@ -144,7 +144,7 @@
}
else if (LIST_MODIFYING_EXPR.contains(parentExpressionType)) {
List<PsiElement> children = PerlArrayUtil.collectListElements(expression);
if (children.size() > 0 && PsiTreeUtil.isAncestor(children.get(0), originalElement, false)) {
if (children.size() > 0 && PsiTreeUtil.isAncestor(children.getFirst(), originalElement, false)) {

Check warning

Code scanning / QDJVM

'size() == 0' can be replaced with 'isEmpty()' Warning

children.size() > 0 can be replaced with '!children.isEmpty()'
@@ -31,7 +31,7 @@
*/
default @Nullable PsiElement getReferenceExpression() {
List<PsiElement> unpackedChildren = PerlArrayUtil.collectChildrenList(this);
return unpackedChildren.size() > 0 ? unpackedChildren.get(0) : null;
return unpackedChildren.size() > 0 ? unpackedChildren.getFirst() : null;

Check warning

Code scanning / QDJVM

'size() == 0' can be replaced with 'isEmpty()' Warning

unpackedChildren.size() > 0 can be replaced with '!unpackedChildren.isEmpty()'
}
return null;
return switch (element) {
case null -> null;

Check notice

Code scanning / QDJVM

Duplicate branches in 'switch' Note documentation

Branch in 'switch' is a duplicate of the default branch
}
return null;
return switch (element) {
case null -> null;

Check notice

Code scanning / QDJVM

Duplicate branches in 'switch' Note

Branch in 'switch' is a duplicate of the default branch
builder.append("\n").append("Its ").append(conditionalInstruction.getResult()).
append(" branch, condition: ").append(getTextSafe(conditionalInstruction.getCondition()));
switch (instruction) {
case PerlIteratorConditionInstruction ignored -> {

Check notice

Code scanning / QDJVM

Duplicate branches in 'switch' Note test

Branch in 'switch' is a duplicate of the default branch
@hurricup hurricup merged commit 693e151 into master Sep 1, 2024
37 checks passed
@hurricup hurricup deleted the hurricup/bugfixes branch September 1, 2024 15:20
Copy link

sonarqubecloud bot commented Sep 1, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 70%)
B Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant