Skip to content

Commit 32b62c9

Browse files
committed
[ISSUE 142] correction pb deploy
1 parent e249f92 commit 32b62c9

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

pom.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,11 @@
4040
<sonar.organization>green-code-initiative</sonar.organization>
4141
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
4242

43+
<!-- max version with SonarQube 10.0 -->
4344
<sonarqube.version>9.4.0.54424</sonarqube.version>
44-
<sonarpython.version>4.3.0.11660</sonarpython.version>
45+
46+
<!-- max version with SonarQube 10.0 : check lib/extension directory -->
47+
<sonarpython.version>4.1.0.11333</sonarpython.version>
4548

4649
<sonar-packaging.version>1.21.0.505</sonar-packaging.version>
4750
<sonar.skipDependenciesPackaging>true</sonar.skipDependenciesPackaging>

src/main/java/fr/greencodeinitiative/python/checks/AvoidMultipleIfElseStatementCheck.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,14 @@ private void computeConditionVariables(SubscriptionContext context, BinaryExpres
175175
// ) {
176176

177177
// continue analyze with variables if some key-words are found
178+
if (pBinExprTree.leftOperand().is(NAME)) {
178179
// if (pBinExprTree.leftOperand().is(Tree.Kind.VARIABLE_IDENTIFIER)) {
179-
if ("IDENTIFIER".equals(pBinExprTree.leftOperand().firstToken().type().getName())) {
180+
// if ("IDENTIFIER".equals(pBinExprTree.leftOperand().firstToken().type().getName())) {
180181
// computeVariables(context, (VariableIdentifierTree) pBinExprTree.leftOperand(), pLevel);
181182
computeVariables(context, pBinExprTree.leftOperand(), pLevel);
182183
}
183-
if ("IDENTIFIER".equals(pBinExprTree.rightOperand().firstToken().type().getName())) {
184+
if (pBinExprTree.rightOperand().is(NAME)) {
185+
// if ("IDENTIFIER".equals(pBinExprTree.rightOperand().firstToken().type().getName())) {
184186
// if (pBinExprTree.rightOperand().is(Tree.Kind.VARIABLE_IDENTIFIER)) {
185187
// computeVariables(context, (VariableIdentifierTree) pBinExprTree.rightOperand(), pLevel);
186188
computeVariables(context, pBinExprTree.rightOperand(), pLevel);

0 commit comments

Comments
 (0)