-
Notifications
You must be signed in to change notification settings - Fork 209
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
KOGITO-7977 Sonarcloud - (Java) Lambdas should be replaced with method references (61) #2501
Conversation
(tests) - kogito-examples job Please look here: https://eng-jenkins-csb-business-automation.apps.ocp-c1.prod.psi.redhat.com/job/KIE/job/kogito/job/main/job/pullrequest/job/kogito-runtimes.tests.downstream.kogito-examples/1130/display/redirect Console Logs[2022-09-26T07:42:04.335Z] 8.3M /home/jenkins/.cache[2022-09-26T07:42:04.335Z] du: cannot access ‘/home/jenkins/workspace/KIE/optaplanner/main/pullrequest/optaplanner.tests.downstream.optaweb-vehicle-routing_ws-cleanup_1664178120425/bc/kiegroup_optaweb_vehicle_routing/optaweb-vehicle-routing/optaweb-vehicle-routing-frontend/node_modules/eslint-config-airbnb-base/node_modules/es-abstract/2017/DeletePropertyOrThrow.js’: No such file or directory [2022-09-26T07:42:04.335Z] du: cannot access ‘/home/jenkins/workspace/KIE/optaplanner/main/pullrequest/optaplanner.tests.downstream.optaweb-vehicle-routing_ws-cleanup_1664178120425/bc/kiegroup_optaweb_vehicle_routing/optaweb-vehicle-routing/optaweb-vehicle-routing-frontend/node_modules/eslint-config-airbnb-base/node_modules/es-abstract/2017/EnumerableOwnProperties.js’: No such file or directory [2022-09-26T07:42:04.335Z] du: cannot access ‘/home/jenkins/workspace/KIE/optaplanner/main/pullrequest/optaplanner.tests.downstream.optaweb-vehicle-routing_ws-cleanup_1664178120425/bc/kiegroup_optaweb_vehicle_routing/optaweb-vehicle-routing/optaweb-vehicle-routing-frontend/node_modules/eslint-config-airbnb-base/node_modules/es-abstract/2017/FromPropertyDescriptor.js’: No such file or directory [2022-09-26T07:42:04.335Z] du: cannot access ‘/home/jenkins/workspace/KIE/optaplanner/main/pullrequest/optaplanner.tests.downstream.optaweb-vehicle-routing_ws-cleanup_1664178120425/bc/kiegroup_optaweb_vehicle_routing/optaweb-vehicle-routing/optaweb-vehicle-routing-frontend/node_modules/eslint-config-airbnb-base/node_modules/es-abstract/2017/Get.js’: No such file or directory [2022-09-26T07:42:04.335Z] du: cannot access ‘/home/jenkins/workspace/KIE/optaplanner/main/pullrequest/optaplanner.tests.downstream.optaweb-vehicle-routing_ws-cleanup_1664178120425/bc/kiegroup_optaweb_vehicle_routing/optaweb-vehicle-routing/optaweb-vehicle-routing-frontend/node_modules/eslint-config-airbnb-base/node_modules/es-abstract/2017/GetIterator.js’: No such file or directory [2022-09-26T07:42:04.335Z] 327M /home/jenkins/workspace [2022-09-26T07:42:04.335Z] 0 /home/jenkins/.pki [2022-09-26T07:42:04.335Z] 139M /home/jenkins/tools [2022-09-26T07:42:04.335Z] 0 /home/jenkins/caches [2022-09-26T07:42:04.335Z] 138M /home/jenkins/.npm [2022-09-26T07:42:04.335Z] 8.0K /home/jenkins/.java [2022-09-26T07:42:04.335Z] 0 /home/jenkins/.mozilla [2022-09-26T07:42:04.335Z] 2.9G /home/jenkins [Pipeline] } [Pipeline] // dir [Pipeline] } [Pipeline] // script [Pipeline] } [Pipeline] // withEnv [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Install build-chain tool) Stage "Install build-chain tool" skipped due to earlier failure(s) [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Build projects) Stage "Build projects" skipped due to earlier failure(s) [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Sonar analysis) Stage "Sonar analysis" skipped due to earlier failure(s) [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (check space after build) Stage "check space after build" skipped due to earlier failure(s) [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Declarative: Post Actions) [Pipeline] script [Pipeline] { [Pipeline] sh [2022-09-26T07:42:05.247Z] + wget --no-check-certificate -qO - https://eng-jenkins-csb-business-automation.apps.ocp-c1.prod.psi.redhat.com/job/KIE/job/kogito/job/main/job/pullrequest/job/kogito-runtimes.tests.downstream.kogito-examples/1130/api/json [Pipeline] readJSON [Pipeline] sh |
SonarCloud Quality Gate failed. |
Hi @kbowers-ibm, @elguardian, is this still relevant please? If yes, could you please rebase with the latest changes from main? |
# Conflicts: # jbpm/jbpm-flow/src/main/java/org/jbpm/process/instance/LightProcessRuntime.java # jbpm/jbpm-flow/src/main/java/org/jbpm/process/instance/ProcessRuntimeImpl.java # jbpm/jbpm-flow/src/main/java/org/jbpm/process/instance/event/KogitoProcessEventSupportImpl.java # jbpm/jbpm-flow/src/main/java/org/jbpm/ruleflow/core/validation/RuleFlowProcessValidator.java # jbpm/jbpm-flow/src/main/java/org/jbpm/workflow/instance/node/RuleSetNodeInstance.java # kogito-codegen-modules/kogito-codegen-processes/src/main/java/org/kie/kogito/codegen/process/MessageConsumerGenerator.java
https://issues.redhat.com/browse/KOGITO-7977
Goal here is to reduce the number of code smells in Kogito-runtimes.
Addressed in this PR is the code smell, "(Java) Lambdas should be replaced with method references (61)"
https://sonarcloud.io/project/issues?resolved=false&rules=java%3AS1612&types=CODE_SMELL&id=org.kie.kogito%3Akogito-runtimes
I have remedied this by replacing the suggested lambdas with method/constructor references as per Sonarcloud's recommendation.
How to replicate CI configuration locally?
Build Chain tool does "simple" maven build(s), the builds are just Maven commands, but because the repositories relates and depends on each other and any change in API or class method could affect several of those repositories there is a need to use build-chain tool to handle cross repository builds and be sure that we always use latest version of the code for each repository.
build-chain tool is a build tool which can be used on command line locally or in Github Actions workflow(s), in case you need to change multiple repositories and send multiple dependent pull requests related with a change you can easily reproduce the same build by executing it on Github hosted environment or locally in your development environment. See local execution details to get more information about it.
How to retest this PR or trigger a specific build:
Jenkins retest this