File tree Expand file tree Collapse file tree 5 files changed +44
-266
lines changed
plugins/hls-cabal-fmt-plugin Expand file tree Collapse file tree 5 files changed +44
-266
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ packages:
99 ./hls-plugin-api
1010 ./hls-test-utils
1111 ./plugins/hls-cabal-plugin
12- ./plugins/hls-cabal-fmt-plugin
1312 ./plugins/hls-stylish-haskell-plugin
1413 ./plugins/hls-fourmolu-plugin
1514 ./plugins/hls-class-plugin
Original file line number Diff line number Diff line change @@ -83,9 +83,51 @@ flag cabalfmt
8383
8484common cabalfmt
8585 if flag(cabalfmt)
86- build-depends : hls-cabal-fmt-plugin == 2.5.0.0
86+ build-depends : hls-cabal-fmt-plugin
8787 cpp-options : -Dhls_cabalfmt
8888
89+ flag isolateCabalfmtTests
90+ description : Should tests search for 'cabal-fmt' on the $PATH or shall we install it via build-tool-depends?
91+ -- By default, search on the PATH
92+ default : False
93+ manual : True
94+
95+ library hls-cabal-fmt-plugin
96+ import : warnings
97+ exposed-modules : Ide.Plugin.CabalFmt
98+ hs-source-dirs : plugins/hls-cabal-fmt-plugin/src
99+ build-depends :
100+ , base >= 4.12 && < 5
101+ , directory
102+ , filepath
103+ , ghcide == 2.5.0.0
104+ , hls-plugin-api == 2.5.0.0
105+ , lens
106+ , lsp-types
107+ , mtl
108+ , process-extras
109+ , text
110+ , transformers
111+
112+ default-language : Haskell2010
113+
114+ test-suite hls-cabal-fmt-plugin-tests
115+ import : warnings
116+ type : exitcode-stdio-1.0
117+ default-language : Haskell2010
118+ hs-source-dirs : plugins/hls-cabal-fmt-plugin/test
119+ main-is : Main.hs
120+ ghc-options : -threaded -rtsopts -with-rtsopts=-N
121+ build-depends :
122+ , base
123+ , directory
124+ , filepath
125+ , hls-cabal-fmt-plugin
126+ , hls-test-utils == 2.5.0.0
127+
128+ if flag(isolateCabalfmtTests)
129+ build-tool-depends : cabal-fmt :cabal-fmt ^>= 0.1.6
130+
89131-----------------------------
90132-- cabal plugin
91133-----------------------------
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -57,4 +57,4 @@ cabalFmtGolden Found title path desc act = goldenWithCabalDocFormatter def cabal
5757 conf = def
5858
5959testDataDir :: FilePath
60- testDataDir = " test" </> " testdata"
60+ testDataDir = " plugins " </> " hls-cabal-fmt-plugin " </> " test" </> " testdata"
You can’t perform that action at this time.
0 commit comments