]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/ale/test/handler/test_pmd_handler.vader

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge commit '294584081929424aec883f90c7d6515b3743358d' as '.vim/bundle/vim-lsp-ale'
[etc/vim.git] / .vim / bundle / ale / test / handler / test_pmd_handler.vader
1 Before:
2   runtime ale_linters/java/pmd.vim
3
4 After:
5   call ale#linter#Reset()
6
7 Execute(The pmd handler should parse lines correctly):
8   AssertEqual
9   \ [
10   \   {
11   \     'lnum': 18,
12   \     'text': 'Each class should declare at least one constructor',
13   \     'code': 'Code Style - AtLeastOneConstructor',
14   \     'type': 'W',
15   \   },
16   \   {
17   \     'lnum': 36,
18   \     'text': 'Local variable ''node'' could be declared final',
19   \     'code': 'Code Style - LocalVariableCouldBeFinal',
20   \     'type': 'W',
21   \   },
22   \ ],
23   \ ale_linters#java#pmd#Handle(666, [
24   \    '"Problem","Package","File","Priority","Line","Description","Rule set","Rule"',
25   \    '"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"',
26   \    '"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"'
27   \ ])
28
29 Execute(The pmd handler should parse lines correctly for java files that use unnamed packages):
30   AssertEqual
31   \ [
32   \   {
33   \     'lnum': 8,
34   \     'text': 'Avoid unused local variables such as ''stest''.',
35   \     'code': 'Best Practices - UnusedLocalVariable',
36   \     'type': 'W',
37   \   },
38   \ ],
39   \ ale_linters#java#pmd#Handle(666, [
40   \    '"Problem","Package","File","Priority","Line","Description","Rule set","Rule"',
41   \    '"1","","/Users/diego/Projects/github.com/dlresende/kata-fizz-buzz/src/main/java/App.java","3","8","Avoid unused local variables such as ''stest''.","Best Practices","UnusedLocalVariable"'
42   \ ])