From f6ff32665a038debd01a67541bc5763a569a9505 Mon Sep 17 00:00:00 2001 From: Ondrej Sebek Date: Thu, 30 Jun 2022 20:48:38 +0200 Subject: [PATCH 1/2] Add Haskell support --- README.md | 1 + syntax.json | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/README.md b/README.md index 0b021b9..d79ff05 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ There are additional inputs if you want to be able to assign issues to projects. * Go * Handlebars * HCL +* Haskell * HTML * Java * JavaScript diff --git a/syntax.json b/syntax.json index 70c6424..fbdb5f3 100644 --- a/syntax.json +++ b/syntax.json @@ -323,6 +323,22 @@ } ] }, + { + "language": "Haskell", + "markers": [ + { + "type": "line", + "pattern": "--" + }, + { + "type": "block", + "pattern": { + "start": "{-", + "end": "-}" + } + } + ] + }, { "language": "HTML", "markers": [ From eb70416bed5de84845a0223d684f8ca7d1e954fe Mon Sep 17 00:00:00 2001 From: Ondrej Sebek Date: Thu, 30 Jun 2022 21:08:48 +0200 Subject: [PATCH 2/2] Test Haskell new issue --- tests/test_new.diff | 20 ++++++++++++++++++++ tests/test_todo_parser.py | 2 ++ 2 files changed, 22 insertions(+) diff --git a/tests/test_new.diff b/tests/test_new.diff index 7aa01e1..c1c81d6 100644 --- a/tests/test_new.diff +++ b/tests/test_new.diff @@ -78,6 +78,26 @@ index 0000000..525e25d + ''' + pass \ No newline at end of file +diff --git a/src/Swarm/Game/example.hs b/src/Swarm/Game/example.hs +new file mode 100644 +index 0000000..0ce9b1a +--- /dev/null ++++ b/src/Swarm/Game/example.hs +@@ -0,0 +1,14 @@ ++-- | Standard devices that are always installed. ++-- ++-- TODO: Remove standard devices ++-- In the future, make a way to build these and just start the base ++-- out with a large supply of each? ++-- labels: redesign ++stdDeviceList = ++ ["treads", "grabber", "solar panel", "scanner", "plasma cutter"] ++ ++{- | Very complicated function. ++ ++TODO: Create an issue for TODO ++-} ++sum a b = a + b diff --git a/tests/example_file.cr b/tests/example_file.cr new file mode 100644 index 0000000..e6da2ec diff --git a/tests/test_todo_parser.py b/tests/test_todo_parser.py index 4dec87a..a647c3e 100644 --- a/tests/test_todo_parser.py +++ b/tests/test_todo_parser.py @@ -70,6 +70,8 @@ class NewIssueTests(unittest.TestCase): def test_r_issues(self): self.assertEqual(count_issues_for_file_type(self.raw_issues, 'r'), 2) + def test_haskell_issues(self): + self.assertEqual(count_issues_for_file_type(self.raw_issues, 'haskell'), 2) class ClosedIssueTests(unittest.TestCase): # Check for removed TODOs across the files specified.