1
1
mirror of https://github.com/github/semantic.git synced 2024-12-28 17:32:05 +03:00

🔥 redundant variables and imports.

This commit is contained in:
Rob Rix 2017-06-14 23:20:12 -04:00
parent 83f8612c35
commit a815960132

View File

@ -3,15 +3,11 @@ module CommandSpec where
import Command
import Data.Aeson
import Data.Functor.Both as Both
import Data.Map as Map
import Data.Maybe
import Data.String
import Language
import Prologue hiding (readFile, toList)
import Renderer hiding (errors)
import Source
import Semantic
import Semantic.Task
import Test.Hspec hiding (shouldBe, shouldNotBe, shouldThrow, errorCall)
import Test.Hspec.Expectations.Pretty
@ -79,13 +75,7 @@ spec = parallel $ do
h <- openFile "test/fixtures/input/blank.json" ReadMode
runCommand (readBlobsFromHandle h) `shouldThrow` (== ExitFailure 1)
where repoPath = "test/fixtures/git/examples/all-languages.git"
methodsFixture = Fixture
(both "dfac8fd681b0749af137aebf3203e77a06fbafc2" "2e4144eb8c44f007463ec34cb66353f0041161fe")
[ both (emptySourceBlob "methods.rb") methodsBlob ]
methodsBlob = SourceBlob (Source "def foo\nend\n") "ff7bbbe9495f61d9e1e58c597502d152bab1761e" "methods.rb" (Just defaultPlainBlob) (Just Ruby)
methodsObject = object [ "span" .= object [ "start" .= [ 1, 1 :: Int ], "end" .= [ 2, 4 :: Int ] ], "category" .= ("Method" :: Text), "term" .= ("foo" :: Text), "changeType" .= ("added" :: Text) ]
blobsFromFilePath path = do
where blobsFromFilePath path = do
h <- openFile path ReadMode
blobs <- runCommand (readBlobPairsFromHandle h)
pure blobs