Skip to content

Commit 72b214f

Browse files
committed
test: add Java view case
Signed-off-by: Joseph Kato <joseph@jdkato.io>
1 parent 27161c8 commit 72b214f

File tree

4 files changed

+25
-0
lines changed

4 files changed

+25
-0
lines changed

testdata/features/views.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Feature: Views
1818
github-workflow.json:494:264:Vale.Spelling:Did you really mean 'prereleased'?
1919
github-workflow.json:568:83:Vale.Spelling:Did you really mean 'job_id'?
2020
github-workflow.json:652:83:Vale.Spelling:Did you really mean 'job_id'?
21+
test.java:13:38:vale.Annotations:'XXX' left in text
2122
test.py:1:3:vale.Annotations:'FIXME' left in text
2223
test.py:11:3:vale.Annotations:'XXX' left in text
2324
test.py:13:16:vale.Annotations:'XXX' left in text

testdata/fixtures/views/.vale.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ BasedOnStyles = Vale
99

1010
View = GitHubActions
1111

12+
[*.java]
13+
vale.Annotations = YES
14+
15+
View = Strings
16+
1217
[*.py]
1318
vale.Annotations = YES
1419

testdata/fixtures/views/test.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// XXX: This is an annotation
2+
// And this uses too many weasel words like obviously and very.
3+
4+
/*
5+
* This is a multi-line comment.
6+
* It can span across several lines.
7+
* All text within these delimiters is ignored.
8+
*
9+
* TODO: Refactor this code to improve readability.x
10+
*/
11+
public class HelloWorld {
12+
public static void main(String[] args) {
13+
System.out.println("Hello World, XXX!");
14+
}
15+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
engine: tree-sitter
2+
scopes:
3+
- expr: (string_literal)+ @string
4+
name: java

0 commit comments

Comments
 (0)