You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### update FSC to 29.0
update FSC to v29.0
Notes about tests changes:
in `MultipleUnsavedFiles` integration test the error hint `addTwo2` should be valid suggestion
need to check if is a FCS regression or in FSAC
the `Test1Json` integration test it's now flaky (disabled it), the `Range` sometimes finish at start of next line other times at end of current line
like
```diff
"Range": {
"StartColumn": 1,
"StartLine": 1,
- "EndColumn": 1,
- "EndLine": 16
+ "EndColumn": 6,
+ "EndLine": 15
},
```
### update FSharpLint.Core
update FSharpLint.Core to v0.12.1
support fsharplint xml and json configs
workaround fsharplint message change.
The message format returned by linter is `FS01234: info text"` , so need to strip the warning code from output message
NOTE in the test `LinterWithOptions` the xmlconfig is read and converted, but hints are not disabled.
Changed the test, based on current fsharplint behaviour
Copy file name to clipboardExpand all lines: test/FsAutoComplete.IntegrationTests/LinterWithOptions/output.json
+162-1Lines changed: 162 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,168 @@
11
11
}
12
12
{
13
13
"Kind": "lint",
14
-
"Data": []
14
+
"Data": [
15
+
{
16
+
"Info": "`not (a <> b)` might be able to be refactored into `a = b`.",
17
+
"Range": {
18
+
"StartColumn": 17,
19
+
"StartLine": 2,
20
+
"EndColumn": 27,
21
+
"EndLine": 2
22
+
},
23
+
"Input": "let test1 a b = not (a=b)\nlet test2 a b = not (a<>b)\nlet test3 = fun a -> a\nlet test4 = not true\nlet test5 = not false\nlet test6 = List.fold ( + ) 0\nlet test7 a = a<>true\nlet test8 a = a=null\nlet test9 a = List.head (List.sort a)\n",
24
+
"Fix": {
25
+
"FromText": "not (a<>b)",
26
+
"FromRange": {
27
+
"StartColumn": 17,
28
+
"StartLine": 2,
29
+
"EndColumn": 27,
30
+
"EndLine": 2
31
+
},
32
+
"ToText": "a = b"
33
+
}
34
+
},
35
+
{
36
+
"Info": "`fun x -> x` might be able to be refactored into `id`.",
37
+
"Range": {
38
+
"StartColumn": 13,
39
+
"StartLine": 3,
40
+
"EndColumn": 23,
41
+
"EndLine": 3
42
+
},
43
+
"Input": "let test1 a b = not (a=b)\nlet test2 a b = not (a<>b)\nlet test3 = fun a -> a\nlet test4 = not true\nlet test5 = not false\nlet test6 = List.fold ( + ) 0\nlet test7 a = a<>true\nlet test8 a = a=null\nlet test9 a = List.head (List.sort a)\n",
44
+
"Fix": {
45
+
"FromText": "fun a -> a",
46
+
"FromRange": {
47
+
"StartColumn": 13,
48
+
"StartLine": 3,
49
+
"EndColumn": 23,
50
+
"EndLine": 3
51
+
},
52
+
"ToText": "id"
53
+
}
54
+
},
55
+
{
56
+
"Info": "`not true` might be able to be refactored into `false`.",
57
+
"Range": {
58
+
"StartColumn": 13,
59
+
"StartLine": 4,
60
+
"EndColumn": 21,
61
+
"EndLine": 4
62
+
},
63
+
"Input": "let test1 a b = not (a=b)\nlet test2 a b = not (a<>b)\nlet test3 = fun a -> a\nlet test4 = not true\nlet test5 = not false\nlet test6 = List.fold ( + ) 0\nlet test7 a = a<>true\nlet test8 a = a=null\nlet test9 a = List.head (List.sort a)\n",
64
+
"Fix": {
65
+
"FromText": "not true",
66
+
"FromRange": {
67
+
"StartColumn": 13,
68
+
"StartLine": 4,
69
+
"EndColumn": 21,
70
+
"EndLine": 4
71
+
},
72
+
"ToText": "false"
73
+
}
74
+
},
75
+
{
76
+
"Info": "`not false` might be able to be refactored into `true`.",
77
+
"Range": {
78
+
"StartColumn": 13,
79
+
"StartLine": 5,
80
+
"EndColumn": 22,
81
+
"EndLine": 5
82
+
},
83
+
"Input": "let test1 a b = not (a=b)\nlet test2 a b = not (a<>b)\nlet test3 = fun a -> a\nlet test4 = not true\nlet test5 = not false\nlet test6 = List.fold ( + ) 0\nlet test7 a = a<>true\nlet test8 a = a=null\nlet test9 a = List.head (List.sort a)\n",
84
+
"Fix": {
85
+
"FromText": "not false",
86
+
"FromRange": {
87
+
"StartColumn": 13,
88
+
"StartLine": 5,
89
+
"EndColumn": 22,
90
+
"EndLine": 5
91
+
},
92
+
"ToText": "true"
93
+
}
94
+
},
95
+
{
96
+
"Info": "`a <> true` might be able to be refactored into `not a`.",
97
+
"Range": {
98
+
"StartColumn": 15,
99
+
"StartLine": 7,
100
+
"EndColumn": 22,
101
+
"EndLine": 7
102
+
},
103
+
"Input": "let test1 a b = not (a=b)\nlet test2 a b = not (a<>b)\nlet test3 = fun a -> a\nlet test4 = not true\nlet test5 = not false\nlet test6 = List.fold ( + ) 0\nlet test7 a = a<>true\nlet test8 a = a=null\nlet test9 a = List.head (List.sort a)\n",
104
+
"Fix": {
105
+
"FromText": "a<>true",
106
+
"FromRange": {
107
+
"StartColumn": 15,
108
+
"StartLine": 7,
109
+
"EndColumn": 22,
110
+
"EndLine": 7
111
+
},
112
+
"ToText": "not a"
113
+
}
114
+
},
115
+
{
116
+
"Info": "`List.head (List.sort x)` might be able to be refactored into `List.min x`.",
117
+
"Range": {
118
+
"StartColumn": 15,
119
+
"StartLine": 9,
120
+
"EndColumn": 38,
121
+
"EndLine": 9
122
+
},
123
+
"Input": "let test1 a b = not (a=b)\nlet test2 a b = not (a<>b)\nlet test3 = fun a -> a\nlet test4 = not true\nlet test5 = not false\nlet test6 = List.fold ( + ) 0\nlet test7 a = a<>true\nlet test8 a = a=null\nlet test9 a = List.head (List.sort a)\n",
124
+
"Fix": {
125
+
"FromText": "List.head (List.sort a)",
126
+
"FromRange": {
127
+
"StartColumn": 15,
128
+
"StartLine": 9,
129
+
"EndColumn": 38,
130
+
"EndLine": 9
131
+
},
132
+
"ToText": "List.min a"
133
+
}
134
+
},
135
+
{
136
+
"Info": "`x = null` might be able to be refactored into `isNull x`.",
137
+
"Range": {
138
+
"StartColumn": 15,
139
+
"StartLine": 8,
140
+
"EndColumn": 21,
141
+
"EndLine": 8
142
+
},
143
+
"Input": "let test1 a b = not (a=b)\nlet test2 a b = not (a<>b)\nlet test3 = fun a -> a\nlet test4 = not true\nlet test5 = not false\nlet test6 = List.fold ( + ) 0\nlet test7 a = a<>true\nlet test8 a = a=null\nlet test9 a = List.head (List.sort a)\n",
144
+
"Fix": {
145
+
"FromText": "a=null",
146
+
"FromRange": {
147
+
"StartColumn": 15,
148
+
"StartLine": 8,
149
+
"EndColumn": 21,
150
+
"EndLine": 8
151
+
},
152
+
"ToText": "isNull a"
153
+
}
154
+
},
155
+
{
156
+
"Info": "`not (a = b)` might be able to be refactored into `a <> b`.",
157
+
"Range": {
158
+
"StartColumn": 17,
159
+
"StartLine": 1,
160
+
"EndColumn": 26,
161
+
"EndLine": 1
162
+
},
163
+
"Input": "let test1 a b = not (a=b)\nlet test2 a b = not (a<>b)\nlet test3 = fun a -> a\nlet test4 = not true\nlet test5 = not false\nlet test6 = List.fold ( + ) 0\nlet test7 a = a<>true\nlet test8 a = a=null\nlet test9 a = List.head (List.sort a)\n",
0 commit comments