summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2018-04-09 19:22:14 +0100
committerGitHub <noreply@github.com>2018-04-09 19:22:14 +0100
commit697fd4ac75ac8a134d0e7e2f98898122982c41f8 (patch)
tree0f97cce26a6fa71d228422453cd4975aa8fc7800 /test
parent719b790574b6aeb4fc3c956dfbcffa3c3987a668 (diff)
parent49c4bfde148dfb4925c79a2e93eb04311afcc904 (diff)
downloadale-697fd4ac75ac8a134d0e7e2f98898122982c41f8.zip
Merge pull request #1488 from languitar/pmd
Add support for the java PMD linter
Diffstat (limited to 'test')
-rw-r--r--test/handler/test_pmd_handler.vader27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/handler/test_pmd_handler.vader b/test/handler/test_pmd_handler.vader
new file mode 100644
index 00000000..0c95fb2a
--- /dev/null
+++ b/test/handler/test_pmd_handler.vader
@@ -0,0 +1,27 @@
+Before:
+ runtime ale_linters/java/pmd.vim
+
+After:
+ call ale#linter#Reset()
+
+Execute(The pmd handler should parse lines correctly):
+ AssertEqual
+ \ [
+ \ {
+ \ 'lnum': 18,
+ \ 'text': 'Each class should declare at least one constructor',
+ \ 'code': 'Code Style - AtLeastOneConstructor',
+ \ 'type': 'W',
+ \ },
+ \ {
+ \ 'lnum': 36,
+ \ 'text': 'Local variable ''node'' could be declared final',
+ \ 'code': 'Code Style - LocalVariableCouldBeFinal',
+ \ 'type': 'W',
+ \ },
+ \ ],
+ \ ale_linters#java#pmd#Handle(666, [
+ \ '"Problem","Package","File","Priority","Line","Description","Rule set","Rule"',
+ \ '"1","rsb.performance.test.ros","/home/languitar/src/rsb-performance-test-api-ros/src/main/java/rsb/performance/test/ros/NodeHolder.java","3","18","Each class should declare at least one constructor","Code Style","AtLeastOneConstructor"',
+ \ '"2","rsb.performance.test.ros","/home/languitar/src/rsb-performance-test-api-ros/src/main/java/rsb/performance/test/ros/NodeHolder.java","1","36","Local variable ''node'' could be declared final","Code Style","LocalVariableCouldBeFinal"'
+ \ ])