Skip to content

Commit d40f951

Browse files
committed
Add test case for .stan.toml configuration
1 parent 8bbc2b7 commit d40f951

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

plugins/hls-stan-plugin/test/Main.hs

+6
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ tests =
3333
assertBool "" $ T.isPrefixOf expectedPrefix (reduceDiag ^. L.message)
3434
reduceDiag ^. L.source @?= Just "stan"
3535
return ()
36+
, testCase "ignores diagnostics from .stan.toml" $
37+
runStanSession "" $ do
38+
doc <- openDoc "dir/configTest.hs" "haskell"
39+
diags <- waitForDiagnosticsFromSource doc "stan"
40+
liftIO $ length diags @?= 0
41+
return ()
3642
]
3743

3844
testDir :: FilePath
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[[check]]
2+
type = "Exclude"
3+
id = "STAN-0206"
4+
scope = "all"
5+
6+
[[check]]
7+
type = "Exclude"
8+
id = "STAN-0103"
9+
file = "dir/configTest.hs"
10+
11+
[[check]]
12+
type = "Exclude"
13+
id = "STAN-0212"
14+
directory = "dir/"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
data A = A Int Int
2+
3+
a = length [1..]
4+
5+
b = undefined

0 commit comments

Comments
 (0)