Merge pull request #100 from jonrkarr/patch-1

Add marker patterns for SCSS
This commit is contained in:
Alastair Mooney 2022-01-20 13:18:38 +00:00 committed by GitHub
commit ae0016508a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 55 additions and 2 deletions

View File

@ -549,5 +549,21 @@
}
}
]
},
{
"language": "SCSS",
"markers" : [
{
"type": "line",
"pattern": "//"
},
{
"type": "block",
"pattern": {
"start": "/\\*",
"end": "\\*/"
}
}
]
}
]

View File

@ -168,3 +168,19 @@ index 0000000..7cccc5b
- also need to be turned into todos, and hopefully
- kept together as one todo
- #+end_comment
diff --git a/tests/example_file.scss b/tests/example_file.scss
index 525e25d..ba4e68d 100644
--- a/tests/example_file.scss
+++ b/tests/example_file.scss
@@ -1,11 +0,0 @@
-// TODO: Hopefully this comment turns into a todo issue
-.my-class {
- font-weight: bold;
- .my-second-class {
- /* TODO: Multiline comments
- * also need to be turned into todos, and hopefully
- * kept together as one todo
- */
- text-align: center;
- }
-}

View File

@ -174,5 +174,20 @@ index 0000000..7cccc5b
+ also need to be turned into todos, and hopefully
+ kept together as one todo
+ #+end_comment
diff --git a/tests/example_file.scss b/src/tests/example_file.scss
new file mode 100644
index 0000000..7cccc5b
--- /dev/null
+++ b/src/tests/example_file.scss
@@ -0,0 +1,11 @@
+// TODO: Hopefully this comment turns into a todo issue
+.my-class {
+ font-weight: bold;
+ .my-second-class {
+ /* TODO: Multiline comments
+ * also need to be turned into todos, and hopefully
+ * kept together as one todo
+ */
+ text-align: center;
+ }
+}

View File

@ -57,6 +57,9 @@ class NewIssueTests(unittest.TestCase):
def test_org_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'text'), 2)
def test_scss_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'scss'), 2)
class ClosedIssueTests(unittest.TestCase):
# Check for removed TODOs across the files specified.
def setUp(self):
@ -102,6 +105,9 @@ class ClosedIssueTests(unittest.TestCase):
def test_org_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'text'), 2)
def test_scss_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'scss'), 2)
class IgnorePatternTests(unittest.TestCase):