Skip to content

Commit fd1c5b9

Browse files
committed
F# snippets: adds analyzer ignore snippets
1 parent d94a84d commit fd1c5b9

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

release/snippets.json

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@
8585
"\t${2:body-expression}"
8686
]
8787
},
88-
8988
// records, discriminated unions, classes, structs
9089
"record": {
9190
"prefix": "record",
@@ -137,11 +136,11 @@
137136
"unit-of-measure": {
138137
"prefix": "unit-of-measure",
139138
"description": "Floating point and signed integer values in F# can have associated units of measure, which are typically used to indicate length, volume, mass, and so on. By using quantities with units, you enable the compiler to verify that arithmetic relationships have the correct units, which helps prevent programming errors.",
140-
"body" : [
139+
"body": [
141140
"[<Measure>] type ${1:unit-name} = ${2:unit-symbol}"
142141
]
143142
},
144-
"class" : {
143+
"class": {
145144
"prefix": "class",
146145
"description": "Classes represent the fundamental description of .NET object types; the class is the primary type concept that supports object-oriented programming in F#",
147146
"body": [
@@ -150,7 +149,7 @@
150149
"\tmember this.${5:member-name2} = ${6:member-expression2}"
151150
]
152151
},
153-
"class-abstract" : {
152+
"class-abstract": {
154153
"prefix": "abstract-class",
155154
"description": "Classes represent the fundamental description of .NET object types; the class is the primary type concept that supports object-oriented programming in F#",
156155
"body": [
@@ -160,13 +159,28 @@
160159
"\tabstract member this.${5:member-name2} : ${6:member-type2}"
161160
]
162161
},
163-
"interface" : {
162+
"interface": {
164163
"prefix": "interface",
165164
"description": "Interfaces are a way to define a set of operations that a type must implement. An interface is a type that is completely abstract, containing only signatures of operations that must be implemented by a type that implements the interface.",
166165
"body": [
167166
"type ${1:interface-name} =",
168167
"\tabstract ${2:member-name1} : ${3:member-type2}",
169168
"\tabstract ${4:member-name1} : ${5:member-type2}"
170169
]
171-
}
170+
},
171+
// Analyzers
172+
"FSharp.Analyzer Ignore": {
173+
"prefix": "analyzer-ignore",
174+
"description": "Ignore F# Analyzer warning",
175+
"body": [
176+
"// fsharpanalyzer: ${1|ignore-line,ignore-line-next,ignore-region-start,ignore-file|} ${2:analyzer-code}"
177+
]
178+
},
179+
"FSharp.Analyzer Ignore region-end": {
180+
"prefix": "analyzer-ignore-region-end",
181+
"description": "Ignore F# Analyzer warning region end",
182+
"body": [
183+
"// fsharpanalyzer: ignore-region-end"
184+
]
185+
},
172186
}

0 commit comments

Comments
 (0)