From f3ba2e5bed9bd4d1a052f6e2342fdd4604d5e602 Mon Sep 17 00:00:00 2001 From: Wolfgang Janz Date: Thu, 8 Sep 2016 19:59:01 +0200 Subject: [PATCH 1/6] feature(): Add TooManyArguments inspection to vb.net --- CleanCode/src/CleanCode/CleanCode.csproj | 1 + .../TooManyArgumentsHighlighting.cs | 3 +- .../TooManyMethodArgumentsCheckVb.cs | 30 +++++++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 CleanCode/src/CleanCode/Features/TooManyMethodArguments/TooManyMethodArgumentsCheckVb.cs diff --git a/CleanCode/src/CleanCode/CleanCode.csproj b/CleanCode/src/CleanCode/CleanCode.csproj index 3e43a4d..af814a3 100644 --- a/CleanCode/src/CleanCode/CleanCode.csproj +++ b/CleanCode/src/CleanCode/CleanCode.csproj @@ -184,6 +184,7 @@ Code + Code diff --git a/CleanCode/src/CleanCode/Features/TooManyMethodArguments/TooManyArgumentsHighlighting.cs b/CleanCode/src/CleanCode/Features/TooManyMethodArguments/TooManyArgumentsHighlighting.cs index 2075a63..043a093 100644 --- a/CleanCode/src/CleanCode/Features/TooManyMethodArguments/TooManyArgumentsHighlighting.cs +++ b/CleanCode/src/CleanCode/Features/TooManyMethodArguments/TooManyArgumentsHighlighting.cs @@ -3,6 +3,7 @@ using JetBrains.DocumentModel; using JetBrains.ReSharper.Feature.Services.Daemon; using JetBrains.ReSharper.Psi.CSharp; +using JetBrains.ReSharper.Psi.VB; [assembly: RegisterConfigurableSeverity(TooManyArgumentsHighlighting.SeverityID, null, CleanCodeHighlightingGroupIds.CleanCode, "Too many arguments", "Too many arguments passed to a method.", @@ -10,7 +11,7 @@ namespace CleanCode.Features.TooManyMethodArguments { - [ConfigurableSeverityHighlighting(SeverityID, CSharpLanguage.Name)] + [ConfigurableSeverityHighlighting(SeverityID, CSharpLanguage.Name + "," + VBLanguage.Name)] public class TooManyArgumentsHighlighting : IHighlighting { internal const string SeverityID = "TooManyArguments"; diff --git a/CleanCode/src/CleanCode/Features/TooManyMethodArguments/TooManyMethodArgumentsCheckVb.cs b/CleanCode/src/CleanCode/Features/TooManyMethodArguments/TooManyMethodArgumentsCheckVb.cs new file mode 100644 index 0000000..63386ca --- /dev/null +++ b/CleanCode/src/CleanCode/Features/TooManyMethodArguments/TooManyMethodArgumentsCheckVb.cs @@ -0,0 +1,30 @@ +using CleanCode.Resources; +using CleanCode.Settings; +using JetBrains.Application.Settings; +using JetBrains.ReSharper.Daemon.Stages.Dispatcher; +using JetBrains.ReSharper.Feature.Services.Daemon; +using JetBrains.ReSharper.Psi.VB.Tree; +using JetBrains.ReSharper.Psi.Tree; + +namespace CleanCode.Features.TooManyMethodArguments +{ + [ElementProblemAnalyzer(typeof(IMethodDeclaration), HighlightingTypes = new [] + { + typeof(TooManyArgumentsHighlighting) + })] + public class TooManyMethodArgumentsCheckVb : ElementProblemAnalyzer + { + protected override void Run(IMethodDeclaration element, ElementProblemAnalyzerData data, IHighlightingConsumer consumer) + { + var maxParameters = data.SettingsStore.GetValue((CleanCodeSettings s) => s.MaximumMethodParameters); + var parameterDeclarations = element.ParameterDeclarations; + + if (parameterDeclarations.Count > maxParameters) + { + var highlighting = new TooManyArgumentsHighlighting(Warnings.TooManyMethodArguments, + element.GetNameDocumentRange()); + consumer.AddHighlighting(highlighting); + } + } + } +} \ No newline at end of file From d63cf8bba02e1cabae3b176eca448701ef480f2c Mon Sep 17 00:00:00 2001 From: Wolfgang Janz Date: Wed, 21 Sep 2016 15:40:33 +0200 Subject: [PATCH 2/6] feature(): Add HollowNames inspection to vb.net --- CleanCode/src/CleanCode/CleanCode.csproj | 1 + .../HollowNames/HollowNamesCheckVb.cs | 49 +++++++++++++++++++ .../HollowNames/HollowTypeNameHighlighting.cs | 3 +- 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 CleanCode/src/CleanCode/Features/HollowNames/HollowNamesCheckVb.cs diff --git a/CleanCode/src/CleanCode/CleanCode.csproj b/CleanCode/src/CleanCode/CleanCode.csproj index af814a3..c8b09cc 100644 --- a/CleanCode/src/CleanCode/CleanCode.csproj +++ b/CleanCode/src/CleanCode/CleanCode.csproj @@ -172,6 +172,7 @@ + diff --git a/CleanCode/src/CleanCode/Features/HollowNames/HollowNamesCheckVb.cs b/CleanCode/src/CleanCode/Features/HollowNames/HollowNamesCheckVb.cs new file mode 100644 index 0000000..64e3668 --- /dev/null +++ b/CleanCode/src/CleanCode/Features/HollowNames/HollowNamesCheckVb.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using CleanCode.Resources; +using CleanCode.Settings; +using JetBrains.Application.Settings; +using JetBrains.ReSharper.Daemon.Stages.Dispatcher; +using JetBrains.ReSharper.Feature.Services.Daemon; +using JetBrains.ReSharper.Psi.VB.Tree; +using JetBrains.ReSharper.Psi.Tree; + +namespace CleanCode.Features.HollowNames +{ + [ElementProblemAnalyzer(typeof(IClassDeclaration), + HighlightingTypes = new [] + { + typeof(HollowTypeNameHighlighting) + })] + public class HollowNamesCheckVb : ElementProblemAnalyzer + { + protected override void Run(IClassDeclaration element, ElementProblemAnalyzerData data, IHighlightingConsumer consumer) + { + var suffixes = GetSuffixes(data.SettingsStore); + + var match = GetFirstMatchOrDefault(element.DeclaredName, suffixes); + if (match != null) + AddHighlighting(match, consumer, element); + } + + private IEnumerable GetSuffixes(IContextBoundSettingsStore dataSettingsStore) + { + var suffixes = dataSettingsStore.GetValue((CleanCodeSettings s) => s.MeaninglessClassNameSuffixes); + return suffixes.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries); + } + + private static string GetFirstMatchOrDefault(string declaredName, IEnumerable suffixes) + { + return suffixes.FirstOrDefault(declaredName.EndsWith); + } + + private void AddHighlighting(string bannedSuffix, IHighlightingConsumer consumer, IClassDeclaration typeExpression) + { + var identifier = typeExpression.Name; + var documentRange = identifier.GetDocumentRange(); + var highlighting = new HollowTypeNameHighlighting(string.Format(Warnings.HollowTypeName, bannedSuffix), documentRange); + consumer.AddHighlighting(highlighting); + } + } +} \ No newline at end of file diff --git a/CleanCode/src/CleanCode/Features/HollowNames/HollowTypeNameHighlighting.cs b/CleanCode/src/CleanCode/Features/HollowNames/HollowTypeNameHighlighting.cs index adbc538..4741142 100644 --- a/CleanCode/src/CleanCode/Features/HollowNames/HollowTypeNameHighlighting.cs +++ b/CleanCode/src/CleanCode/Features/HollowNames/HollowTypeNameHighlighting.cs @@ -3,6 +3,7 @@ using JetBrains.DocumentModel; using JetBrains.ReSharper.Feature.Services.Daemon; using JetBrains.ReSharper.Psi.CSharp; +using JetBrains.ReSharper.Psi.VB; [assembly: RegisterConfigurableSeverity(HollowTypeNameHighlighting.SeverityID, null, CleanCodeHighlightingGroupIds.CleanCode, "Hollow type name", "This type has a name that doesn't express its intent.", @@ -10,7 +11,7 @@ namespace CleanCode.Features.HollowNames { - [ConfigurableSeverityHighlighting(SeverityID, CSharpLanguage.Name)] + [ConfigurableSeverityHighlighting(SeverityID, CSharpLanguage.Name + "," + VBLanguage.Name)] public class HollowTypeNameHighlighting : IHighlighting { internal const string SeverityID = "HollowTypeName"; From 34018136ba2cf6aa2b9ab81f279cb36e83f47ade Mon Sep 17 00:00:00 2001 From: Wolfgang Janz Date: Thu, 22 Sep 2016 13:52:25 +0200 Subject: [PATCH 3/6] feature(): Add ClassTooBig inspection to vb.net --- CleanCode/src/CleanCode/CleanCode.csproj | 1 + .../ClassTooBig/ClassTooBigCheckVb.cs | 31 +++++++++++++++++++ .../ClassTooBig/ClassTooBigHighlighting.cs | 5 +-- 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 CleanCode/src/CleanCode/Features/ClassTooBig/ClassTooBigCheckVb.cs diff --git a/CleanCode/src/CleanCode/CleanCode.csproj b/CleanCode/src/CleanCode/CleanCode.csproj index c8b09cc..502722e 100644 --- a/CleanCode/src/CleanCode/CleanCode.csproj +++ b/CleanCode/src/CleanCode/CleanCode.csproj @@ -164,6 +164,7 @@ + diff --git a/CleanCode/src/CleanCode/Features/ClassTooBig/ClassTooBigCheckVb.cs b/CleanCode/src/CleanCode/Features/ClassTooBig/ClassTooBigCheckVb.cs new file mode 100644 index 0000000..e27105e --- /dev/null +++ b/CleanCode/src/CleanCode/Features/ClassTooBig/ClassTooBigCheckVb.cs @@ -0,0 +1,31 @@ +using CleanCode.Resources; +using CleanCode.Settings; +using JetBrains.Application.Settings; +using JetBrains.ReSharper.Daemon.Stages.Dispatcher; +using JetBrains.ReSharper.Feature.Services.Daemon; +using JetBrains.ReSharper.Psi.VB.Tree; +using JetBrains.ReSharper.Psi.Tree; + +namespace CleanCode.Features.ClassTooBig +{ + [ElementProblemAnalyzer(typeof(IClassDeclaration), HighlightingTypes = new [] + { + typeof(ClassTooBigHighlighting) + })] + public class ClassTooBigCheckVb : ElementProblemAnalyzer + { + protected override void Run(IClassDeclaration element, ElementProblemAnalyzerData data, IHighlightingConsumer consumer) + { + var maxLength = data.SettingsStore.GetValue((CleanCodeSettings s) => s.MaximumMethodsInClass); + + var statementCount = element.CountChildren(); + if (statementCount > maxLength) + { + var declarationIdentifier = element.Name; + var documentRange = declarationIdentifier.GetDocumentRange(); + var highlighting = new ClassTooBigHighlighting(Warnings.ClassTooBig, documentRange); + consumer.AddHighlighting(highlighting); + } + } + } +} \ No newline at end of file diff --git a/CleanCode/src/CleanCode/Features/ClassTooBig/ClassTooBigHighlighting.cs b/CleanCode/src/CleanCode/Features/ClassTooBig/ClassTooBigHighlighting.cs index 5a06983..d11544e 100644 --- a/CleanCode/src/CleanCode/Features/ClassTooBig/ClassTooBigHighlighting.cs +++ b/CleanCode/src/CleanCode/Features/ClassTooBig/ClassTooBigHighlighting.cs @@ -3,14 +3,15 @@ using JetBrains.DocumentModel; using JetBrains.ReSharper.Feature.Services.Daemon; using JetBrains.ReSharper.Psi.CSharp; +using JetBrains.ReSharper.Psi.VB; [assembly: RegisterConfigurableSeverity(ClassTooBigHighlighting.SeverityID, null, CleanCodeHighlightingGroupIds.CleanCode, "Class too big", "This class contains too many methods", Severity.SUGGESTION, false)] namespace CleanCode.Features.ClassTooBig -{ - [ConfigurableSeverityHighlighting(SeverityID, CSharpLanguage.Name)] +{ + [ConfigurableSeverityHighlighting(SeverityID, CSharpLanguage.Name + "," + VBLanguage.Name)] public class ClassTooBigHighlighting : IHighlighting { internal const string SeverityID = "ClassTooBig"; From 02fbf7d231ac9137507985009693711db1bf44a9 Mon Sep 17 00:00:00 2001 From: Wolfgang Janz Date: Mon, 26 Sep 2016 21:47:23 +0200 Subject: [PATCH 4/6] feature(): Add TooManyDependencies inspection to vb.net --- CleanCode/src/CleanCode/CleanCode.csproj | 1 + .../TooManyDependenciesCheckVb.cs | 34 +++++++++++++++++++ .../TooManyDependenciesHighlighting.cs | 3 +- 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 CleanCode/src/CleanCode/Features/TooManyDependencies/TooManyDependenciesCheckVb.cs diff --git a/CleanCode/src/CleanCode/CleanCode.csproj b/CleanCode/src/CleanCode/CleanCode.csproj index 502722e..2f38164 100644 --- a/CleanCode/src/CleanCode/CleanCode.csproj +++ b/CleanCode/src/CleanCode/CleanCode.csproj @@ -182,6 +182,7 @@ Code + Code diff --git a/CleanCode/src/CleanCode/Features/TooManyDependencies/TooManyDependenciesCheckVb.cs b/CleanCode/src/CleanCode/Features/TooManyDependencies/TooManyDependenciesCheckVb.cs new file mode 100644 index 0000000..6608fa8 --- /dev/null +++ b/CleanCode/src/CleanCode/Features/TooManyDependencies/TooManyDependenciesCheckVb.cs @@ -0,0 +1,34 @@ +using System.Linq; +using CleanCode.Settings; +using JetBrains.Application.Settings; +using JetBrains.ReSharper.Daemon.Stages.Dispatcher; +using JetBrains.ReSharper.Feature.Services.Daemon; +using JetBrains.ReSharper.Psi.VB.Tree; +using JetBrains.ReSharper.Psi.Tree; +using JetBrains.ReSharper.Psi.Util; + +namespace CleanCode.Features.TooManyDependencies +{ + [ElementProblemAnalyzer(typeof(IConstructorDeclaration), HighlightingTypes = new [] + { + typeof(TooManyDependenciesHighlighting) + })] + public class TooManyDependenciesCheckVb : ElementProblemAnalyzer + { + protected override void Run(IConstructorDeclaration element, ElementProblemAnalyzerData data, IHighlightingConsumer consumer) + { + var maxDependencies = data.SettingsStore.GetValue((CleanCodeSettings s) => s.MaximumConstructorDependencies); + + var dependencies = element.ParameterDeclarations.Select( + declaration => declaration.DeclaredElement != null && + declaration.DeclaredElement.Type.IsInterfaceType()); + + var dependenciesCount = dependencies.Count(); + if (dependenciesCount > maxDependencies) + { + var highlighting = new TooManyDependenciesHighlighting(element.GetNameDocumentRange()); + consumer.AddHighlighting(highlighting); + } + } + } +} \ No newline at end of file diff --git a/CleanCode/src/CleanCode/Features/TooManyDependencies/TooManyDependenciesHighlighting.cs b/CleanCode/src/CleanCode/Features/TooManyDependencies/TooManyDependenciesHighlighting.cs index 4b4492d..96931fd 100644 --- a/CleanCode/src/CleanCode/Features/TooManyDependencies/TooManyDependenciesHighlighting.cs +++ b/CleanCode/src/CleanCode/Features/TooManyDependencies/TooManyDependenciesHighlighting.cs @@ -4,6 +4,7 @@ using JetBrains.DocumentModel; using JetBrains.ReSharper.Feature.Services.Daemon; using JetBrains.ReSharper.Psi.CSharp; +using JetBrains.ReSharper.Psi.VB; [assembly: RegisterConfigurableSeverity(TooManyDependenciesHighlighting.SeverityID, null, CleanCodeHighlightingGroupIds.CleanCode, "Too many dependencies", "Too many dependencies passed into constructor.", @@ -11,7 +12,7 @@ namespace CleanCode.Features.TooManyDependencies { - [ConfigurableSeverityHighlighting(SeverityID, CSharpLanguage.Name)] + [ConfigurableSeverityHighlighting(SeverityID, CSharpLanguage.Name + "," + VBLanguage.Name)] public class TooManyDependenciesHighlighting : IHighlighting { internal const string SeverityID = "TooManyDependencies"; From 4484a1e60ba256ece78e34a5217f9869840ec042 Mon Sep 17 00:00:00 2001 From: Wolfgang Janz Date: Mon, 26 Sep 2016 21:49:04 +0200 Subject: [PATCH 5/6] feature(): Add MethodTooLong inspection to vb.net --- CleanCode/src/CleanCode/CleanCode.csproj | 1 + .../MethodTooLong/MethodTooLongCheckVb.cs | 36 +++++++++++++++++++ .../MethodTooLongHighlighting.cs | 3 +- 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 CleanCode/src/CleanCode/Features/MethodTooLong/MethodTooLongCheckVb.cs diff --git a/CleanCode/src/CleanCode/CleanCode.csproj b/CleanCode/src/CleanCode/CleanCode.csproj index 2f38164..4402e25 100644 --- a/CleanCode/src/CleanCode/CleanCode.csproj +++ b/CleanCode/src/CleanCode/CleanCode.csproj @@ -178,6 +178,7 @@ + Code diff --git a/CleanCode/src/CleanCode/Features/MethodTooLong/MethodTooLongCheckVb.cs b/CleanCode/src/CleanCode/Features/MethodTooLong/MethodTooLongCheckVb.cs new file mode 100644 index 0000000..a5a6346 --- /dev/null +++ b/CleanCode/src/CleanCode/Features/MethodTooLong/MethodTooLongCheckVb.cs @@ -0,0 +1,36 @@ +using CleanCode.Settings; +using JetBrains.Application.Settings; +using JetBrains.ReSharper.Daemon.Stages.Dispatcher; +using JetBrains.ReSharper.Feature.Services.Daemon; +using JetBrains.ReSharper.Psi.VB.Tree; +using JetBrains.ReSharper.Psi.Tree; + +namespace CleanCode.Features.MethodTooLong +{ + [ElementProblemAnalyzer(typeof(IMethodDeclaration), HighlightingTypes = new [] + { + typeof(MethodTooLongHighlighting) + })] + public class MethodTooLongCheckVb : ElementProblemAnalyzer + { + protected override void Run(IMethodDeclaration element, ElementProblemAnalyzerData data, IHighlightingConsumer consumer) + { + var maxStatements = data.SettingsStore.GetValue((CleanCodeSettings s) => s.MaximumMethodStatements); + var maxDeclarations = data.SettingsStore.GetValue((CleanCodeSettings s) => s.MaximumDeclarationsInMethod); + + var statementCount = element.CountChildren(); + if (statementCount <= maxStatements) + { + // Only look in the method body for declarations, otherwise we see + // parameters + type parameters. We can ignore arrow expressions, as + // they must be a single expression and won't have declarations + var declarationCount = element.Block?.CountChildren() ?? 0; + if (declarationCount <= maxDeclarations) + return; + } + + var highlighting = new MethodTooLongHighlighting(element.GetNameDocumentRange()); + consumer.AddHighlighting(highlighting); + } + } +} \ No newline at end of file diff --git a/CleanCode/src/CleanCode/Features/MethodTooLong/MethodTooLongHighlighting.cs b/CleanCode/src/CleanCode/Features/MethodTooLong/MethodTooLongHighlighting.cs index 3d1e0c6..3c27658 100644 --- a/CleanCode/src/CleanCode/Features/MethodTooLong/MethodTooLongHighlighting.cs +++ b/CleanCode/src/CleanCode/Features/MethodTooLong/MethodTooLongHighlighting.cs @@ -4,6 +4,7 @@ using JetBrains.DocumentModel; using JetBrains.ReSharper.Feature.Services.Daemon; using JetBrains.ReSharper.Psi.CSharp; +using JetBrains.ReSharper.Psi.VB; [assembly: RegisterConfigurableSeverity(MethodTooLongHighlighting.SeverityID, null, CleanCodeHighlightingGroupIds.CleanCode, "Method too long", "The method is bigger than it should be.", @@ -11,7 +12,7 @@ namespace CleanCode.Features.MethodTooLong { - [ConfigurableSeverityHighlighting(SeverityID, CSharpLanguage.Name)] + [ConfigurableSeverityHighlighting(SeverityID, CSharpLanguage.Name + "," + VBLanguage.Name)] public class MethodTooLongHighlighting : IHighlighting { internal const string SeverityID = "MethodTooLong"; From ca8b310f355abb244fd9afe0651e6f87ff8376e1 Mon Sep 17 00:00:00 2001 From: Wolfgang Janz Date: Thu, 29 Sep 2016 20:10:11 +0200 Subject: [PATCH 6/6] feature(): Add MethodNameNotMeaningful inspection to vb.net --- CleanCode/src/CleanCode/CleanCode.csproj | 1 + .../MethodNameNotMeaningfulCheckVb.cs | 33 +++++++++++++++++++ .../MethodNameNotMeaningfulHighlighting.cs | 3 +- 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 CleanCode/src/CleanCode/Features/MethodNameNotMeaningful/MethodNameNotMeaningfulCheckVb.cs diff --git a/CleanCode/src/CleanCode/CleanCode.csproj b/CleanCode/src/CleanCode/CleanCode.csproj index 4402e25..1d59634 100644 --- a/CleanCode/src/CleanCode/CleanCode.csproj +++ b/CleanCode/src/CleanCode/CleanCode.csproj @@ -176,6 +176,7 @@ + diff --git a/CleanCode/src/CleanCode/Features/MethodNameNotMeaningful/MethodNameNotMeaningfulCheckVb.cs b/CleanCode/src/CleanCode/Features/MethodNameNotMeaningful/MethodNameNotMeaningfulCheckVb.cs new file mode 100644 index 0000000..a9fbbde --- /dev/null +++ b/CleanCode/src/CleanCode/Features/MethodNameNotMeaningful/MethodNameNotMeaningfulCheckVb.cs @@ -0,0 +1,33 @@ +using CleanCode.Settings; +using JetBrains.Application.Settings; +using JetBrains.ReSharper.Daemon.Stages.Dispatcher; +using JetBrains.ReSharper.Feature.Services.Daemon; +using JetBrains.ReSharper.Psi.VB.Tree; +using JetBrains.ReSharper.Psi.Tree; + +namespace CleanCode.Features.MethodNameNotMeaningful +{ + [ElementProblemAnalyzer(typeof(IMethodDeclaration), HighlightingTypes = new [] + { + typeof(MethodNameNotMeaningfulHighlighting) + })] + public class MethodNameNotMeaningfulCheckVb : ElementProblemAnalyzer + { + protected override void Run(IMethodDeclaration element, ElementProblemAnalyzerData data, IHighlightingConsumer consumer) + { + if (element.Name == null) + return; + + var minimumMethodNameLength = data.SettingsStore.GetValue((CleanCodeSettings s) => s.MinimumMeaningfulMethodNameLength); + + var name = element.Name.GetText(); + var methodNameLength = name.Length; + if (methodNameLength < minimumMethodNameLength) + { + var documentRange = element.GetNameDocumentRange(); + var highlighting = new MethodNameNotMeaningfulHighlighting(documentRange); + consumer.AddHighlighting(highlighting); + } + } + } +} \ No newline at end of file diff --git a/CleanCode/src/CleanCode/Features/MethodNameNotMeaningful/MethodNameNotMeaningfulHighlighting.cs b/CleanCode/src/CleanCode/Features/MethodNameNotMeaningful/MethodNameNotMeaningfulHighlighting.cs index 5eb9160..7db196a 100644 --- a/CleanCode/src/CleanCode/Features/MethodNameNotMeaningful/MethodNameNotMeaningfulHighlighting.cs +++ b/CleanCode/src/CleanCode/Features/MethodNameNotMeaningful/MethodNameNotMeaningfulHighlighting.cs @@ -4,6 +4,7 @@ using JetBrains.DocumentModel; using JetBrains.ReSharper.Feature.Services.Daemon; using JetBrains.ReSharper.Psi.CSharp; +using JetBrains.ReSharper.Psi.VB; [assembly: RegisterConfigurableSeverity(MethodNameNotMeaningfulHighlighting.SeverityID, null, CleanCodeHighlightingGroupIds.CleanCode, "Method name not meaningful", @@ -12,7 +13,7 @@ namespace CleanCode.Features.MethodNameNotMeaningful { - [ConfigurableSeverityHighlighting(SeverityID, CSharpLanguage.Name)] + [ConfigurableSeverityHighlighting(SeverityID, CSharpLanguage.Name + "," + VBLanguage.Name)] public class MethodNameNotMeaningfulHighlighting : IHighlighting { internal const string SeverityID = "MethodNameNotMeaningful";