Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable classification inside xml doc comment #45

Merged
merged 9 commits into from
Oct 17, 2018
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
using CI = CSharpIdentifiers;

/// <summary>
/// <see cref="CI.AnalyzeOptions"/>
/// </summary>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace CSharpIdentifiers.AnalyzeOptions
{
internal class LocalVariable
{
public void Method()
{
var value = 5;
}
}
}
10 changes: 10 additions & 0 deletions Tests/Identifiers/CSharpIdentifiers/AnalyzeOptions/Member.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace CSharpIdentifiers.AnalyzeOptions
{
internal class Member
{
/// <summary>
/// <see cref="Prop"/>
/// </summary>
public string Prop { get; }
}
}
10 changes: 10 additions & 0 deletions Tests/Identifiers/CSharpIdentifiers/AnalyzeOptions/Method.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace CSharpIdentifiers.AnalyzeOptions
{
internal class Method
{
/// <summary>
/// <see cref="Function"/>
/// </summary>
public void Function() { }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/// <summary>
/// <see cref="CSharpIdentifiers.AnalyzeOptions"/>
/// </summary>
namespace CSharpIdentifiers.AnalyzeOptions
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace CSharpIdentifiers.AnalyzeOptions
{
internal class Parameter
{
/// <param name="parameter"></param>
public void Method(string parameter) { }
}
}
16 changes: 16 additions & 0 deletions Tests/Identifiers/CSharpIdentifiers/CSharpIdentifiers.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@
<Compile Include="Access\Methods\Method.cs" />
<Compile Include="Access\Methods\StaticMethod.cs" />
<Compile Include="Access\Namespaces\CustomNamespaces.cs" />
<Compile Include="AnalyzeOptions\AliasNamespace.cs" />
<Compile Include="AnalyzeOptions\LocalVariable.cs" />
<Compile Include="AnalyzeOptions\Member.cs" />
<Compile Include="AnalyzeOptions\Method.cs" />
<Compile Include="AnalyzeOptions\Namespace.cs" />
<Compile Include="AnalyzeOptions\Parameter.cs" />
<Compile Include="Constructions\CatchVariable.cs" />
<Compile Include="Constructions\Return.cs" />
<Compile Include="Constructions\Throw.cs" />
Expand Down Expand Up @@ -111,9 +117,19 @@
<Compile Include="Declarations\Parameters\Variable.cs" />
<Compile Include="Declarations\Parameters\Optional.cs" />
<Compile Include="Declarations\Parameters\SimpleParameter.cs" />
<Compile Include="XmlDocComment\TypeParam.cs" />
<Compile Include="XmlDocComment\TypeParamRef.cs" />
<Compile Include="XmlDocComment\CrefAttribute.cs" />
<Compile Include="SimpleExample.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Declarations\Namespaces\TypeAlias.cs" />
<Compile Include="XmlDocComment\Exception.cs" />
<Compile Include="XmlDocComment\NameAttribute.cs" />
<Compile Include="XmlDocComment\Param.cs" />
<Compile Include="XmlDocComment\ParamRef.cs" />
<Compile Include="XmlDocComment\Permission.cs" />
<Compile Include="XmlDocComment\See.cs" />
<Compile Include="XmlDocComment\SeeAlso.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
10 changes: 10 additions & 0 deletions Tests/Identifiers/CSharpIdentifiers/XmlDocComment/CrefAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace CSharpIdentifiers.XmlDocComment
{
internal class CrefAttribute
{
/// <summary>
/// <see cref="Method"/>
/// </summary>
public void Method() { }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace CSharpIdentifiers.XmlDocComment
{
/// <exception cref="System.AccessViolationException" />
internal class Exception
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace CSharpIdentifiers.XmlDocComment
{
internal class NameAttribute
{
/// <param name="arg"></param>
public void Method(string arg) { }
}
}
8 changes: 8 additions & 0 deletions Tests/Identifiers/CSharpIdentifiers/XmlDocComment/Param.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace CSharpIdentifiers.XmlDocComment
{
internal class Param
{
/// <param name="arg"></param>
public void Method(string arg) { }
}
}
10 changes: 10 additions & 0 deletions Tests/Identifiers/CSharpIdentifiers/XmlDocComment/ParamRef.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace CSharpIdentifiers.XmlDocComment
{
internal class ParamRef
{
/// <summary>
/// <paramref name="arg"/>
/// </summary>
public void Method(string arg) { }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace CSharpIdentifiers.XmlDocComment
{
/// <permission cref="System.Security.PermissionSet" />
internal class Permission
{
}
}
9 changes: 9 additions & 0 deletions Tests/Identifiers/CSharpIdentifiers/XmlDocComment/See.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace CSharpIdentifiers.XmlDocComment
{
/// <summary>
/// <see cref="System.Action"/>
/// </summary>
internal class See
{
}
}
9 changes: 9 additions & 0 deletions Tests/Identifiers/CSharpIdentifiers/XmlDocComment/SeeAlso.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace CSharpIdentifiers.XmlDocComment
{
/// <summary>
/// <seealso cref="System.Action"/>
/// </summary>
internal class SeeAlso
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace CSharpIdentifiers.XmlDocComment
{
/// <typeparam name="TValue"></typeparam>
internal class TypeParam<TValue>
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace CSharpIdentifiers.XmlDocComment
{
/// <summary>
/// <typeparamref name="TValue"/>
/// </summary>
internal class TypeParamRef<TValue>
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Public Class LocalVariable

Public Sub Method()
Dim value = ""
End Sub

End Class
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Public Class Member

''' <summary>
''' <see cref="Prop"/>
''' </summary>
Public Property Prop As String

End Class
11 changes: 11 additions & 0 deletions Tests/Identifiers/VisualBasicIdentifiers/AnalyzeOptions/Method.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Public Class Method

''' <summary>
''' <see cref="GetValue()"/>
''' </summary>
''' <returns></returns>
Public Function GetValue() As String

End Function

End Class
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Namespace AnalyzeOptions

''' <summary>
''' <see cref="AnalyzeOptions"/>
''' </summary>
Public Class Temp
End Class

End Namespace
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Public Class ParameterOption

''' <param name="path$"></param>
Public Sub Create(path$)

End Sub

End Class
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@
<Compile Include="Access\Parameters\DelegateParameter.vb" />
<Compile Include="Access\Parameters\OptionalParameter.vb" />
<Compile Include="Access\Parameters\Variable.vb" />
<Compile Include="AnalyzeOptions\LocalVariable.vb" />
<Compile Include="AnalyzeOptions\Member.vb" />
<Compile Include="AnalyzeOptions\Method.vb" />
<Compile Include="AnalyzeOptions\Namespace.vb" />
<Compile Include="AnalyzeOptions\ParameterOption.vb" />
<Compile Include="Constructions\If.vb" />
<Compile Include="Constructions\Nameof.vb" />
<Compile Include="Constructions\Throw.vb" />
Expand Down Expand Up @@ -152,6 +157,16 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="XmlDocComment\CrefAttribute.vb" />
<Compile Include="XmlDocComment\Exception.vb" />
<Compile Include="XmlDocComment\NameAttribute.vb" />
<Compile Include="XmlDocComment\Param.vb" />
<Compile Include="XmlDocComment\ParamRef.vb" />
<Compile Include="XmlDocComment\Permission.vb" />
<Compile Include="XmlDocComment\See.vb" />
<Compile Include="XmlDocComment\SeeAlso.vb" />
<Compile Include="XmlDocComment\TypeParam.vb" />
<Compile Include="XmlDocComment\TypeParamRef.vb" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="My Project\Resources.resx">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Public Class CrefAttribute

''' <summary>
''' <see cref="Create"/>
''' </summary>
Public Sub Create()

End Sub

End Class
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
''' <exception cref="System.AccessViolationException"
Public Class Exception

End Class
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Public Class NameAttribute

''' <param name="arg"></param>
Public Sub Method(arg$)

End Sub

End Class
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Public Class Param

''' <param name="arg"></param>
Public Sub Create(arg$)

End Sub

End Class
10 changes: 10 additions & 0 deletions Tests/Identifiers/VisualBasicIdentifiers/XmlDocComment/ParamRef.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Public Class ParamRef

''' <summary>
''' <paramref name="arg"/>
''' </summary>
Public Sub Method(arg$)

End Sub

End Class
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
''' <permission cref="System.Security.PermissionSet" />
Public Class Permission

End Class
4 changes: 4 additions & 0 deletions Tests/Identifiers/VisualBasicIdentifiers/XmlDocComment/See.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
''' <see cref="System.Action"/>
Public Class See

End Class
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
''' <seealso cref="System.Action"/>
Public Class SeeAlso

End Class
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
''' <typeparam name="TValue"></typeparam>
Public Class TypeParam(Of TValue)

End Class
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
''' <summary>
''' <typeparamref name="TValue"/>
''' </summary>
Public Class TypeParamRef(Of TValue)

End Class
4 changes: 3 additions & 1 deletion src/common/CoCo.Settings/ClassificationSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public struct ClassificationSettings

public int? FontRenderingSize { get; set; }

public bool? IsClassified { get; set; }
public bool? IsDisabled { get; set; }

public bool? IsDisabledInXml { get; set; }
}
}
Loading