Skip to content

Commit

Permalink
Merge pull request #891 from dawedawe/update_analyzers
Browse files Browse the repository at this point in the history
Update analyzers
  • Loading branch information
nojaf authored Dec 6, 2023
2 parents 6c1f03f + 59c7c50 commit c28f982
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageVersion Include="Ionide.KeepAChangelog.Tasks" Version="0.1.8" />
<PackageVersion Include="FSharp.Analyzers.Build" Version="0.2.0" />
<PackageVersion Include="G-Research.FSharp.Analyzers" Version="0.4.0" />
<PackageVersion Include="Ionide.Analyzers" Version="0.5.0" />
<PackageVersion Include="G-Research.FSharp.Analyzers" Version="0.5.1" />
<PackageVersion Include="Ionide.Analyzers" Version="0.5.1" />
</ItemGroup>
</Project>
20 changes: 10 additions & 10 deletions src/FSharp.Formatting.ApiDocs/GenerateModel.fs
Original file line number Diff line number Diff line change
Expand Up @@ -816,10 +816,10 @@ type internal CrossReferenceResolver(root, collectionName, qualify, extensions)

if (not (System.String.IsNullOrEmpty xmlsig)) then
assert
(xmlsig.StartsWith("M:")
|| xmlsig.StartsWith("P:")
|| xmlsig.StartsWith("F:")
|| xmlsig.StartsWith("E:"))
(xmlsig.StartsWith("M:", StringComparison.Ordinal)
|| xmlsig.StartsWith("P:", StringComparison.Ordinal)
|| xmlsig.StartsWith("F:", StringComparison.Ordinal)
|| xmlsig.StartsWith("E:", StringComparison.Ordinal))

xmlDocNameToSymbol.[xmlsig] <- memb

Expand All @@ -830,7 +830,7 @@ type internal CrossReferenceResolver(root, collectionName, qualify, extensions)
let xmlsig = getXmlDocSigForType entity

if (not (System.String.IsNullOrEmpty xmlsig)) then
assert (xmlsig.StartsWith("T:"))
assert (xmlsig.StartsWith("T:", StringComparison.Ordinal))
xmlDocNameToSymbol.[xmlsig] <- entity

if (not (niceNameEntityLookup.ContainsKey(entity.LogicalName))) then
Expand Down Expand Up @@ -986,7 +986,7 @@ type internal CrossReferenceResolver(root, collectionName, qualify, extensions)
| Some nm -> Some(externalDocsLink false entity.DisplayName nm nm)

let resolveCrossReferenceForTypeByXmlSig (typeXmlSig: string) =
assert (typeXmlSig.StartsWith("T:"))
assert (typeXmlSig.StartsWith("T:", StringComparison.Ordinal))

match xmlDocNameToSymbol.TryGetValue(typeXmlSig) with
| true, (:? FSharpEntity as entity) ->
Expand Down Expand Up @@ -1025,10 +1025,10 @@ type internal CrossReferenceResolver(root, collectionName, qualify, extensions)

let tryResolveCrossReferenceForMemberByXmlSig (memberXmlSig: string) =
assert
(memberXmlSig.StartsWith("M:")
|| memberXmlSig.StartsWith("P:")
|| memberXmlSig.StartsWith("F:")
|| memberXmlSig.StartsWith("E:"))
(memberXmlSig.StartsWith("M:", StringComparison.Ordinal)
|| memberXmlSig.StartsWith("P:", StringComparison.Ordinal)
|| memberXmlSig.StartsWith("F:", StringComparison.Ordinal)
|| memberXmlSig.StartsWith("E:", StringComparison.Ordinal))

match xmlDocNameToSymbol.TryGetValue(memberXmlSig) with
| true, (:? FSharpMemberOrFunctionOrValue as memb) when memb.DeclaringEntity.IsSome -> memb |> mfvToCref |> Some
Expand Down

0 comments on commit c28f982

Please sign in to comment.