diff --git a/Rubberduck.CodeAnalysis/Inspections/Concrete/UnreachableCaseInspection/UnreachableCaseInspection.cs b/Rubberduck.CodeAnalysis/Inspections/Concrete/UnreachableCaseInspection/UnreachableCaseInspection.cs index c1a9148072..af24e28a7d 100644 --- a/Rubberduck.CodeAnalysis/Inspections/Concrete/UnreachableCaseInspection/UnreachableCaseInspection.cs +++ b/Rubberduck.CodeAnalysis/Inspections/Concrete/UnreachableCaseInspection/UnreachableCaseInspection.cs @@ -17,7 +17,7 @@ namespace Rubberduck.Inspections.Concrete.UnreachableCaseInspection { /// - /// Flags 'Case' blocks that are semantically unreachable. + /// Flags 'Case' blocks that will never execute. /// /// /// Unreachable code is certainly unintended, and is probably either redundant, or a bug. @@ -25,7 +25,7 @@ namespace Rubberduck.Inspections.Concrete.UnreachableCaseInspection /// /// Not all unreachable 'Case' blocks may be flagged, depending on expression complexity. /// - /// + /// /// /// + /// + /// -100 + /// ' ... + /// 'all possible values are covered by preceding 'Case' statements + /// Case value * value ' unreachable + /// ' ... + /// Case value + value ' unreachable + /// ' ... + /// Case Else ' unreachable + /// ' ... + /// End Select + /// End Sub + /// ]]> + /// + /// + /// + /// + /// + /// + /// public sealed class UnreachableCaseInspection : ParseTreeInspectionBase { private readonly IUnreachableCaseInspectorFactory _unreachableCaseInspectorFactory; diff --git a/Rubberduck.Resources/Inspections/InspectionInfo.Designer.cs b/Rubberduck.Resources/Inspections/InspectionInfo.Designer.cs index 6babcb9ad7..77e5ecb9d4 100644 --- a/Rubberduck.Resources/Inspections/InspectionInfo.Designer.cs +++ b/Rubberduck.Resources/Inspections/InspectionInfo.Designer.cs @@ -844,7 +844,7 @@ public class InspectionInfo { } /// - /// Looks up a localized string similar to Detects Case Clauses that will never execute. . + /// Looks up a localized string similar to A 'Case' condition either always evaluates to False, causes a run-time error, or the cumulative effect of prior 'Case' statements represents all possible values or a superset of the 'Case' statement's values. As a result, the 'Case' block will never execute and is "dead code", or the 'Case' statement is a run-time error waiting to happen. Consider removing, reordering, or modifying the 'Case' statement.. /// public static string UnreachableCaseInspection { get { diff --git a/Rubberduck.Resources/Inspections/InspectionInfo.cs.resx b/Rubberduck.Resources/Inspections/InspectionInfo.cs.resx index 49ab738c92..4ffa766be9 100644 --- a/Rubberduck.Resources/Inspections/InspectionInfo.cs.resx +++ b/Rubberduck.Resources/Inspections/InspectionInfo.cs.resx @@ -229,9 +229,6 @@ Jestliže může být parametr prázdný, ignorujte výsledek této inspekce; p Manipulace s chybami by měla být obnovena po použití 'On Error Resume Next'. - - Detekuje klauzule případů, které se nikdy nevykonají. - Prázdné moduly a třídy buďto odkazují na dosud neimplementovanou funkcionalitu, nebo představují zbytečnou zátěž, která může poškodit udržovatelnost projektu. diff --git a/Rubberduck.Resources/Inspections/InspectionInfo.de.resx b/Rubberduck.Resources/Inspections/InspectionInfo.de.resx index abdaa912ff..dea329333f 100644 --- a/Rubberduck.Resources/Inspections/InspectionInfo.de.resx +++ b/Rubberduck.Resources/Inspections/InspectionInfo.de.resx @@ -304,9 +304,6 @@ Falls der Parameter 'null' sein kann, bitte dieses Auftreten ignorieren. 'null' Leere Module und Klassen weisen entweder auf noch nicht implementierte Funktionalitäten hin oder stellen unnötigen Ballast dar, der die Wartbarkeit eines Projekts behindern kann. - - Erkennt "Case"-Klauseln, die nie ausgeführt werden können. - Fehlerbehandlung sollte nach Verwendung von 'On Error Resume Next' wiederhergestellt werden. diff --git a/Rubberduck.Resources/Inspections/InspectionInfo.es.resx b/Rubberduck.Resources/Inspections/InspectionInfo.es.resx index a8c8f5687b..74fadd5d91 100644 --- a/Rubberduck.Resources/Inspections/InspectionInfo.es.resx +++ b/Rubberduck.Resources/Inspections/InspectionInfo.es.resx @@ -304,9 +304,6 @@ Si el parámetro puede ser nulo, ignore el resultado de esta inspección; pasar Los módulos y clases vacíos apuntan a una funcionalidad aún no implementada o representan un equipaje innecesario que puede perjudicar la mantenibilidad de un proyecto. - - Detecta cláusulas de casos que nunca se ejecutarán. - El manejo de errores se debe restaurar después de usar 'On Error Resume Next'. diff --git a/Rubberduck.Resources/Inspections/InspectionInfo.fr.resx b/Rubberduck.Resources/Inspections/InspectionInfo.fr.resx index f49193cdb3..b9f7c27e09 100644 --- a/Rubberduck.Resources/Inspections/InspectionInfo.fr.resx +++ b/Rubberduck.Resources/Inspections/InspectionInfo.fr.resx @@ -304,9 +304,6 @@ Si le paramètre peut être nul, ignorer ce résultat; passer une valeur nulle Les modules et classes vides démontrent des fonctionnalités pas encore implémentées ou représentent un fardeau non nécessaire pouvant nuire à la maintenance du projet. - - Détecte les clauses 'Case' qui ne peuvent être exécutées. - La gestion d'erreurs devrait être restaurée après l'utilisation de 'On Error Resume Next' diff --git a/Rubberduck.Resources/Inspections/InspectionInfo.resx b/Rubberduck.Resources/Inspections/InspectionInfo.resx index bdc551fb6e..0fc3db7d25 100644 --- a/Rubberduck.Resources/Inspections/InspectionInfo.resx +++ b/Rubberduck.Resources/Inspections/InspectionInfo.resx @@ -305,7 +305,7 @@ If the parameter can be null, ignore this inspection result; passing a null valu Empty modules and classes either point to not yet implemented functionality or represent unnecessary baggage that can hurt the maintainability of a project. - Detects Case Clauses that will never execute. + A 'Case' condition either always evaluates to False, causes a run-time error, or the cumulative effect of prior 'Case' statements represents all possible values or a superset of the 'Case' statement's values. As a result, the 'Case' block will never execute and is "dead code", or the 'Case' statement is a run-time error waiting to happen. Consider removing, reordering, or modifying the 'Case' statement. Error handling should be restored after using 'On Error Resume Next'. diff --git a/Rubberduck.Resources/Inspections/InspectionResults.Designer.cs b/Rubberduck.Resources/Inspections/InspectionResults.Designer.cs index 368beb8959..26edb94fa9 100644 --- a/Rubberduck.Resources/Inspections/InspectionResults.Designer.cs +++ b/Rubberduck.Resources/Inspections/InspectionResults.Designer.cs @@ -892,7 +892,7 @@ public class InspectionResults { } /// - /// Looks up a localized string similar to Unreachable Case Else: all matches exist within prior Case statement(s).. + /// Looks up a localized string similar to 'Case Else' statement is unreachable. /// public static string UnreachableCaseInspection_CaseElse { get { @@ -901,7 +901,7 @@ public class InspectionResults { } /// - /// Looks up a localized string similar to Unreachable: Case Statement contains invalid range clause(s).. + /// Looks up a localized string similar to 'Case' statement Range Clauses must be expressed '[x] To [y]' where [x] is less than or equal to [y]'. /// public static string UnreachableCaseInspection_InherentlyUnreachable { get { @@ -910,7 +910,7 @@ public class InspectionResults { } /// - /// Looks up a localized string similar to Unreachable: Case Statement will cause a Run-time error 6 (Overflow).. + /// Looks up a localized string similar to 'Case' statement will cause run-time error 6 (Overflow). /// public static string UnreachableCaseInspection_Overflow { get { @@ -919,7 +919,7 @@ public class InspectionResults { } /// - /// Looks up a localized string similar to Unreachable: Case Statement will cause a Run-time error 13 (Mismatch).. + /// Looks up a localized string similar to 'Case' statement will cause run-time error 13 (type mismatch).. /// public static string UnreachableCaseInspection_TypeMismatch { get { @@ -928,7 +928,7 @@ public class InspectionResults { } /// - /// Looks up a localized string similar to Unreachable: Never matches or is equivalent to a prior Case statement.. + /// Looks up a localized string similar to 'Case' statement is unreachable. /// public static string UnreachableCaseInspection_Unreachable { get { diff --git a/Rubberduck.Resources/Inspections/InspectionResults.cs.resx b/Rubberduck.Resources/Inspections/InspectionResults.cs.resx index 458919958c..1d668dbf23 100644 --- a/Rubberduck.Resources/Inspections/InspectionResults.cs.resx +++ b/Rubberduck.Resources/Inspections/InspectionResults.cs.resx @@ -303,18 +303,6 @@ Modul/třída {0} je prázdná. - - Není schopno dosáhnout na 'Case' klauzuli '{0}' - - - Nedosažitelný 'Case Else': Všechny potřebné hodnoty jsou vyřešeny předchozím 'Case' příkazem/příkazy - - - Neplatný Typ: 'Case' Příkaz nemůže být vyhodnocen jako typ příkazu 'Select' - - - Nedosažitelné: 'Case' příkaz je vyřešen předchozím 'Case' příkazem/příkazy - Errory jsou ignorovány, avšak už nikdy neřešeny @@ -336,12 +324,6 @@ '{0}' je deklarováno zastaralou 'CDecl' volací konvencí. - - Nedostupné: Case Statement obsahuje klauzuli(e) o neplatném rozsahu. - - - Nedostupné: Case Statement způsobí Run-time chybu č. 6 (Přetečení) - Anotace '{0}' je duplikována. diff --git a/Rubberduck.Resources/Inspections/InspectionResults.de.resx b/Rubberduck.Resources/Inspections/InspectionResults.de.resx index fa6e853605..569ee87986 100644 --- a/Rubberduck.Resources/Inspections/InspectionResults.de.resx +++ b/Rubberduck.Resources/Inspections/InspectionResults.de.resx @@ -305,18 +305,6 @@ Modul/Klasse {0} ist leer. - - Die Case-Klausel '{0}' kann nicht erreicht werden - - - Nicht erreichbares Case Else: Alle möglichen Werte sind durch vorangehende Klausel(n) abgedeckt. - - - Inakzeptabler Typ: Die Case-Anweisung kann nicht als derselbe Typ wie die Select-Anweisung ausgewertet werden. - - - Unerreichbar: Case-Klausel ist bereits von anderen Klausel(n) abgehandelt. - Fehler werden ignoriert aber nie wieder behandelt. @@ -338,12 +326,6 @@ '{0}' wurde mit der unter Windows nicht erlaubten 'CDecl'-Aufrufkonvention deklariert. - - Unerreichbar: Case-Klausel enthält unzulässige Bereichsdefinition(en). - - - Unerreichbar: Case-Klausel wird einen Laufzeitfehler 6 - 'Überlauf' erzeugen. - Annotation '{0}' wurde mehrfach spezifiziert. diff --git a/Rubberduck.Resources/Inspections/InspectionResults.es.resx b/Rubberduck.Resources/Inspections/InspectionResults.es.resx index 39e688e2f8..f1ec40ad2f 100644 --- a/Rubberduck.Resources/Inspections/InspectionResults.es.resx +++ b/Rubberduck.Resources/Inspections/InspectionResults.es.resx @@ -303,18 +303,6 @@ El módulo/clase '{0}' está vacío. - - No se puede llegar a la cláusula de caso '{0}'. - - - Caso inalcanzable: Todas las coincidencias existen en las declaraciones de casos anteriores. - - - Inaccesible: La declaración del caso causará el error 13 en tiempo de ejecución (No coincidencia). - - - Inaccesible: Nunca coincide o es equivalente a una declaración previa del Caso. - Los errores se ignoran pero nunca se manejan de nuevo. @@ -336,12 +324,6 @@ '{0}' se declara usando la convención de llamada obsoleta 'CDecl'. - - Inaccesible: La declaración del caso contiene cláusulas de rango no válidas. - - - Inaccesible: La declaración del caso causará el error 6 en tiempo de ejecución (desbordamiento). - La anotación '{0}' está duplicada. diff --git a/Rubberduck.Resources/Inspections/InspectionResults.fr.resx b/Rubberduck.Resources/Inspections/InspectionResults.fr.resx index d797a1bcd0..071211178e 100644 --- a/Rubberduck.Resources/Inspections/InspectionResults.fr.resx +++ b/Rubberduck.Resources/Inspections/InspectionResults.fr.resx @@ -306,18 +306,6 @@ Le module/classe {0} est vide. - - Le bloc '{0}' est inatteignable - - - Le bloc 'Case Else' est inatteignable : toutes les valeurs possibles sont prises en charge par les blocs 'Case' précédents. - - - Type invalide : l'expression 'Case' ne peut être évaluée selon le type de l'expression 'Select'. - - - Bloc inatteignable : l'expression 'Case' est prise en charge par un bloc 'Case' précédent. - La gestion d'erreurs est désactivée sans être réactivée. @@ -366,12 +354,6 @@ Le nom du membre public '{0}' contient un caractère de soulignement. - - Bloc inatteignable: l'expression 'Case' contient une clause invalide. - - - Bloc inatteignable: l'expression 'Case' causera une erreur d'exécution 6 : Overflow. - La valeur de l'attribut {0} ({1}) est désynchronisée avec l'annotation {2}. diff --git a/Rubberduck.Resources/Inspections/InspectionResults.resx b/Rubberduck.Resources/Inspections/InspectionResults.resx index 6a249a161f..767916d00a 100644 --- a/Rubberduck.Resources/Inspections/InspectionResults.resx +++ b/Rubberduck.Resources/Inspections/InspectionResults.resx @@ -321,13 +321,13 @@ Case clause '{0}' cannot be reached. - Unreachable Case Else: all matches exist within prior Case statement(s). + 'Case Else' statement is unreachable - Unreachable: Case Statement will cause a Run-time error 13 (Mismatch). + 'Case' statement will cause run-time error 13 (type mismatch). - Unreachable: Never matches or is equivalent to a prior Case statement. + 'Case' statement is unreachable Errors are ignored but never handled again. @@ -353,10 +353,10 @@ {0} Procedure name - Unreachable: Case Statement contains invalid range clause(s). + 'Case' statement Range Clauses must be expressed '[x] To [y]' where [x] is less than or equal to [y]' - Unreachable: Case Statement will cause a Run-time error 6 (Overflow). + 'Case' statement will cause run-time error 6 (Overflow) Annotation '{0}' is duplicated.