Skip to content

Commit

Permalink
feat(#231): fix sonar projectKey
Browse files Browse the repository at this point in the history
Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>
  • Loading branch information
samirromdhani committed Feb 15, 2023
1 parent 0d2de56 commit 7f02ea2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/sonarcloud-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
id: sonar_env
run: |
echo "##[set-output name=sonar_opts;]$(echo -Dsonar.host.url=https://sonarcloud.io \
-Dsonar.projectKey=com-pas_compas-core \
-Dsonar.projectKey=com-pas_compas-sct \
-Dsonar.organization=com-pas )"
- name: Create custom Maven Settings.xml
uses: whelk-io/maven-settings-xml-action@v21
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
import org.lfenergy.compas.sct.commons.dto.ExtrefTarget;
import org.lfenergy.compas.sct.commons.util.Utils;

import java.util.Objects;


/**
* A representation of the model object
* <em><b>{@link ObjectReference ObjectReference}</b></em>.
Expand Down Expand Up @@ -73,13 +70,12 @@ public ObjectReference(TExtRef extRef, ExtrefTarget target) {
}

public final void init(){
String refCopy = reference;
String[] objRefPart = reference.split("[/]");
String[] objRefPart = reference.split("/");
if(objRefPart.length != 2 || StringUtils.isBlank(objRefPart[0]) || StringUtils.isBlank(objRefPart[1])){
throw new IllegalArgumentException(String.format(MALFORMED_OBJ_REF, reference));
}
ldName = objRefPart[0];
refCopy = objRefPart[1];
String refCopy = objRefPart[1];
objRefPart = refCopy.split("[.]", 2);
if(objRefPart.length != 2 || StringUtils.isBlank(objRefPart[0]) || StringUtils.isBlank(objRefPart[1])){
throw new IllegalArgumentException(String.format(MALFORMED_OBJ_REF, reference));
Expand Down

0 comments on commit 7f02ea2

Please sign in to comment.