diff --git a/README.md b/README.md index a301e81..d3bbcdc 100644 --- a/README.md +++ b/README.md @@ -173,6 +173,7 @@ Only a single milestone can be specified. If the milestone does not exist, it wi - Scala - SCSS - Shell +- Solidity - SQL - Starlark - Swift diff --git a/syntax.json b/syntax.json index d179da4..a4a7f95 100644 --- a/syntax.json +++ b/syntax.json @@ -853,5 +853,21 @@ } } ] + }, + { + "language": "Solidity", + "markers": [ + { + "type": "line", + "pattern": "///?" + }, + { + "type": "block", + "pattern": { + "start": "/\\*", + "end": "\\*/" + } + } + ] } ] diff --git a/tests/test_closed.diff b/tests/test_closed.diff index 1b1a6cb..e1104a1 100644 --- a/tests/test_closed.diff +++ b/tests/test_closed.diff @@ -500,3 +500,29 @@ index 0000000..0ce9b1a - labels: urgent ---]] -local b = 2 +diff --git a/tests/Counter.sol b/tests/Counter.sol +new file mode 100644 +index 0000000..d340f6a +--- a/src/Counter.sol ++++ b/src/Counter.sol +@@ -0,0 +1,20 @@ +-contract Counter { +- // TODO: Test this +- // Do it +- // labels: urgent + +- /// TODO: Natspec comment +- /// Do it +- /// labels: urgent +- +- /* +- TODO: Test this too +- Do it ASAP +- labels: urgent +- */ + +- /** +- * TODO: And this too +- * labels: urgent +- */ +-} diff --git a/tests/test_new.diff b/tests/test_new.diff index db2273e..d50bd0a 100644 --- a/tests/test_new.diff +++ b/tests/test_new.diff @@ -556,3 +556,29 @@ index 0000000..0ce9b1a + labels: urgent +--]] +local b = 2 +diff --git a/tests/Counter.sol b/tests/Counter.sol +new file mode 100644 +index 0000000..d340f6a +--- /dev/null ++++ b/src/Counter.sol +@@ -0,0 +1,20 @@ ++contract Counter { ++ // TODO: Test this ++ // Do it ++ // labels: urgent + ++ /// TODO: Natspec comment ++ /// Do it ++ /// labels: urgent ++ ++ /* ++ TODO: Test this too ++ Do it ASAP ++ labels: urgent ++ */ + ++ /** ++ * TODO: And this too ++ * labels: urgent ++ */ ++} diff --git a/tests/test_todo_parser.py b/tests/test_todo_parser.py index 705e764..388e4be 100644 --- a/tests/test_todo_parser.py +++ b/tests/test_todo_parser.py @@ -65,7 +65,7 @@ class NewIssueTests(unittest.TestCase): self.assertEqual(count_issues_for_file_type(self.raw_issues, 'handlebars'), 2) def test_org_issues(self): - self.assertEqual(count_issues_for_file_type(self.raw_issues, 'text'), 8) + self.assertEqual(count_issues_for_file_type(self.raw_issues, 'text'), 12) def test_scss_issues(self): self.assertEqual(count_issues_for_file_type(self.raw_issues, 'scss'), 2) @@ -103,7 +103,7 @@ class NewIssueTests(unittest.TestCase): def test_lua_issues(self): self.assertEqual(count_issues_for_file_type(self.raw_issues, 'lua'), 2) -class ClosedIssueTests(unittest.TestCase): +class ClosedIssueTest(unittest.TestCase): # Check for removed TODOs across the files specified. def setUp(self): diff_file = open('tests/test_closed.diff', 'r') @@ -155,7 +155,7 @@ class ClosedIssueTests(unittest.TestCase): self.assertEqual(count_issues_for_file_type(self.raw_issues, 'handlebars'), 2) def test_org_issues(self): - self.assertEqual(count_issues_for_file_type(self.raw_issues, 'text'), 8) + self.assertEqual(count_issues_for_file_type(self.raw_issues, 'text'), 12) def test_scss_issues(self): self.assertEqual(count_issues_for_file_type(self.raw_issues, 'scss'), 2) @@ -183,7 +183,7 @@ class ClosedIssueTests(unittest.TestCase): def test_xaml_issues(self): self.assertEqual(count_issues_for_file_type(self.raw_issues, 'xml'), 2) - + def test_c_cpp_like_issues(self): self.assertEqual(count_issues_for_file_type(self.raw_issues, 'c_cpp'), 2) @@ -193,7 +193,6 @@ class ClosedIssueTests(unittest.TestCase): def test_lua_issues(self): self.assertEqual(count_issues_for_file_type(self.raw_issues, 'lua'), 2) - class IgnorePatternTests(unittest.TestCase): def test_single_ignore(self):