Skip to content

Commit 2a98b58

Browse files
committed
Add test case for .stan.toml configuration
1 parent 2e02fbf commit 2a98b58

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
@@ -34,6 +34,12 @@ tests =
3434
assertBool "" $ T.isPrefixOf expectedPrefix (reduceDiag ^. L.message)
3535
reduceDiag ^. L.source @?= Just "stan"
3636
return ()
37+
, testCase "ignores diagnostics from .stan.toml" $
38+
runStanSession "" $ do
39+
doc <- openDoc "dir/configTest.hs" "haskell"
40+
diags <- waitForDiagnosticsFromSource doc "stan"
41+
liftIO $ length diags @?= 0
42+
return ()
3743
]
3844

3945
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)