File tree Expand file tree Collapse file tree 1 file changed +1
-16
lines changed
src/FSharpLint.Core/Rules/Conventions/Naming Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Original file line number Diff line number Diff line change @@ -25,22 +25,7 @@ module QuickFixes =
2525 Some { FromText = ident.idText; FromRange = ident.idRange; ToText = toText })
2626
2727 let removePrefixingAndSuffixingUnderscores ( ident : Ident ) = lazy (
28- let rec removePrefixingUnderscores ( str : string ) =
29- if str.StartsWith " _" then
30- removePrefixingUnderscores( str.Substring 1 )
31- else
32- str
33-
34- let rec removeSuffixingUnderscores ( str : string ) =
35- if str.EndsWith " _" then
36- removeSuffixingUnderscores( str.Substring( 0 , str.Length - 1 ))
37- else
38- str
39-
40- let toText =
41- ident.idText
42- |> removePrefixingUnderscores
43- |> removeSuffixingUnderscores
28+ let toText = ident.idText.Trim '_'
4429 Some { FromText = ident.idText; FromRange = ident.idRange; ToText = toText })
4530
4631 let addPrefix prefix ( ident : Ident ) = lazy (
You can’t perform that action at this time.
0 commit comments