Some little fixes to the code style checker.

Sat, 05 Sep 2015 17:56:10 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 05 Sep 2015 17:56:10 +0200
changeset 4437
b9cc331a4576
parent 4436
52ec6b6b3432
child 4443
f7f61a66dc38
child 4444
4867c8189b62

Some little fixes to the code style checker.

Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py file | annotate | diff | comparison | revisions
Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.ui file | annotate | diff | comparison | revisions
eric6.e4p file | annotate | diff | comparison | revisions
--- a/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py	Sat Sep 05 15:25:59 2015 +0200
+++ b/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py	Sat Sep 05 17:56:10 2015 +0200
@@ -100,6 +100,7 @@
         self.__data = {}
         self.__statistics = {}
         self.__onlyFixes = {}
+        self.__noFixCodesList = []
         
         self.on_loadDefaultButton_clicked()
     
@@ -150,7 +151,8 @@
             itm.setIcon(1, UI.PixmapCache.getIcon("syntaxError.png"))
         if fixed:
             itm.setIcon(0, UI.PixmapCache.getIcon("issueFixed.png"))
-        elif code in FixableCodeStyleIssues and not autofixing:
+        elif code in FixableCodeStyleIssues and not autofixing and \
+                code not in self.__noFixCodesList:
             itm.setIcon(0, UI.PixmapCache.getIcon("issueFixable.png"))
             fixable = True
         
@@ -356,6 +358,8 @@
             repeatMessages = self.repeatCheckBox.isChecked()
             fixCodes = self.fixIssuesEdit.text()
             noFixCodes = self.noFixIssuesEdit.text()
+            self.__noFixCodesList = \
+                [c.strip() for c in noFixCodes.split(",") if c.strip()]
             fixIssues = self.fixIssuesCheckBox.isChecked() and repeatMessages
             self.showIgnored = self.ignoredCheckBox.isChecked() and \
                 repeatMessages
--- a/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.ui	Sat Sep 05 15:25:59 2015 +0200
+++ b/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.ui	Sat Sep 05 17:56:10 2015 +0200
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>650</width>
-    <height>700</height>
+    <width>700</width>
+    <height>750</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -210,7 +210,7 @@
         </property>
        </widget>
       </item>
-      <item row="5" column="1">
+      <item row="5" column="1" colspan="2">
        <layout class="QHBoxLayout" name="horizontalLayout_3">
         <item>
          <widget class="QSpinBox" name="lineLengthSpinBox">
@@ -253,7 +253,7 @@
         </property>
        </widget>
       </item>
-      <item row="6" column="1">
+      <item row="6" column="1" colspan="2">
        <layout class="QHBoxLayout" name="horizontalLayout_4">
         <item>
          <widget class="QComboBox" name="docTypeComboBox">
@@ -277,32 +277,15 @@
         </item>
        </layout>
       </item>
-      <item row="7" column="0" colspan="2">
-       <layout class="QHBoxLayout" name="horizontalLayout_2">
-        <item>
-         <widget class="QCheckBox" name="hangClosingCheckBox">
-          <property name="toolTip">
-           <string>Select to allow hanging closing brackets</string>
-          </property>
-          <property name="text">
-           <string>Allow hanging closing brackets</string>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <spacer name="horizontalSpacer_2">
-          <property name="orientation">
-           <enum>Qt::Horizontal</enum>
-          </property>
-          <property name="sizeHint" stdset="0">
-           <size>
-            <width>40</width>
-            <height>20</height>
-           </size>
-          </property>
-         </spacer>
-        </item>
-       </layout>
+      <item row="7" column="0" colspan="3">
+       <widget class="QCheckBox" name="hangClosingCheckBox">
+        <property name="toolTip">
+         <string>Select to allow hanging closing brackets</string>
+        </property>
+        <property name="text">
+         <string>Allow hanging closing brackets</string>
+        </property>
+       </widget>
       </item>
       <item row="8" column="0">
        <widget class="QLabel" name="label_8">
@@ -311,7 +294,7 @@
         </property>
        </widget>
       </item>
-      <item row="8" column="1">
+      <item row="8" column="1" colspan="2">
        <layout class="QHBoxLayout" name="horizontalLayout_5">
         <item>
          <widget class="QSpinBox" name="complexitySpinBox">
--- a/eric6.e4p	Sat Sep 05 15:25:59 2015 +0200
+++ b/eric6.e4p	Sat Sep 05 17:56:10 2015 +0200
@@ -2199,7 +2199,7 @@
               <string>ShowIgnored</string>
             </key>
             <value>
-              <bool>True</bool>
+              <bool>False</bool>
             </value>
           </dict>
         </value>

eric ide

mercurial