1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 23:11:50 +03:00
Commit Graph

308 Commits

Author SHA1 Message Date
Timothy Clem
95b7fd5888 Resolve module import paths that walk up directory structure (e.g. ../) 2018-04-17 14:13:01 -07:00
Rob Rix
d863d282b1 🔥 the Mergeable spec. 2018-04-09 16:38:28 -04:00
Patrick Thomson
faf246ff1e Merge remote-tracking branch 'origin/master' into fix-scientific-parsing 2018-04-04 15:40:51 -04:00
Patrick Thomson
c36256e943 Standardize and fix floating-point parsing.
The existence of #1705 showed me that it's time to remove the bandaid
of a fix that was `normalizeFloatString` in #1537. This patch
introduces a proper Attoparsec parser for Scientific values that
handles the vaguaries of cross-language floating-point syntax. We
already depended on Attoparsec indirectly, so adding it as an explicit
dependency is fine.

A unit test is included, with examples taken from the tree-sitter corpora.
2018-04-03 17:02:56 -04:00
Timothy Clem
208d16e131 Disable import-graph specs for now 2018-04-03 10:12:20 -07:00
Patrick Thomson
034bb562d4 Introduce tree-automata DSL for filtering and matching ASTs.
This patch adds the `Matcher` monad, which is capable of filtering any
recursive data structure, bottom-up, yielding a list of (or an
optional) result. These functions are probably going to be used over
`Term` values, so API is provided to wrap common projection functions.

The API was more or less copied directly from that of Clang's AST
matching facilities.

There are a lot of things we can do in the future:
* Binding results yielded in matchers to associated names, for future
  transformation stages to look up and modify.
* Actual transformation stages.
* Optimizations. This is not very fast.

A million thanks to @robrix, whose sage advice managed to turn my
kooky idea for an API into something really special and exciting.
2018-03-27 16:14:30 -04:00
Timothy Clem
7fdc5e2fda Write a small spec for evaluating PHP includes 2018-03-19 14:42:31 -07:00
Timothy Clem
1e276dddef TDD FTW 2018-03-15 11:34:34 -07:00
Timothy Clem
579a447961 Test out go import evaling 2018-03-13 11:14:55 -07:00
Timothy Clem
38b7607fa3 Turn on the TypeScript analysis spec 2018-03-09 16:24:32 -08:00
Timothy Clem
d352c66227 Test out rest of python imports, move to new dir 2018-03-09 15:16:07 -08:00
Timothy Clem
3fc7f644b2 Try my hand at a spec for analysis - test out python imports 2018-03-09 15:01:29 -08:00
Timothy Clem
fb000828ed Test out import-graph output for relevant languages 2018-02-07 12:20:41 -08:00
Rob Rix
67f251e223 Combine the generic Eq1, Ord1, & Show1 implementations into a single module. 2017-11-30 10:24:48 -05:00
Rob Rix
bcb64b3187 Rename the Integration spec. 2017-11-27 14:06:12 -05:00
Rob Rix
59fc8bffc9 Rename the TOC spec. 2017-11-27 14:04:58 -05:00
Rob Rix
69595553d6 Rename the Interpreter spec. 2017-11-27 14:03:45 -05:00
Rob Rix
a442bfeea1 Rename the Term spec. 2017-11-27 14:02:03 -05:00
Rob Rix
a079638c5b Rename the Semantic spec. 2017-11-27 14:00:53 -05:00
Rob Rix
80fce5b41e Rename the Diff spec. 2017-11-27 13:59:44 -05:00
Rob Rix
4b06df7db4 Rename the Stat spec. 2017-11-27 13:58:23 -05:00
Rob Rix
59166b50bb Rename the CLI spec. 2017-11-27 13:57:25 -05:00
Rob Rix
b98375b58f Rename the IO spec. 2017-11-27 13:52:48 -05:00
Rob Rix
8a3d34a1fc Rename the SES spec. 2017-11-27 13:51:05 -05:00
Rob Rix
f4960b0a0d Rename the Source spec. 2017-11-27 13:49:52 -05:00
Rob Rix
266bd1199a Rename the RWS spec. 2017-11-27 13:48:43 -05:00
Rob Rix
a8e8489fcb Rename the assignment spec. 2017-11-27 13:47:04 -05:00
Rob Rix
8dea7d4194 🔥 AlignmentSpec. 2017-11-21 17:08:52 -05:00
Rob Rix
efa454edcc 🔥 PatchOutputSpec. 2017-11-21 17:08:40 -05:00
Timothy Clem
666585bf50 Start writing a few specs 2017-10-04 11:12:24 -07:00
Rob Rix
7e034fa4c1 Test that genericLiftCompare gives equivalent behaviour to compare for product types. 2017-10-03 09:23:44 -04:00
Rob Rix
6f4539cdce Stub in a module for generically-implemented Ord1 specs. 2017-10-03 09:15:45 -04:00
Rob Rix
be481f7a71 Rename SES.Myers to SES. 2017-09-14 11:53:02 -04:00
Rob Rix
7da8799e08 🔥 Prologue & protolude. 2017-07-28 14:37:02 -04:00
Rob Rix
ed9b00cc90 🔥 rangesAndWordsFrom. 2017-06-24 10:41:32 -04:00
Rob Rix
992ef93c0b Git gone. 2017-06-14 17:47:31 -04:00
Rob Rix
7f72974e27 🔥 the summary renderer. 2017-05-17 12:32:17 -04:00
Timothy Clem
f51798e4c8 Turn parseBlob tests back on in new Spec 2017-04-21 14:12:00 -07:00
Timothy Clem
19e87dd523 Put both diff and parse rendering back together 2017-04-20 15:13:28 -07:00
Timothy Clem
389bfaf220 WIP - new renderer achitecture 2017-04-20 11:00:02 -07:00
Timothy Clem
8eb4d436e0 s/Semantic/SemanticCmdLine 2017-04-19 14:22:24 -07:00
Timothy Clem
3704773965 Merge remote-tracking branch 'origin/master' into subparsers 2017-04-12 12:55:11 -07:00
Timothy Clem
6e3af1b75f SemanticDiff.hs => Semantic.hs and smoke test specs 2017-04-10 17:10:34 -07:00
Rob Rix
35fb87c1f9 Merge branch 'master' into syntax-a-la-carte 2017-04-10 11:29:28 -04:00
Rob Rix
a151a24885 What the efff, apparently. 2017-04-10 11:27:26 -04:00
Rob Rix
5349354910 Merge branch 'master' into what-the-hspec 2017-04-08 10:30:22 -04:00
Rob Rix
8e0fa11fff Merge branch 'master' into syntax-a-la-carte 2017-04-07 12:41:12 -04:00
Rob Rix
00b3106933 Combine output stats for all specs 2017-04-07 12:24:57 -04:00
Rob Rix
76240b1d67 Refocus the existing assignment specs. 2017-04-07 12:21:45 -04:00
Rob Rix
83d0248500 Stub in a module for tests of Ruby syntax assignment. 2017-04-06 10:09:12 -04:00
Rob Rix
7b6bf4f42b Stub in a spec. 2017-04-05 11:10:23 -04:00
Rob Rix
1fbe6a8319 Rename ParseCommand to Command.Parse. 2017-03-31 11:50:36 -04:00
Rob Rix
32b9dd9f16 Rename DiffCommand to Command.Diff. 2017-03-31 11:48:21 -04:00
Rick Winfrey
eaa5873ed7 Merge branch 'master' into gitmon-support 2017-03-27 15:38:18 -07:00
Rick Winfrey
9cf176a37d GitmonClient spec should not run in parallel 2017-03-21 14:48:47 -07:00
Rob Rix
093f3b9508 Stub in a spec for Myers’ algorithm. 2017-03-20 11:25:58 -04:00
Timothy Clem
32809f158a Merge remote-tracking branch 'origin/master' into gitmon-support 2017-03-06 07:32:05 -08:00
Rick Winfrey
0954699b12 Add happy path GitmonClient spec 2017-03-01 14:11:16 -08:00
Timothy Clem
bfe1181acb Move Diff and Source Specs 2017-02-28 15:35:43 -08:00
Timothy Clem
4c3feecc77 Add ParseCommandSpec to validate parse output 2017-02-28 15:32:04 -08:00
Timothy Clem
1d9436bb14 Collapse all these tests into DiffCommandSpec 2017-02-28 15:00:56 -08:00
Timothy Clem
a478b10593 Test that all output formats do product output 2017-02-28 14:55:57 -08:00
Timothy Clem
dcfdcf78d3 Fold DiffSummary into Renderer.Summary 2017-02-28 14:09:57 -08:00
Timothy Clem
980b6c95bc First pass at full stack specs 2017-02-24 16:46:22 -08:00
Timothy Clem
02c2a7aac9 Remove corpus specs and fixtures entirely 2017-02-23 09:19:30 -08:00
Timothy Clem
97029a6c47 Better spec names 2017-02-22 20:06:05 -08:00
Timothy Clem
52e4dd435a Test expression output (based on corpus spec strategy) 2017-02-22 08:34:31 -08:00
Timothy Clem
1facca0b50 Add failing toc summary test and refactor removeDupes 2017-02-14 11:29:24 -08:00
Rob Rix
5c17ab5149 Restore AlignmentSpec to its former “glory.” 2017-02-13 12:17:46 -05:00
Rob Rix
0f0e65043e Give up and disable AlignmentSpec. 2017-02-09 16:45:11 -05:00
Rob Rix
8d5bc01a75 Run the Source spec. 2016-09-13 11:39:05 -04:00
Rob Rix
2b34916554 Build and run RangeSpec 😔 2016-09-13 11:18:38 -04:00
Rob Rix
b03f1d3b91 Stub in a spec function. 2016-07-26 03:58:14 -04:00
Rob Rix
4f967e0e1a 🔥 Data.OrderedMap. 2016-07-12 23:27:20 -04:00
Rob Rix
b4107426de Stub in a spec for Diff. 2016-06-27 13:12:06 -04:00
Rob Rix
1170bfdcb2 Rename Data.Gram to Data.RandomWalkSimilarity. 2016-06-22 17:59:28 -04:00
Rob Rix
cc8fcb926e Include the Gram spec. 2016-06-22 10:45:43 -04:00
Rob Rix
d5e807257e Hush, hlint. 2016-06-22 10:43:02 -04:00
Rob Rix
de6d7edec2 Merge branch 'master' into cofree-and-bifunctors-sitting-in-a-tree-a-l-i-g-n-edly
# Conflicts:
#	semantic-diff.cabal
#	src/Alignment.hs
#	src/Control/Comonad/Cofree.hs
#	src/Data/Adjoined.hs
#	src/Diffing.hs
#	src/Interpreter.hs
#	src/Prologue.hs
#	src/Renderer/JSON.hs
#	src/Renderer/Patch.hs
#	src/Renderer/Split.hs
#	src/SplitDiff.hs
#	src/Term.hs
#	test/AlignmentSpec.hs
#	test/ArbitraryTerm.hs
#	test/PatchOutputSpec.hs
2016-05-27 09:35:26 -04:00
Rob Rix
cfe15a5afa Merge branch 'master' into cofree-and-bifunctors-sitting-in-a-tree-a-l-i-g-n-edly
# Conflicts:
#	src/Alignment.hs
#	src/Control/Comonad/Cofree.hs
#	src/Data/Adjoined.hs
#	src/Data/Align.hs
#	src/Data/Bifunctor/These.hs
#	src/Data/Coalescent.hs
#	src/Data/Copointed.hs
#	src/Data/Functor/Both.hs
#	src/Data/Option.hs
#	src/Line.hs
#	src/Patch.hs
#	src/Range.hs
#	src/Renderer/JSON.hs
#	src/Renderer/Patch.hs
#	src/Renderer/Split.hs
#	src/SplitDiff.hs
#	stack.yaml
#	test/AlignmentSpec.hs
#	test/CorpusSpec.hs
#	test/Data/Adjoined/Spec.hs
#	test/Data/Functor/Both/Spec.hs
2016-05-26 15:25:45 -04:00
joshvera
473ec980b1 Merge remote-tracking branch 'origin/master' into diff-summaries 2016-05-26 13:40:54 -04:00
joshvera
ed144bbb1f Fix tests 2016-05-26 13:11:34 -04:00
joshvera
4d6427a24e Stub some tests 2016-05-17 13:09:14 -04:00
Rob Rix
6829c6baab 🔥 Data.Adjoined.Spec. 2016-04-14 21:54:25 -04:00
Rob Rix
1972e20233 🔥 Data.Functor.Both.Spec. 2016-04-14 21:54:11 -04:00
Rob Rix
b3bb9e2c3e Test that Both coalesces when both sides coalesce. 2016-03-15 10:50:13 -04:00
Rob Rix
322e56dd68 Run the Data.Adjoined spec. 2016-03-11 09:49:03 -05:00
Rob Rix
d6fb451ebd Rename SplitSpec to AlignmentSpec. 2016-02-28 14:05:19 -05:00
Matt Diephouse
f09676d6b4 Do ALL the tests in parallel 2016-02-17 17:44:37 -05:00
Matt Diephouse
ac053940fe Add a spec for on-disk tests 2016-02-16 12:33:41 -05:00
Rob Rix
924087d59a Manual spec inclusion. 2016-01-05 11:27:37 -05:00
Josh Vera
a124943822 Update Spec.hs 2015-12-17 13:35:18 -05:00
joshvera
0223de4145 Enable autodiscovery of tests
Also splits up tests into different specs
2015-12-17 13:08:47 -05:00
Rob Rix
b4bfac45ce Correct the tests. 2015-12-16 23:27:00 -05:00
joshvera
fe38ebe548 Test unicode equivalent terms are replacements 2015-12-16 14:18:09 -05:00
joshvera
c71c9fd4fd Write out code points in test 2015-12-16 13:09:07 -05:00
joshvera
b4fb04fccc Test equivalent precomposed/decomposed unicode is not equal 2015-12-16 11:58:52 -05:00
Rob Rix
26400a24a8 Import & run the OrderedMapSpec spec. 2015-12-14 17:49:40 -05:00
Rob Rix
40f6df8b5d Merge branch 'master' into ordered-map 2015-12-14 17:35:08 -05:00
Josh Vera
6850b402d4 Merge pull request #326 from github/post-process-leaf-nodes-in-terms
Post process leaf nodes in terms
2015-12-14 17:20:16 -05:00