diff --git a/README.md b/README.md index 60d7998..9aba356 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,7 @@ jobs: - Kotlin - Less - Markdown +- Nix - Objective-C - Org Mode - PHP diff --git a/syntax.json b/syntax.json index 72a206a..a9c29da 100644 --- a/syntax.json +++ b/syntax.json @@ -667,5 +667,21 @@ "pattern": ";;" } ] + }, + { + "language": "Nix", + "markers": [ + { + "type": "line", + "pattern": "#" + }, + { + "type": "block", + "pattern": { + "start": "/\\*", + "end": "\\*/" + } + } + ] } ] diff --git a/tests/test_closed.diff b/tests/test_closed.diff index 8ba6083..d3fafd8 100644 --- a/tests/test_closed.diff +++ b/tests/test_closed.diff @@ -307,3 +307,19 @@ index 0000000..525e25d 100644 - -# TODO Play the level music -export: var music_path: String +diff --git a/tests/example.nix b/tests/example.nix +index a6c6cb0..25d195f 100644 +--- a/tests/example.nix ++++ b/tests/example.nix +@@ -1,11 +1,7 @@ + { +- # TODO add missing devices + stdDeviceList = [ + "treads" + "grabber" + ]; +- /* +- TODO add missing c +- */ + sum = a: b: a + b; + } diff --git a/tests/test_new.diff b/tests/test_new.diff index 5fe515e..daa40a0 100644 --- a/tests/test_new.diff +++ b/tests/test_new.diff @@ -331,3 +331,20 @@ index 0000000..525e25d + +# TODO Play the level music +export: var music_path: String +diff --git a/tests/example.nix b/tests/example.nix +new file mode 100644 +index 0000000..a6c6cb0 +--- /dev/null ++++ b/tests/example.nix +@@ -0,0 +1,11 @@ ++{ ++ # TODO add missing devices ++ stdDeviceList = [ ++ "treads" ++ "grabber" ++ ]; ++ /* ++ TODO add missing c ++ */ ++ sum = a: b: a + b; ++} diff --git a/tests/test_todo_parser.py b/tests/test_todo_parser.py index 3d90a24..ff04620 100644 --- a/tests/test_todo_parser.py +++ b/tests/test_todo_parser.py @@ -79,6 +79,8 @@ class NewIssueTests(unittest.TestCase): def test_clojure_issues(self): self.assertEqual(count_issues_for_file_type(self.raw_issues, 'clojure'), 2) + def test_nix_issues(self): + self.assertEqual(count_issues_for_file_type(self.raw_issues, 'nix'), 2) class ClosedIssueTests(unittest.TestCase): # Check for removed TODOs across the files specified. @@ -147,6 +149,9 @@ class ClosedIssueTests(unittest.TestCase): def test_clojure_issues(self): self.assertEqual(count_issues_for_file_type(self.raw_issues, 'clojure'), 2) + def test_nix_issues(self): + self.assertEqual(count_issues_for_file_type(self.raw_issues, 'nix'), 2) + class IgnorePatternTests(unittest.TestCase):