{"action":"created","comment":{"url":"https://api.github.com/repos/checkstyle/checkstyle/pulls/comments/135400771","pull_request_review_id":58812398,"id":135400771,"diff_hunk":"@@ -311,6 +314,69 @@ public void testWrongSingletonTagInJavadoc() throws Exception {\n                 expected);\n     }\n \n+    @Test\n+    public void testNonTightHtmlTagIntolerantCheck() throws Exception {\n+        NonTightHtmlTagIntolerantCheck.visitJavadocTokenMethodCallCount = 0;\n+        final DefaultConfiguration checkConfig =\n+                createModuleConfig(NonTightHtmlTagIntolerantCheck.class);\n+        checkConfig.addAttribute(\"violateExecutionOnNonTightHtml\", \"true\");\n+        final String[] expected = {\n+            \"6: \" + getCheckMessage(MSG_UNCLOSED_HTML, \"p\"),\n+            \"13: \" + getCheckMessage(MSG_UNCLOSED_HTML, \"p\"),\n+            \"16: \" + getCheckMessage(MSG_UNCLOSED_HTML, \"li\"),\n+            \"21: \" + getCheckMessage(MSG_UNCLOSED_HTML, \"p\"),\n+            \"27: \" + getCheckMessage(MSG_UNCLOSED_HTML, \"tr\"),\n+            \"34: \" + getCheckMessage(MSG_UNCLOSED_HTML, \"li\"),\n+            \"54: \" + getCheckMessage(MSG_UNCLOSED_HTML, \"li\"),\n+            \"71: \" + getCheckMessage(MSG_UNCLOSED_HTML, \"p\"),\n+            \"80: \" + getCheckMessage(MSG_UNCLOSED_HTML, \"tr\"),\n+            \"124: \" + getCheckMessage(MSG_UNCLOSED_HTML, \"p\"),\n+        };\n+        verify(checkConfig, getPath(\"InputAbstractJavadocNonTightHtmlTags.java\"), expected);\n+    }\n+\n+    @Test\n+    public void testNonTightHtmlTagIntolerantCheckReportingNoViolation() throws Exception {\n+        NonTightHtmlTagIntolerantCheck.visitJavadocTokenMethodCallCount = 0;\n+        final DefaultConfiguration checkConfig =\n+                createModuleConfig(NonTightHtmlTagIntolerantCheck.class);\n+        final String[] expected = CommonUtils.EMPTY_STRING_ARRAY;\n+        verify(checkConfig, getPath(\"InputAbstractJavadocNonTightHtmlTags.java\"), expected);\n+    }\n+\n+    @Test\n+    public void testNonTightHtmlTagIntolerantCheckVisitCount()\n+            throws Exception {\n+        NonTightHtmlTagIntolerantCheck.visitJavadocTokenMethodCallCount = 0;\n+        final DefaultConfiguration checkConfig =\n+                createModuleConfig(NonTightHtmlTagIntolerantCheck.class);\n+        final File testFile = new File(getPath(\"InputAbstractJavadocNonTightHtmlTags.java\"));\n+        final List<File> fileList = new ArrayList<>();\n+        fileList.add(testFile);\n+        final Checker checker = createChecker(checkConfig);\n+        checker.process(fileList);\n+        assertEquals(\"Please ensure that method 'visitJavadocToken' is not called \"\n+                        + \"more than thrice.\",\n+                5, NonTightHtmlTagIntolerantCheck.visitJavadocTokenMethodCallCount);\n+    }\n+\n+    @Test\n+    public void testVisitCountForCheckAcceptingJavadocWithNonTightHtml()\n+            throws Exception {\n+        NonTightHtmlTagTolerantCheck.visitJavadocTokenMethodCallCount = 0;\n+        final DefaultConfiguration checkConfig =\n+                createModuleConfig(NonTightHtmlTagTolerantCheck.class);\n+        checkConfig.addAttribute(\"violateExecutionOnNonTightHtml\", \"true\");\n+        final File testFile = new File(getPath(\"InputAbstractJavadocNonTightHtmlTags2.java\"));\n+        final List<File> fileList = new ArrayList<>();\n+        fileList.add(testFile);\n+        final Checker checker = createChecker(checkConfig);\n+        checker.process(fileList);","path":"src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/AbstractJavadocCheckTest.java","position":82,"original_position":85,"commit_id":"159eafb03b2620c7b3b1002d7533a7371e232289","original_commit_id":"4a06983524199a35fd4a9df0e5587b66115b6618","user":{"login":"ps-sp","id":24826492,"avatar_url":"https://avatars3.githubusercontent.com/u/24826492?v=4","gravatar_id":"","url":"https://api.github.com/users/ps-sp","html_url":"https://github.com/ps-sp","followers_url":"https://api.github.com/users/ps-sp/followers","following_url":"https://api.github.com/users/ps-sp/following{/other_user}","gists_url":"https://api.github.com/users/ps-sp/gists{/gist_id}","starred_url":"https://api.github.com/users/ps-sp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ps-sp/subscriptions","organizations_url":"https://api.github.com/users/ps-sp/orgs","repos_url":"https://api.github.com/users/ps-sp/repos","events_url":"https://api.github.com/users/ps-sp/events{/privacy}","received_events_url":"https://api.github.com/users/ps-sp/received_events","type":"User","site_admin":false},"body":"@romani Please address the following two things.\r\n\r\n1) What `message key` should we use to log violation for `test checks` that are not designed to log violations ? We of course can not create a message key for testing purposed. Say we design the `test check` to actually check something and log violations for it or we make javadoc wrong so that we can somehow use an exisiting key to log violations just so that we can indirectly assert method call count, wouldn't this make the test misleading  ?\r\n\r\n2) We want to verify calls to `visitJavadocToken`. If we do that indirectly by using `verify` we mix violations with method call count. Would that be good ?","created_at":"2017-08-27T01:15:58Z","updated_at":"2017-08-27T01:15:58Z","html_url":"https://github.com/checkstyle/checkstyle/pull/4751#discussion_r135400771","pull_request_url":"https://api.github.com/repos/checkstyle/checkstyle/pulls/4751","_links":{"self":{"href":"https://api.github.com/repos/checkstyle/checkstyle/pulls/comments/135400771"},"html":{"href":"https://github.com/checkstyle/checkstyle/pull/4751#discussion_r135400771"},"pull_request":{"href":"https://api.github.com/repos/checkstyle/checkstyle/pulls/4751"}},"in_reply_to_id":135247472},"pull_request":{"url":"https://api.github.com/repos/checkstyle/checkstyle/pulls/4751","id":130990233,"html_url":"https://github.com/checkstyle/checkstyle/pull/4751","diff_url":"https://github.com/checkstyle/checkstyle/pull/4751.diff","patch_url":"https://github.com/checkstyle/checkstyle/pull/4751.patch","issue_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/4751","number":4751,"state":"open","locked":false,"title":"Issue #3311: Boolean indicator in AbstractJavadocCheck for decision regarding processing javadoc with unclosed HTML tags","user":{"login":"ps-sp","id":24826492,"avatar_url":"https://avatars3.githubusercontent.com/u/24826492?v=4","gravatar_id":"","url":"https://api.github.com/users/ps-sp","html_url":"https://github.com/ps-sp","followers_url":"https://api.github.com/users/ps-sp/followers","following_url":"https://api.github.com/users/ps-sp/following{/other_user}","gists_url":"https://api.github.com/users/ps-sp/gists{/gist_id}","starred_url":"https://api.github.com/users/ps-sp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ps-sp/subscriptions","organizations_url":"https://api.github.com/users/ps-sp/orgs","repos_url":"https://api.github.com/users/ps-sp/repos","events_url":"https://api.github.com/users/ps-sp/events{/privacy}","received_events_url":"https://api.github.com/users/ps-sp/received_events","type":"User","site_admin":false},"body":"Issue #3311 : Added method doesCheckAcceptJavadocWithUnclosedHtmlTag in AbstractJavadocCheck which can be overridden in extending checks which are not to process javadoc with unclosed HTML tags\r\n\r\n**`<obsolete>`** _I have added another method called `isUnlcosedTag` in `DetailNode` class.\r\n`hasUnclosedTag` would return true whenever the javadoc node or any of its successors at any level is an unclosed HTML tag. `isUnclosedTag` would only return true when the javadoc node itself is an unclosed html tag. This would help user to exactly identify and process a javadoc node which is an unclosed tag in the way he/she wants to. And if a user wants to skip an entire portion of the tree having unclosed tags with in it then he/she can just use `hasUnclosedTag` rather than `isUnclosedTag`._\r\n\r\n_If it is undesirable to have `isUnclosedTag` then it can be removed._ **`</obsolete>`**\r\n\r\nAlso, since this is not a grammar change I do not think ANTLR regression would be necessary. I think that regression with a javadoc check and a non-javadoc check should suffice, please let me know if you agree.","created_at":"2017-07-18T02:27:10Z","updated_at":"2017-08-27T01:15:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ce682be0ced8d8d3e992648fe4af3000ea117d77","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/checkstyle/checkstyle/pulls/4751/commits","review_comments_url":"https://api.github.com/repos/checkstyle/checkstyle/pulls/4751/comments","review_comment_url":"https://api.github.com/repos/checkstyle/checkstyle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/4751/comments","statuses_url":"https://api.github.com/repos/checkstyle/checkstyle/statuses/159eafb03b2620c7b3b1002d7533a7371e232289","head":{"label":"ps-sp:issue_3311","ref":"issue_3311","sha":"159eafb03b2620c7b3b1002d7533a7371e232289","user":{"login":"ps-sp","id":24826492,"avatar_url":"https://avatars3.githubusercontent.com/u/24826492?v=4","gravatar_id":"","url":"https://api.github.com/users/ps-sp","html_url":"https://github.com/ps-sp","followers_url":"https://api.github.com/users/ps-sp/followers","following_url":"https://api.github.com/users/ps-sp/following{/other_user}","gists_url":"https://api.github.com/users/ps-sp/gists{/gist_id}","starred_url":"https://api.github.com/users/ps-sp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ps-sp/subscriptions","organizations_url":"https://api.github.com/users/ps-sp/orgs","repos_url":"https://api.github.com/users/ps-sp/repos","events_url":"https://api.github.com/users/ps-sp/events{/privacy}","received_events_url":"https://api.github.com/users/ps-sp/received_events","type":"User","site_admin":false},"repo":{"id":83771161,"name":"checkstyle","full_name":"ps-sp/checkstyle","owner":{"login":"ps-sp","id":24826492,"avatar_url":"https://avatars3.githubusercontent.com/u/24826492?v=4","gravatar_id":"","url":"https://api.github.com/users/ps-sp","html_url":"https://github.com/ps-sp","followers_url":"https://api.github.com/users/ps-sp/followers","following_url":"https://api.github.com/users/ps-sp/following{/other_user}","gists_url":"https://api.github.com/users/ps-sp/gists{/gist_id}","starred_url":"https://api.github.com/users/ps-sp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ps-sp/subscriptions","organizations_url":"https://api.github.com/users/ps-sp/orgs","repos_url":"https://api.github.com/users/ps-sp/repos","events_url":"https://api.github.com/users/ps-sp/events{/privacy}","received_events_url":"https://api.github.com/users/ps-sp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ps-sp/checkstyle","description":"Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. By default it supports the Google Java Style Guide and Sun Code Conventions, but is highly configurable. It can be invoked with an ANT task and a command line program.","fork":true,"url":"https://api.github.com/repos/ps-sp/checkstyle","forks_url":"https://api.github.com/repos/ps-sp/checkstyle/forks","keys_url":"https://api.github.com/repos/ps-sp/checkstyle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ps-sp/checkstyle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ps-sp/checkstyle/teams","hooks_url":"https://api.github.com/repos/ps-sp/checkstyle/hooks","issue_events_url":"https://api.github.com/repos/ps-sp/checkstyle/issues/events{/number}","events_url":"https://api.github.com/repos/ps-sp/checkstyle/events","assignees_url":"https://api.github.com/repos/ps-sp/checkstyle/assignees{/user}","branches_url":"https://api.github.com/repos/ps-sp/checkstyle/branches{/branch}","tags_url":"https://api.github.com/repos/ps-sp/checkstyle/tags","blobs_url":"https://api.github.com/repos/ps-sp/checkstyle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ps-sp/checkstyle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ps-sp/checkstyle/git/refs{/sha}","trees_url":"https://api.github.com/repos/ps-sp/checkstyle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ps-sp/checkstyle/statuses/{sha}","languages_url":"https://api.github.com/repos/ps-sp/checkstyle/languages","stargazers_url":"https://api.github.com/repos/ps-sp/checkstyle/stargazers","contributors_url":"https://api.github.com/repos/ps-sp/checkstyle/contributors","subscribers_url":"https://api.github.com/repos/ps-sp/checkstyle/subscribers","subscription_url":"https://api.github.com/repos/ps-sp/checkstyle/subscription","commits_url":"https://api.github.com/repos/ps-sp/checkstyle/commits{/sha}","git_commits_url":"https://api.github.com/repos/ps-sp/checkstyle/git/commits{/sha}","comments_url":"https://api.github.com/repos/ps-sp/checkstyle/comments{/number}","issue_comment_url":"https://api.github.com/repos/ps-sp/checkstyle/issues/comments{/number}","contents_url":"https://api.github.com/repos/ps-sp/checkstyle/contents/{+path}","compare_url":"https://api.github.com/repos/ps-sp/checkstyle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ps-sp/checkstyle/merges","archive_url":"https://api.github.com/repos/ps-sp/checkstyle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ps-sp/checkstyle/downloads","issues_url":"https://api.github.com/repos/ps-sp/checkstyle/issues{/number}","pulls_url":"https://api.github.com/repos/ps-sp/checkstyle/pulls{/number}","milestones_url":"https://api.github.com/repos/ps-sp/checkstyle/milestones{/number}","notifications_url":"https://api.github.com/repos/ps-sp/checkstyle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ps-sp/checkstyle/labels{/name}","releases_url":"https://api.github.com/repos/ps-sp/checkstyle/releases{/id}","deployments_url":"https://api.github.com/repos/ps-sp/checkstyle/deployments","created_at":"2017-03-03T07:35:24Z","updated_at":"2017-03-03T07:35:30Z","pushed_at":"2017-08-27T01:08:51Z","git_url":"git://github.com/ps-sp/checkstyle.git","ssh_url":"git@github.com:ps-sp/checkstyle.git","clone_url":"https://github.com/ps-sp/checkstyle.git","svn_url":"https://github.com/ps-sp/checkstyle","homepage":"http://checkstyle.sourceforge.net/","size":53340,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"checkstyle:master","ref":"master","sha":"e3d7e02826b34ad0ff593bb5568c28cd1eabfcaf","user":{"login":"checkstyle","id":5179750,"avatar_url":"https://avatars0.githubusercontent.com/u/5179750?v=4","gravatar_id":"","url":"https://api.github.com/users/checkstyle","html_url":"https://github.com/checkstyle","followers_url":"https://api.github.com/users/checkstyle/followers","following_url":"https://api.github.com/users/checkstyle/following{/other_user}","gists_url":"https://api.github.com/users/checkstyle/gists{/gist_id}","starred_url":"https://api.github.com/users/checkstyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/checkstyle/subscriptions","organizations_url":"https://api.github.com/users/checkstyle/orgs","repos_url":"https://api.github.com/users/checkstyle/repos","events_url":"https://api.github.com/users/checkstyle/events{/privacy}","received_events_url":"https://api.github.com/users/checkstyle/received_events","type":"Organization","site_admin":false},"repo":{"id":12499251,"name":"checkstyle","full_name":"checkstyle/checkstyle","owner":{"login":"checkstyle","id":5179750,"avatar_url":"https://avatars0.githubusercontent.com/u/5179750?v=4","gravatar_id":"","url":"https://api.github.com/users/checkstyle","html_url":"https://github.com/checkstyle","followers_url":"https://api.github.com/users/checkstyle/followers","following_url":"https://api.github.com/users/checkstyle/following{/other_user}","gists_url":"https://api.github.com/users/checkstyle/gists{/gist_id}","starred_url":"https://api.github.com/users/checkstyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/checkstyle/subscriptions","organizations_url":"https://api.github.com/users/checkstyle/orgs","repos_url":"https://api.github.com/users/checkstyle/repos","events_url":"https://api.github.com/users/checkstyle/events{/privacy}","received_events_url":"https://api.github.com/users/checkstyle/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/checkstyle/checkstyle","description":"Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. By default it supports the Google Java Style Guide and Sun Code Conventions, but is highly configurable. It can be invoked with an ANT task and a command line program.","fork":false,"url":"https://api.github.com/repos/checkstyle/checkstyle","forks_url":"https://api.github.com/repos/checkstyle/checkstyle/forks","keys_url":"https://api.github.com/repos/checkstyle/checkstyle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/checkstyle/checkstyle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/checkstyle/checkstyle/teams","hooks_url":"https://api.github.com/repos/checkstyle/checkstyle/hooks","issue_events_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/events{/number}","events_url":"https://api.github.com/repos/checkstyle/checkstyle/events","assignees_url":"https://api.github.com/repos/checkstyle/checkstyle/assignees{/user}","branches_url":"https://api.github.com/repos/checkstyle/checkstyle/branches{/branch}","tags_url":"https://api.github.com/repos/checkstyle/checkstyle/tags","blobs_url":"https://api.github.com/repos/checkstyle/checkstyle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/checkstyle/checkstyle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/checkstyle/checkstyle/git/refs{/sha}","trees_url":"https://api.github.com/repos/checkstyle/checkstyle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/checkstyle/checkstyle/statuses/{sha}","languages_url":"https://api.github.com/repos/checkstyle/checkstyle/languages","stargazers_url":"https://api.github.com/repos/checkstyle/checkstyle/stargazers","contributors_url":"https://api.github.com/repos/checkstyle/checkstyle/contributors","subscribers_url":"https://api.github.com/repos/checkstyle/checkstyle/subscribers","subscription_url":"https://api.github.com/repos/checkstyle/checkstyle/subscription","commits_url":"https://api.github.com/repos/checkstyle/checkstyle/commits{/sha}","git_commits_url":"https://api.github.com/repos/checkstyle/checkstyle/git/commits{/sha}","comments_url":"https://api.github.com/repos/checkstyle/checkstyle/comments{/number}","issue_comment_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/comments{/number}","contents_url":"https://api.github.com/repos/checkstyle/checkstyle/contents/{+path}","compare_url":"https://api.github.com/repos/checkstyle/checkstyle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/checkstyle/checkstyle/merges","archive_url":"https://api.github.com/repos/checkstyle/checkstyle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/checkstyle/checkstyle/downloads","issues_url":"https://api.github.com/repos/checkstyle/checkstyle/issues{/number}","pulls_url":"https://api.github.com/repos/checkstyle/checkstyle/pulls{/number}","milestones_url":"https://api.github.com/repos/checkstyle/checkstyle/milestones{/number}","notifications_url":"https://api.github.com/repos/checkstyle/checkstyle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/checkstyle/checkstyle/labels{/name}","releases_url":"https://api.github.com/repos/checkstyle/checkstyle/releases{/id}","deployments_url":"https://api.github.com/repos/checkstyle/checkstyle/deployments","created_at":"2013-08-31T02:05:05Z","updated_at":"2017-08-26T07:44:01Z","pushed_at":"2017-08-27T01:08:54Z","git_url":"git://github.com/checkstyle/checkstyle.git","ssh_url":"git@github.com:checkstyle/checkstyle.git","clone_url":"https://github.com/checkstyle/checkstyle.git","svn_url":"https://github.com/checkstyle/checkstyle","homepage":"http://checkstyle.sourceforge.net/","size":53328,"stargazers_count":2242,"watchers_count":2242,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1076,"mirror_url":null,"open_issues_count":428,"forks":1076,"open_issues":428,"watchers":2242,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/checkstyle/checkstyle/pulls/4751"},"html":{"href":"https://github.com/checkstyle/checkstyle/pull/4751"},"issue":{"href":"https://api.github.com/repos/checkstyle/checkstyle/issues/4751"},"comments":{"href":"https://api.github.com/repos/checkstyle/checkstyle/issues/4751/comments"},"review_comments":{"href":"https://api.github.com/repos/checkstyle/checkstyle/pulls/4751/comments"},"review_comment":{"href":"https://api.github.com/repos/checkstyle/checkstyle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/checkstyle/checkstyle/pulls/4751/commits"},"statuses":{"href":"https://api.github.com/repos/checkstyle/checkstyle/statuses/159eafb03b2620c7b3b1002d7533a7371e232289"}}}}
{"actor":{"display_login":"ps-sp"}}