Skip to content

Commit 0bed92f

Browse files
author
gcaillat
committed
fixing test and some empty rules
1 parent 3f1d9e8 commit 0bed92f

3 files changed

Lines changed: 12 additions & 7 deletions

File tree

sonar-python-plugin/src/main/resources/org/sonar/plugins/python/pylint/remediation-cost.csv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ E0704,10min
7575
E0710,15min
7676
E0711,5min
7777
E0712,20min
78+
E1001,10min
79+
E1002,10min
80+
E1003,10min
81+
E1004,10min
7882
E1101,10min
7983
E1102,3min
8084
E1111,20min
@@ -133,6 +137,7 @@ I0020,null
133137
I0021,null
134138
I0022,null
135139
I0101,null
140+
I1101,null
136141
R0123,20min
137142
R0201,20min
138143
R0202,15min

sonar-python-plugin/src/main/resources/org/sonar/plugins/python/pylint/rules.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@
317317
</rule>
318318
<rule>
319319
<key>E0001</key>
320-
<name><![CDATA[]]></name>
320+
<name><![CDATA[syntax error for a module]]></name>
321321
<configKey>E0001</configKey>
322322
<description>
323323
<![CDATA[Used when a syntax error is raised for a module.]]>
@@ -847,7 +847,7 @@
847847
</rule>
848848
<rule>
849849
<key>E1130</key>
850-
<name><![CDATA[]]></name>
850+
<name><![CDATA[Unary operand is used on an object which does not support this type of operation]]></name>
851851
<configKey>E1130</configKey>
852852
<description>
853853
<![CDATA[Emitted when a unary operand is used on an object which does not support thistype of operation]]>
@@ -856,7 +856,7 @@
856856
</rule>
857857
<rule>
858858
<key>E1131</key>
859-
<name><![CDATA[]]></name>
859+
<name><![CDATA[Unsupported binary arithmetic operation ]]></name>
860860
<configKey>E1131</configKey>
861861
<description>
862862
<![CDATA[Emitted when a binary arithmetic operation between two operands is notsupported.]]>
@@ -1135,7 +1135,7 @@
11351135
</rule>
11361136
<rule>
11371137
<key>F0001</key>
1138-
<name><![CDATA[]]></name>
1138+
<name><![CDATA[Error preventing the analysis of a module ]]></name>
11391139
<configKey>F0001</configKey>
11401140
<description>
11411141
<![CDATA[Used when an error occurred preventing the analysis of a module (unable tofind it for instance).]]>
@@ -1811,7 +1811,7 @@
18111811
</rule>
18121812
<rule>
18131813
<key>W0511</key>
1814-
<name><![CDATA[]]></name>
1814+
<name><![CDATA[warning note as FIXME or XXX]]></name>
18151815
<configKey>W0511</configKey>
18161816
<description>
18171817
<![CDATA[Used when a warning note as FIXME or XXX is detected.]]>

sonar-python-plugin/src/test/java/org/sonar/plugins/python/pylint/PylintRuleRepositoryTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ public void createRulesTest() {
4141

4242
List<RulesDefinition.Rule> rules = repository.rules();
4343
assertThat(rules).isNotNull();
44-
assertThat(rules).hasSize(180);
44+
assertThat(rules).hasSize(292);
4545

4646
long rulesWithoutRemediationCost = rules.stream()
4747
.filter(rule -> rule.debtRemediationFunction() == null)
4848
.count();
49-
assertThat(rulesWithoutRemediationCost).isEqualTo(24);
49+
assertThat(rulesWithoutRemediationCost).isEqualTo(23);
5050
}
5151

5252
}

0 commit comments

Comments
 (0)