diff --git a/install/StyleCop.nuspec b/install/StyleCop.nuspec index ad4445b..f11bb9c 100644 --- a/install/StyleCop.nuspec +++ b/install/StyleCop.nuspec @@ -3,12 +3,13 @@ StyleCop.StyleCop StyleCop by JetBrains - 2016.3.0 + 2016.3.1 Matt Ellis, Andy Reeves JetBrains, Matt Ellis StyleCop analyzes C# source code to enforce a set of style and consistency rules. Maintained by JetBrains StyleCop analyzes C# source code to enforce a set of style and consistency rules. This plugin is compatible with StyleCop 4.7.54, and maintained by JetBrains. +• Fix crash if the file doesn't have a header (StyleCop/StyleCop#78) • Updated to ReSharper 2016.3 From 2016.2.1: diff --git a/src/StyleCop.ReSharper/Core/Utils.cs b/src/StyleCop.ReSharper/Core/Utils.cs index 58f2208..a707fec 100644 --- a/src/StyleCop.ReSharper/Core/Utils.cs +++ b/src/StyleCop.ReSharper/Core/Utils.cs @@ -662,7 +662,13 @@ public static ITreeNode GetElementAtCaret(ISolution solution, ITextControl textC /// public static string GetFileHeader(ICSharpFile file) { - return GetFileHeaderTreeRange(file).GetDocumentRange().GetText(); + var documentRange = GetFileHeaderTreeRange(file).GetDocumentRange(); + if (!documentRange.IsValid()) + { + return string.Empty; + } + + return documentRange.GetText(); } /// diff --git a/src/StyleCop.ReSharper/Properties/AssemblyInfo.cs b/src/StyleCop.ReSharper/Properties/AssemblyInfo.cs index 03fb923..10eefae 100644 --- a/src/StyleCop.ReSharper/Properties/AssemblyInfo.cs +++ b/src/StyleCop.ReSharper/Properties/AssemblyInfo.cs @@ -21,8 +21,8 @@ using System.Runtime.InteropServices; using JetBrains.ReSharper.Feature.Services.Daemon; -[assembly: AssemblyTitle("StyleCop R# 8.0.0 Plugin")] -[assembly: AssemblyDescription("R# plugin for StyleCop")] +[assembly: AssemblyTitle("StyleCop for ReSharper")] +[assembly: AssemblyDescription("StyleCop for ReSharper")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct(StyleCop.Constants.ProductName)]