--- a/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py Sun May 18 17:23:00 2025 +0200 +++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py Mon May 19 14:33:49 2025 +0200 @@ -499,6 +499,8 @@ "WeakKeySizeEcHigh": str(SecurityDefaults["weak_key_size_ec_high"]), "WeakKeySizeEcMedium": str(SecurityDefaults["weak_key_size_ec_medium"]), "CheckTypedException": SecurityDefaults["check_typed_exception"], + "ExtendMarkupNames": SecurityDefaults["extend_markup_names"], + "AllowedEscapeFunctions": SecurityDefaults["allowed_calls"], }, # Imports "ImportsChecker": { @@ -734,6 +736,12 @@ self.typedExceptionsCheckBox.setChecked( self.__data["SecurityChecker"]["CheckTypedException"] ) + self.additionalMarkupNamesEdit.setPlainText( + "\n".join(self.__data["SecurityChecker"]["ExtendMarkupNames"]) + ) + self.allowedEscapeFunctionsEdit.setPlainText( + "\n".join(self.__data["SecurityChecker"]["AllowedEscapeFunctions"]) + ) # ImportsChecker self.appPackagesEdit.setPlainText( @@ -978,6 +986,14 @@ "weak_key_size_ec_high": int(self.ecHighRiskCombo.currentText()), "weak_key_size_ec_medium": int(self.ecMediumRiskCombo.currentText()), "check_typed_exception": self.typedExceptionsCheckBox.isChecked(), + "extend_markup_names": [ + n.strip() + for n in self.additionalMarkupNamesEdit.toPlainText().splitlines() + ], + "allowed_calls": [ + f.strip() + for f in self.allowedEscapeFunctionsEdit.toPlainText().splitlines() + ] } importsArgs = { @@ -1461,6 +1477,14 @@ "WeakKeySizeEcHigh": self.ecHighRiskCombo.currentText(), "WeakKeySizeEcMedium": self.ecMediumRiskCombo.currentText(), "CheckTypedException": self.typedExceptionsCheckBox.isChecked(), + "ExtendMarkupNames": [ + n.strip() + for n in self.additionalMarkupNamesEdit.toPlainText().splitlines() + ], + "AllowedEscapeFunctions": [ + f.strip() + for f in self.allowedEscapeFunctionsEdit.toPlainText().splitlines() + ], }, "ImportsChecker": { "ApplicationPackageNames": sorted( @@ -2038,6 +2062,26 @@ ) ) ) + self.additionalMarkupNamesEdit.setPlainText( + "\n".join( + EricUtilities.toList( + settings.value( + "PEP8/ExtendMarkupNames", + defaultParameters["SecurityChecker"]["ExtendMarkupNames"] + ) + ) + ) + ) + self.allowedEscapeFunctionsEdit.setPlainText( + "\n".join( + EricUtilities.toList( + settings.value( + "PEP8/AllowedEscapeFunctions", + defaultParameters["SecurityChecker"]["AllowedEscapeFunctions"] + ) + ) + ) + ) # Imports Checker self.appPackagesEdit.setPlainText( @@ -2339,6 +2383,20 @@ settings.setValue( "PEP8/CheckTypedException", self.typedExceptionsCheckBox.isChecked() ) + settings.setValue( + "PEP8/ExtendMarkupNames", + [ + n.strip() + for n in self.additionalMarkupNamesEdit.toPlainText().splitlines() + ] + ) + settings.setValue( + "PEP8/AllowedEscapeFunctions", + [ + f.strip() + for f in self.allowedEscapeFunctionsEdit.toPlainText().splitlines() + ] + ) # Imports Checker settings.setValue( @@ -2563,6 +2621,14 @@ "PEP8/CheckTypedException", defaultParameters["SecurityChecker"]["CheckTypedException"], ) + settings.setValue( + "PEP8/ExtendMarkupNames", + defaultParameters["SecurityChecker"]["ExtendMarkupNames"], + ) + settings.setValue( + "PEP8/AllowedEscapeFunctions", + defaultParameters["SecurityChecker"]["AllowedEscapeFunctions"] + ) # Imports Checker settings.setValue(