on master help sign in
Add Cabal syntax test file
commitb1f69434f9bbf02641ca68cba28f10a1c126dd72 authorMohamed Abdelnour <mohamed.k.abdelnour@gmail.com> dateSat 29 May 2021, 02:13 (5 years ago) parentaa74d19
3 files changed+519
tests/syntax-tests/highlighted/Cabal/semantic.cabal+247 tests/syntax-tests/source/Cabal/LICENSE.md+25 tests/syntax-tests/source/Cabal/semantic.cabal+247
tests/syntax-tests/highlighted/Cabal/semantic.cabalnew file+247
@@ -0,0 +1,247 @@
1+cabal-version: 2.4
2+
3+name: semantic
4+version: 0.11.0.1
5+synopsis: Framework and executable for analyzing and diffing untrusted code.
6+description: Semantic is a library for parsing, analyzing, and comparing source code across many languages.
7+homepage: http://github.com/github/semantic#readme
8+bug-reports: https://github.com/github/semantic/issues
9+license: MIT
10+license-file: LICENSE
11+author: The Semantic authors
12+maintainer: opensource+semantic@github.com
13+copyright: (c) 2015-2020 GitHub, Inc.
14+category: Language
15+build-type: Simple
16+stability: alpha
17+extra-source-files: README.md
18+
19+tested-with: GHC == 8.10.1
20+
21+flag release
22+ description: Build with optimizations on (for CI or deployment builds)
23+ default: False
24+
25+-- GHC extensions shared between targets
26+common haskell
27+ default-language: Haskell2010
28+ default-extensions: StrictData
29+ ghc-options:
30+ -Weverything
31+ -Wno-missing-local-signatures
32+ -Wno-missing-import-lists
33+ -Wno-implicit-prelude
34+ -Wno-safe
35+ -Wno-unsafe
36+ -Wno-name-shadowing
37+ -Wno-monomorphism-restriction
38+ -Wno-missed-specialisations
39+ -Wno-all-missed-specialisations
40+ -Wno-star-is-type
41+ cpp-options:
42+ -DBAZEL_BUILD=0
43+ if (impl(ghc >= 8.8))
44+ ghc-options: -Wno-missing-deriving-strategies
45+ if (impl(ghc >= 8.10))
46+ ghc-options:
47+ -Wno-missing-safe-haskell-mode
48+ -Wno-prepositive-qualified-module
49+
50+common executable-flags
51+ ghc-options: -threaded -rtsopts "-with-rtsopts=-N -A4m -n2m"
52+
53+library
54+ import: haskell
55+ hs-source-dirs: src
56+ exposed-modules: Control.Carrier.Parse.Measured
57+ , Control.Carrier.Parse.Simple
58+ -- Effects
59+ , Control.Effect.Parse
60+ , Control.Effect.Sum.Project
61+ , Control.Effect.Timeout
62+ -- General datatype definitions & generic algorithms
63+ , Data.Blob
64+ , Data.Blob.IO
65+ , Data.Duration
66+ , Data.Edit
67+ , Data.Error
68+ , Data.Flag
69+ , Data.Graph.Algebraic
70+ , Data.Handle
71+ , Data.Maybe.Exts
72+ , Data.Semigroup.App
73+ -- Parser glue
74+ , Parsing.Parser
75+ , Parsing.TreeSitter
76+ -- API
77+ , Semantic.Api
78+ , Semantic.Api.Bridge
79+ , Semantic.Api.StackGraph
80+ , Semantic.Api.Symbols
81+ , Semantic.Api.Terms
82+ , Semantic.CLI
83+ , Semantic.Config
84+ , Semantic.Env
85+ , Semantic.IO
86+ , Semantic.Task
87+ , Semantic.Task.Files
88+ , Semantic.Telemetry
89+ , Semantic.Telemetry.AsyncQueue
90+ , Semantic.Telemetry.Error
91+ , Semantic.Telemetry.Log
92+ , Semantic.Telemetry.Stat
93+ , Semantic.Util
94+ , Semantic.Util.Pretty
95+ , Semantic.Version
96+ -- Serialization
97+ , Serializing.Format
98+ , Serializing.SExpression.Precise
99+ -- Custom Prelude
100+ autogen-modules: Paths_semantic
101+ other-modules: Paths_semantic
102+ -- Except in case of vendored dependencies, these deps should be expressed
103+ -- as caret-operator bounds relative to a version in Stackage.
104+ -- These are currently pinned to lts-13.13.
105+ build-depends:
106+ , aeson ^>= 1.4.2.0
107+ , algebraic-graphs ^>= 0.3
108+ , ansi-terminal >= 0.8.2 && <1
109+ , async ^>= 2.2.1
110+ , base >= 4.13 && < 5
111+ , bytestring ^>= 0.10.8.2
112+ , containers ^>= 0.6.0.1
113+ , directory-tree ^>= 0.12.1
114+ , filepath ^>= 1.4.2.1
115+ , fused-effects ^>= 1.1
116+ , ghc-prim >= 0.5 && < 0.7
117+ , hostname ^>= 1.0
118+ , hscolour ^>= 1.24.4
119+ , lens >= 4.17 && < 4.20
120+ , network ^>= 2.8.0.0
121+ , network-uri ^>= 2.6.1.0
122+ , optparse-applicative >= 0.14.3 && < 0.16
123+ , pathtype ^>= 0.8.1
124+ , pretty-show ^>= 1.9.5
125+ , proto-lens >= 0.5 && < 0.8
126+ , semantic-analysis ^>= 0
127+ , semantic-ast
128+ , semantic-codeql ^>= 0
129+ , semantic-go ^>= 0
130+ , semantic-java ^>= 0
131+ , semantic-json ^>= 0
132+ , semantic-php ^>= 0
133+ , semantic-proto ^>= 0
134+ , semantic-python ^>= 0
135+ , semantic-ruby ^>= 0
136+ , semantic-scope-graph ^>= 0
137+ , semantic-source ^>= 0.1.0.1
138+ , semantic-tags ^>= 0
139+ , semantic-tsx ^>= 0
140+ , semantic-typescript ^>= 0
141+ , semilattices ^>= 0.0.0.3
142+ , split ^>= 0.2.3.3
143+ , stm-chans ^>= 3.0.0.4
144+ , text ^>= 1.2.3.2
145+ , time >= 1.8.0.2 && < 1.10
146+ , tree-sitter ^>= 0.9.0.1
147+ , tree-sitter-go ^>= 0.5.0.0
148+ , tree-sitter-java ^>= 0.7.0.0
149+ , tree-sitter-json ^>= 0.7.0.0
150+ , tree-sitter-php ^>= 0.5.0.0
151+ , tree-sitter-python ^>= 0.9.0.1
152+ , tree-sitter-ql ^>= 0.1.0.1
153+ , tree-sitter-ruby ^>= 0.5.0.0
154+ , tree-sitter-tsx ^>= 0.5.0.0
155+ , tree-sitter-typescript ^>= 0.5.0.0
156+ , unix ^>= 2.7.2.2
157+
158+executable semantic
159+ import: haskell, executable-flags
160+ hs-source-dirs: app
161+ main-is: Main.hs
162+ build-depends:
163+ , base
164+ , semantic
165+
166+test-suite test
167+ import: haskell, executable-flags
168+ type: exitcode-stdio-1.0
169+ hs-source-dirs: test
170+ main-is: Spec.hs
171+ other-modules: Data.Graph.Spec
172+ , Data.Language.Spec
173+ , Data.Semigroup.App.Spec
174+ , Integration.Spec
175+ , Semantic.Spec
176+ , Semantic.CLI.Spec
177+ , Semantic.IO.Spec
178+ , Semantic.Stat.Spec
179+ , Tags.Spec
180+ , SpecHelpers
181+ , Generators
182+ , Properties
183+ build-depends:
184+ , algebraic-graphs ^>= 0.3
185+ , base >= 4.13 && < 5
186+ , bytestring ^>= 0.10.8.2
187+ , fused-effects
188+ , Glob ^>= 0.10.0
189+ , hedgehog ^>= 1
190+ , hspec >= 2.6 && <3
191+ , hspec-expectations ^>= 0.8.2
192+ , network ^>= 2.8.0.0
193+ , pathtype ^>= 0.8.1
194+ , semantic
195+ , semantic-analysis
196+ , semantic-ast
197+ , semantic-proto
198+ , semantic-source ^>= 0.1.0.1
199+ , semantic-tags
200+ , semilattices
201+ , tasty ^>= 1.2.3
202+ , tasty-golden ^>= 2.3.2
203+ , tasty-hedgehog ^>= 1.0.0.1
204+ , tasty-hspec ^>= 1.1.5.1
205+ , tasty-hunit ^>= 0.10.0.2
206+
207+test-suite parse-examples
208+ import: haskell, executable-flags
209+ type: exitcode-stdio-1.0
210+ hs-source-dirs: test
211+ main-is: Examples.hs
212+ build-depends:
213+ , async ^>= 2.2.1
214+ , base
215+ , fused-effects ^>= 1.1
216+ , Glob
217+ , lens >= 4.17 && < 4.20
218+ , pathtype ^>= 0.8.1
219+ , process ^>= 1.6.3.0
220+ , semantic
221+ , semantic-analysis ^>= 0
222+ , semantic-ast
223+ , semantic-proto ^>= 0
224+ , tasty
225+ , tasty-hunit
226+ , text ^>= 1.2.3.2
227+
228+benchmark benchmarks
229+ import: haskell, executable-flags
230+ hs-source-dirs: bench
231+ type: exitcode-stdio-1.0
232+ main-is: Main.hs
233+ other-modules: Tagging
234+ ghc-options: -static
235+ build-depends:
236+ , base
237+ , fused-effects ^>= 1.1
238+ , gauge ^>= 0.2.5
239+ , Glob
240+ , pathtype ^>= 0.8.1
241+ , semantic
242+ , semantic-analysis ^>= 0
243+ , semantic-proto
244+
245+source-repository head
246+ type: git
247+ location: https://github.com/github/semantic
tests/syntax-tests/source/Cabal/LICENSE.mdnew file+25
@@ -0,0 +1,25 @@
1+The `semantic.cabal` file has been added from https://github.com/github/semantic under the following license:
2+
3+```text
4+MIT License
5+
6+Copyright (c) 2015-2019 GitHub
7+
8+Permission is hereby granted, free of charge, to any person obtaining a copy
9+of this software and associated documentation files (the "Software"), to deal
10+in the Software without restriction, including without limitation the rights
11+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+copies of the Software, and to permit persons to whom the Software is
13+furnished to do so, subject to the following conditions:
14+
15+The above copyright notice and this permission notice shall be included in all
16+copies or substantial portions of the Software.
17+
18+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24+SOFTWARE.
25+```
tests/syntax-tests/source/Cabal/semantic.cabalnew file+247
@@ -0,0 +1,247 @@
1+cabal-version: 2.4
2+
3+name: semantic
4+version: 0.11.0.1
5+synopsis: Framework and executable for analyzing and diffing untrusted code.
6+description: Semantic is a library for parsing, analyzing, and comparing source code across many languages.
7+homepage: http://github.com/github/semantic#readme
8+bug-reports: https://github.com/github/semantic/issues
9+license: MIT
10+license-file: LICENSE
11+author: The Semantic authors
12+maintainer: opensource+semantic@github.com
13+copyright: (c) 2015-2020 GitHub, Inc.
14+category: Language
15+build-type: Simple
16+stability: alpha
17+extra-source-files: README.md
18+
19+tested-with: GHC == 8.10.1
20+
21+flag release
22+ description: Build with optimizations on (for CI or deployment builds)
23+ default: False
24+
25+-- GHC extensions shared between targets
26+common haskell
27+ default-language: Haskell2010
28+ default-extensions: StrictData
29+ ghc-options:
30+ -Weverything
31+ -Wno-missing-local-signatures
32+ -Wno-missing-import-lists
33+ -Wno-implicit-prelude
34+ -Wno-safe
35+ -Wno-unsafe
36+ -Wno-name-shadowing
37+ -Wno-monomorphism-restriction
38+ -Wno-missed-specialisations
39+ -Wno-all-missed-specialisations
40+ -Wno-star-is-type
41+ cpp-options:
42+ -DBAZEL_BUILD=0
43+ if (impl(ghc >= 8.8))
44+ ghc-options: -Wno-missing-deriving-strategies
45+ if (impl(ghc >= 8.10))
46+ ghc-options:
47+ -Wno-missing-safe-haskell-mode
48+ -Wno-prepositive-qualified-module
49+
50+common executable-flags
51+ ghc-options: -threaded -rtsopts "-with-rtsopts=-N -A4m -n2m"
52+
53+library
54+ import: haskell
55+ hs-source-dirs: src
56+ exposed-modules: Control.Carrier.Parse.Measured
57+ , Control.Carrier.Parse.Simple
58+ -- Effects
59+ , Control.Effect.Parse
60+ , Control.Effect.Sum.Project
61+ , Control.Effect.Timeout
62+ -- General datatype definitions & generic algorithms
63+ , Data.Blob
64+ , Data.Blob.IO
65+ , Data.Duration
66+ , Data.Edit
67+ , Data.Error
68+ , Data.Flag
69+ , Data.Graph.Algebraic
70+ , Data.Handle
71+ , Data.Maybe.Exts
72+ , Data.Semigroup.App
73+ -- Parser glue
74+ , Parsing.Parser
75+ , Parsing.TreeSitter
76+ -- API
77+ , Semantic.Api
78+ , Semantic.Api.Bridge
79+ , Semantic.Api.StackGraph
80+ , Semantic.Api.Symbols
81+ , Semantic.Api.Terms
82+ , Semantic.CLI
83+ , Semantic.Config
84+ , Semantic.Env
85+ , Semantic.IO
86+ , Semantic.Task
87+ , Semantic.Task.Files
88+ , Semantic.Telemetry
89+ , Semantic.Telemetry.AsyncQueue
90+ , Semantic.Telemetry.Error
91+ , Semantic.Telemetry.Log
92+ , Semantic.Telemetry.Stat
93+ , Semantic.Util
94+ , Semantic.Util.Pretty
95+ , Semantic.Version
96+ -- Serialization
97+ , Serializing.Format
98+ , Serializing.SExpression.Precise
99+ -- Custom Prelude
100+ autogen-modules: Paths_semantic
101+ other-modules: Paths_semantic
102+ -- Except in case of vendored dependencies, these deps should be expressed
103+ -- as caret-operator bounds relative to a version in Stackage.
104+ -- These are currently pinned to lts-13.13.
105+ build-depends:
106+ , aeson ^>= 1.4.2.0
107+ , algebraic-graphs ^>= 0.3
108+ , ansi-terminal >= 0.8.2 && <1
109+ , async ^>= 2.2.1
110+ , base >= 4.13 && < 5
111+ , bytestring ^>= 0.10.8.2
112+ , containers ^>= 0.6.0.1
113+ , directory-tree ^>= 0.12.1
114+ , filepath ^>= 1.4.2.1
115+ , fused-effects ^>= 1.1
116+ , ghc-prim >= 0.5 && < 0.7
117+ , hostname ^>= 1.0
118+ , hscolour ^>= 1.24.4
119+ , lens >= 4.17 && < 4.20
120+ , network ^>= 2.8.0.0
121+ , network-uri ^>= 2.6.1.0
122+ , optparse-applicative >= 0.14.3 && < 0.16
123+ , pathtype ^>= 0.8.1
124+ , pretty-show ^>= 1.9.5
125+ , proto-lens >= 0.5 && < 0.8
126+ , semantic-analysis ^>= 0
127+ , semantic-ast
128+ , semantic-codeql ^>= 0
129+ , semantic-go ^>= 0
130+ , semantic-java ^>= 0
131+ , semantic-json ^>= 0
132+ , semantic-php ^>= 0
133+ , semantic-proto ^>= 0
134+ , semantic-python ^>= 0
135+ , semantic-ruby ^>= 0
136+ , semantic-scope-graph ^>= 0
137+ , semantic-source ^>= 0.1.0.1
138+ , semantic-tags ^>= 0
139+ , semantic-tsx ^>= 0
140+ , semantic-typescript ^>= 0
141+ , semilattices ^>= 0.0.0.3
142+ , split ^>= 0.2.3.3
143+ , stm-chans ^>= 3.0.0.4
144+ , text ^>= 1.2.3.2
145+ , time >= 1.8.0.2 && < 1.10
146+ , tree-sitter ^>= 0.9.0.1
147+ , tree-sitter-go ^>= 0.5.0.0
148+ , tree-sitter-java ^>= 0.7.0.0
149+ , tree-sitter-json ^>= 0.7.0.0
150+ , tree-sitter-php ^>= 0.5.0.0
151+ , tree-sitter-python ^>= 0.9.0.1
152+ , tree-sitter-ql ^>= 0.1.0.1
153+ , tree-sitter-ruby ^>= 0.5.0.0
154+ , tree-sitter-tsx ^>= 0.5.0.0
155+ , tree-sitter-typescript ^>= 0.5.0.0
156+ , unix ^>= 2.7.2.2
157+
158+executable semantic
159+ import: haskell, executable-flags
160+ hs-source-dirs: app
161+ main-is: Main.hs
162+ build-depends:
163+ , base
164+ , semantic
165+
166+test-suite test
167+ import: haskell, executable-flags
168+ type: exitcode-stdio-1.0
169+ hs-source-dirs: test
170+ main-is: Spec.hs
171+ other-modules: Data.Graph.Spec
172+ , Data.Language.Spec
173+ , Data.Semigroup.App.Spec
174+ , Integration.Spec
175+ , Semantic.Spec
176+ , Semantic.CLI.Spec
177+ , Semantic.IO.Spec
178+ , Semantic.Stat.Spec
179+ , Tags.Spec
180+ , SpecHelpers
181+ , Generators
182+ , Properties
183+ build-depends:
184+ , algebraic-graphs ^>= 0.3
185+ , base >= 4.13 && < 5
186+ , bytestring ^>= 0.10.8.2
187+ , fused-effects
188+ , Glob ^>= 0.10.0
189+ , hedgehog ^>= 1
190+ , hspec >= 2.6 && <3
191+ , hspec-expectations ^>= 0.8.2
192+ , network ^>= 2.8.0.0
193+ , pathtype ^>= 0.8.1
194+ , semantic
195+ , semantic-analysis
196+ , semantic-ast
197+ , semantic-proto
198+ , semantic-source ^>= 0.1.0.1
199+ , semantic-tags
200+ , semilattices
201+ , tasty ^>= 1.2.3
202+ , tasty-golden ^>= 2.3.2
203+ , tasty-hedgehog ^>= 1.0.0.1
204+ , tasty-hspec ^>= 1.1.5.1
205+ , tasty-hunit ^>= 0.10.0.2
206+
207+test-suite parse-examples
208+ import: haskell, executable-flags
209+ type: exitcode-stdio-1.0
210+ hs-source-dirs: test
211+ main-is: Examples.hs
212+ build-depends:
213+ , async ^>= 2.2.1
214+ , base
215+ , fused-effects ^>= 1.1
216+ , Glob
217+ , lens >= 4.17 && < 4.20
218+ , pathtype ^>= 0.8.1
219+ , process ^>= 1.6.3.0
220+ , semantic
221+ , semantic-analysis ^>= 0
222+ , semantic-ast
223+ , semantic-proto ^>= 0
224+ , tasty
225+ , tasty-hunit
226+ , text ^>= 1.2.3.2
227+
228+benchmark benchmarks
229+ import: haskell, executable-flags
230+ hs-source-dirs: bench
231+ type: exitcode-stdio-1.0
232+ main-is: Main.hs
233+ other-modules: Tagging
234+ ghc-options: -static
235+ build-depends:
236+ , base
237+ , fused-effects ^>= 1.1
238+ , gauge ^>= 0.2.5
239+ , Glob
240+ , pathtype ^>= 0.8.1
241+ , semantic
242+ , semantic-analysis ^>= 0
243+ , semantic-proto
244+
245+source-repository head
246+ type: git
247+ location: https://github.com/github/semantic