{"action":"created","comment":{"url":"https://api.github.com/repos/checkstyle/checkstyle/pulls/comments/238483990","pull_request_review_id":181036617,"id":238483990,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzODQ4Mzk5MA==","diff_hunk":"@@ -0,0 +1,302 @@\n+////////////////////////////////////////////////////////////////////////////////\n+// checkstyle: Checks Java source code for adherence to a set of rules.\n+// Copyright (C) 2001-2018 the original author or authors.\n+//\n+// This library is free software; you can redistribute it and/or\n+// modify it under the terms of the GNU Lesser General Public\n+// License as published by the Free Software Foundation; either\n+// version 2.1 of the License, or (at your option) any later version.\n+//\n+// This library is distributed in the hope that it will be useful,\n+// but WITHOUT ANY WARRANTY; without even the implied warranty of\n+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+// Lesser General Public License for more details.\n+//\n+// You should have received a copy of the GNU Lesser General Public\n+// License along with this library; if not, write to the Free Software\n+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n+////////////////////////////////////////////////////////////////////////////////\n+\n+package com.puppycrawl.tools.checkstyle.filters;\n+\n+import static org.junit.Assert.assertFalse;\n+import static org.junit.Assert.assertTrue;\n+import static org.junit.Assert.fail;\n+\n+import java.io.File;\n+import java.nio.charset.StandardCharsets;\n+\n+import org.junit.Before;\n+import org.junit.Test;\n+\n+import com.puppycrawl.tools.checkstyle.AbstractModuleTestSupport;\n+import com.puppycrawl.tools.checkstyle.JavaParser;\n+import com.puppycrawl.tools.checkstyle.TreeWalkerAuditEvent;\n+import com.puppycrawl.tools.checkstyle.api.FileContents;\n+import com.puppycrawl.tools.checkstyle.api.FileText;\n+import com.puppycrawl.tools.checkstyle.api.LocalizedMessage;\n+import com.puppycrawl.tools.checkstyle.api.TokenTypes;\n+\n+public class SuppressionXpathSingleFilterTest\n+        extends AbstractModuleTestSupport {\n+    private File file;\n+    private FileContents fileContents;\n+\n+    @Before\n+    public void setUp() throws Exception {\n+        file = new File(getPath(\"InputSuppressionXpathSingleFilter.java\"));\n+        fileContents = new FileContents(new FileText(file,\n+                StandardCharsets.UTF_8.name()));\n+    }\n+\n+    @Override\n+    protected String getPackageLocation() {\n+        return \"com/puppycrawl/tools/checkstyle/filters/suppressionxpathsinglefilter\";\n+    }\n+\n+    @Test\n+    public void testMatching() throws Exception {\n+        final String xpath = \"/CLASS_DEF[@text='InputSuppressionXpathSingleFilter']\";\n+        final SuppressionXpathSingleFilter filter =\n+                createSuppressionXpathSingleFilter(\"InputSuppressionXpathSingleFilter\", \"Test\",\n+                        null, null, xpath);\n+        final TreeWalkerAuditEvent ev = getEvent(3, 0,\n+                TokenTypes.CLASS_DEF);\n+        assertFalse(\"Event should be rejected\", filter.accept(ev));\n+    }\n+\n+    @Test\n+    public void testNonMatchingTokenType() throws Exception {\n+        final String xpath = \"//METHOD_DEF[@text='countTokens']\";\n+        final SuppressionXpathSingleFilter filter =\n+                createSuppressionXpathSingleFilter(\"InputSuppressionXpathSingleFilter\", \"Test\",\n+                        null, null, xpath);\n+        final TreeWalkerAuditEvent ev = getEvent(3, 0,\n+                TokenTypes.CLASS_DEF);\n+        assertTrue(\"Event should be accepted\", filter.accept(ev));\n+    }\n+\n+    @Test\n+    public void testNonMatchingLineNumber() throws Exception {\n+        final String xpath = \"/CLASS_DEF[@text='InputSuppressionXpathSingleFilter']\";\n+        final SuppressionXpathSingleFilter filter =\n+                createSuppressionXpathSingleFilter(\"InputSuppressionXpathSingleFilter\", \"Test\",\n+                        null, null, xpath);\n+        final TreeWalkerAuditEvent ev = getEvent(100, 0,\n+                TokenTypes.CLASS_DEF);\n+        assertTrue(\"Event should be accepted\", filter.accept(ev));\n+    }\n+\n+    @Test\n+    public void testNonMatchingColumnNumber() throws Exception {\n+        final String xpath = \"/CLASS_DEF[@text='InputSuppressionXpathSingleFilter']\";\n+        final SuppressionXpathSingleFilter filter =\n+                createSuppressionXpathSingleFilter(\"InputSuppressionXpathSingleFilter\", \"Test\",\n+                        null, null, xpath);\n+        final TreeWalkerAuditEvent ev = getEvent(3, 100,\n+                TokenTypes.CLASS_DEF);\n+        assertTrue(\"Event should be accepted\", filter.accept(ev));\n+    }\n+\n+    @Test\n+    public void testComplexQuery() throws Exception {\n+        final String xpath = \"//VARIABLE_DEF[@text='pi' and \"\n+                + \"../..[@text='countTokens']] \"\n+                + \"| //VARIABLE_DEF[@text='someVariable' and ../..[@text='sum']]\";\n+        final SuppressionXpathSingleFilter filter =\n+                createSuppressionXpathSingleFilter(\"InputSuppressionXpathSingleFilter\", \"Test\",\n+                        null, null, xpath);\n+        final TreeWalkerAuditEvent eventOne = getEvent(5, 8,\n+                TokenTypes.VARIABLE_DEF);\n+        final TreeWalkerAuditEvent eventTwo = getEvent(10, 4,\n+                TokenTypes.VARIABLE_DEF);\n+        final TreeWalkerAuditEvent eventThree = getEvent(15, 8,\n+                TokenTypes.VARIABLE_DEF);\n+        assertFalse(\"Event should be rejected\", filter.accept(eventOne));\n+        assertTrue(\"Event should be accepted\", filter.accept(eventTwo));\n+        assertFalse(\"Event should be rejected\", filter.accept(eventThree));\n+    }\n+\n+    @Test\n+    public void testIncorrectQuery() {\n+        final String xpath = \"1@#\";\n+        try {\n+            final Object test = createSuppressionXpathSingleFilter(\n+                    \"InputSuppressionXpathSingleFilter\", \"Test\",\n+                    null, null, xpath).getXpathFilter();\n+            fail(\"Exception was expected but got \" + test);\n+        }\n+        catch (IllegalStateException ex) {\n+            assertTrue(\"Message should be: Unexpected xpath query\",\n+                    ex.getMessage().contains(\"Illegal xpath query\"));\n+        }\n+    }\n+\n+    @Test\n+    public void testNoQuery() throws Exception {\n+        final TreeWalkerAuditEvent event = getEvent(15, 8,\n+                TokenTypes.VARIABLE_DEF);\n+        final SuppressionXpathSingleFilter filter =\n+                createSuppressionXpathSingleFilter(\"InputSuppressionXpathSingleFilter\", \"Test\",\n+                        null, null, null);\n+        assertFalse(\"Event should be accepted\", filter.accept(event));\n+    }\n+\n+    @Test\n+    public void testNullFileName() {\n+        final String xpath = \"NON_MATCHING_QUERY\";\n+        final SuppressionXpathSingleFilter filter =\n+                createSuppressionXpathSingleFilter(\"InputSuppressionXpathSingleFilter\", \"Test\",\n+                        null, null, xpath);\n+        final TreeWalkerAuditEvent ev = new TreeWalkerAuditEvent(null,\n+                null, null, null);\n+        assertTrue(\"Event should be accepted\", filter.accept(ev));\n+    }\n+\n+    @Test\n+    public void testNonMatchingFileRegexp() throws Exception {\n+        final String xpath = \"NON_MATCHING_QUERY\";\n+        final SuppressionXpathSingleFilter filter =\n+                createSuppressionXpathSingleFilter(\"NonMatchingRegexp\", \"Test\",\n+                        null, null, xpath);\n+        final TreeWalkerAuditEvent ev = getEvent(3, 0,\n+                TokenTypes.CLASS_DEF);\n+        assertTrue(\"Event should be accepted\", filter.accept(ev));\n+    }\n+\n+    @Test\n+    public void testNullLocalizedMessage() {\n+        final String xpath = \"NON_MATCHING_QUERY\";\n+        final SuppressionXpathSingleFilter filter =\n+                createSuppressionXpathSingleFilter(\"InputSuppressionXpathSingleFilter\", \"Test\",\n+                        null, null, xpath);\n+        final TreeWalkerAuditEvent ev = new TreeWalkerAuditEvent(null,\n+                file.getName(), null, null);\n+        assertTrue(\"Event should be accepted\", filter.accept(ev));\n+    }\n+\n+    @Test\n+    public void testNonMatchingModuleId() throws Exception {\n+        final String xpath = \"NON_MATCHING_QUERY\";\n+        final SuppressionXpathSingleFilter filter =\n+                createSuppressionXpathSingleFilter(\"InputSuppressionXpathSingleFilter\", \"Test\",\n+                        null, \"id19\", xpath);\n+        final LocalizedMessage message =\n+                new LocalizedMessage(3, 0, TokenTypes.CLASS_DEF, \"\", \"\",\n+                        null, null, \"id20\",\n+                        getClass(), null);\n+        final TreeWalkerAuditEvent ev = new TreeWalkerAuditEvent(fileContents, file.getName(),\n+                message, JavaParser.parseFile(file, JavaParser.Options.WITHOUT_COMMENTS));\n+        assertTrue(\"Event should be accepted\", filter.accept(ev));\n+    }\n+\n+    @Test\n+    public void testMatchingModuleId() throws Exception {\n+        final String xpath = \"/CLASS_DEF[@text='InputSuppressionXpathSingleFilter']\";\n+        final SuppressionXpathSingleFilter filter =\n+                createSuppressionXpathSingleFilter(\"InputSuppressionXpathSingleFilter\", \"Test\",\n+                        null, \"id19\", xpath);\n+        final LocalizedMessage message =\n+                new LocalizedMessage(3, 0, TokenTypes.CLASS_DEF, \"\",\n+                        \"\", null, null, \"id19\",\n+                        getClass(), null);\n+        final TreeWalkerAuditEvent ev = new TreeWalkerAuditEvent(fileContents, file.getName(),\n+                message, JavaParser.parseFile(file, JavaParser.Options.WITHOUT_COMMENTS));\n+        assertFalse(\"Event should be rejected\", filter.accept(ev));\n+    }\n+\n+    @Test\n+    public void testNonMatchingChecks() throws Exception {\n+        final String xpath = \"NON_MATCHING_QUERY\";\n+        final SuppressionXpathSingleFilter filter = createSuppressionXpathSingleFilter(\n+                \"InputSuppressionXpathSingleFilter\", \"NonMatchingRegexp\",\n+                null, \"id19\", xpath);\n+        final LocalizedMessage message =\n+                new LocalizedMessage(3, 0, TokenTypes.CLASS_DEF, \"\",\n+                        \"\", null, null, \"id19\",\n+                        getClass(), null);\n+        final TreeWalkerAuditEvent ev = new TreeWalkerAuditEvent(fileContents, file.getName(),\n+                message, JavaParser.parseFile(file, JavaParser.Options.WITHOUT_COMMENTS));\n+        assertTrue(\"Event should be accepted\", filter.accept(ev));\n+    }\n+\n+    @Test\n+    public void testNonMatchingFileNameModuleIdAndCheck() throws Exception {\n+        final String xpath = \"NON_MATCHING_QUERY\";\n+        final SuppressionXpathSingleFilter filter =\n+                createSuppressionXpathSingleFilter(\"InputSuppressionXpathSingleFilter\",\n+                        null, null, null, xpath);\n+        final TreeWalkerAuditEvent ev = getEvent(3, 0,\n+                TokenTypes.CLASS_DEF);\n+        assertTrue(\"Event should be accepted\", filter.accept(ev));\n+    }\n+\n+    @Test\n+    public void testNullModuleIdAndNonMatchingChecks() throws Exception {\n+        final String xpath = \"NON_MATCHING_QUERY\";\n+        final SuppressionXpathSingleFilter filter = createSuppressionXpathSingleFilter(\n+                \"InputSuppressionXpathSingleFilter\", \"NonMatchingRegexp\", null, null, xpath);\n+        final TreeWalkerAuditEvent ev = getEvent(3, 0,\n+                TokenTypes.CLASS_DEF);\n+        assertTrue(\"Event should be accepted\", filter.accept(ev));\n+    }\n+\n+    @Test\n+    public void testDecideByMessage() throws Exception {\n+        final LocalizedMessage message = new LocalizedMessage(0, 0,\n+                TokenTypes.CLASS_DEF, \"\", \"\",\n+                null, null, null, getClass(), \"Test\");\n+        final TreeWalkerAuditEvent ev = new TreeWalkerAuditEvent(fileContents, file.getName(),\n+                message, JavaParser.parseFile(file, JavaParser.Options.WITHOUT_COMMENTS));\n+        final SuppressionXpathSingleFilter filter1 = createSuppressionXpathSingleFilter(\n+                null, null, \"Test\", null, null);\n+        final SuppressionXpathSingleFilter filter2 = createSuppressionXpathSingleFilter(\n+                null, null, \"Bad\", null, null);\n+        assertFalse(\"Message match\", filter1.accept(ev));\n+        assertTrue(\"Message not match\", filter2.accept(ev));\n+    }\n+\n+    @Test\n+    public void testThrowException() {\n+        final String xpath = \"/CLASS_DEF[@text='InputSuppressionXpathSingleFilter']\";\n+        final SuppressionXpathSingleFilter filter =\n+                createSuppressionXpathSingleFilter(\"InputSuppressionXpathSingleFilter\",\n+                        \"Test\", null, null, xpath);\n+        final LocalizedMessage message =\n+                new LocalizedMessage(3, 0, TokenTypes.CLASS_DEF, \"\",\n+                        \"\", null, null, \"id19\",\n+                        getClass(), null);\n+        final TreeWalkerAuditEvent ev = new TreeWalkerAuditEvent(fileContents,\n+                file.getName(), message, null);\n+        try {\n+            filter.accept(ev);\n+            fail(\"Exception is expected\");\n+        }\n+        catch (IllegalStateException ex) {\n+            assertTrue(\"Exception message does not match expected one\",\n+                    ex.getMessage().contains(\"Cannot initialize context and evaluate query\"));\n+        }\n+    }\n+\n+    private static SuppressionXpathSingleFilter createSuppressionXpathSingleFilter(\n+            String... properties) {","path":"src/test/java/com/puppycrawl/tools/checkstyle/filters/SuppressionXpathSingleFilterTest.java","position":null,"original_position":282,"commit_id":"31c7729e483e625e4220fb37ba00d5fac91a4e40","original_commit_id":"7b929359a267257096716f6badf3ac002e7916ce","user":{"login":"rnveach","id":5427943,"node_id":"MDQ6VXNlcjU0Mjc5NDM=","avatar_url":"https://avatars1.githubusercontent.com/u/5427943?v=4","gravatar_id":"","url":"https://api.github.com/users/rnveach","html_url":"https://github.com/rnveach","followers_url":"https://api.github.com/users/rnveach/followers","following_url":"https://api.github.com/users/rnveach/following{/other_user}","gists_url":"https://api.github.com/users/rnveach/gists{/gist_id}","starred_url":"https://api.github.com/users/rnveach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnveach/subscriptions","organizations_url":"https://api.github.com/users/rnveach/orgs","repos_url":"https://api.github.com/users/rnveach/repos","events_url":"https://api.github.com/users/rnveach/events{/privacy}","received_events_url":"https://api.github.com/users/rnveach/received_events","type":"User","site_admin":false},"body":"Don't use `@SuppressWarnings(\"PMD\")`. Suppression should be in file I mentioned.\r\n\r\nPlace something like:\r\n````\r\n    <rule ref=\"category/java/design.xml/UseObjectForClearerAPI\" />\r\n    <properties>\r\n            <property name=\"violationSuppressXPath\"\r\n                      value=\"//ClassOrInterfaceDeclaration[@Image='SuppressionXpathSingleFilterTest']\r\n                  //MethodDeclarator[@Image='createSuppressionXpathSingleFilter']\"/>\r\n        </properties>\r\n    </rule>\r\n````\r\n\r\n\r\nAdd your own comment about property specifying reason for suppression.","created_at":"2018-12-03T23:51:25Z","updated_at":"2018-12-03T23:51:25Z","html_url":"https://github.com/checkstyle/checkstyle/pull/6172#discussion_r238483990","pull_request_url":"https://api.github.com/repos/checkstyle/checkstyle/pulls/6172","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/checkstyle/checkstyle/pulls/comments/238483990"},"html":{"href":"https://github.com/checkstyle/checkstyle/pull/6172#discussion_r238483990"},"pull_request":{"href":"https://api.github.com/repos/checkstyle/checkstyle/pulls/6172"}},"in_reply_to_id":238083574},"pull_request":{"url":"https://api.github.com/repos/checkstyle/checkstyle/pulls/6172","id":226330204,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2MzMwMjA0","html_url":"https://github.com/checkstyle/checkstyle/pull/6172","diff_url":"https://github.com/checkstyle/checkstyle/pull/6172.diff","patch_url":"https://github.com/checkstyle/checkstyle/pull/6172.patch","issue_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/6172","number":6172,"state":"open","locked":false,"title":"Issue #5879: Suppression xpath single filter","user":{"login":"jack870131","id":34185019,"node_id":"MDQ6VXNlcjM0MTg1MDE5","avatar_url":"https://avatars0.githubusercontent.com/u/34185019?v=4","gravatar_id":"","url":"https://api.github.com/users/jack870131","html_url":"https://github.com/jack870131","followers_url":"https://api.github.com/users/jack870131/followers","following_url":"https://api.github.com/users/jack870131/following{/other_user}","gists_url":"https://api.github.com/users/jack870131/gists{/gist_id}","starred_url":"https://api.github.com/users/jack870131/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jack870131/subscriptions","organizations_url":"https://api.github.com/users/jack870131/orgs","repos_url":"https://api.github.com/users/jack870131/repos","events_url":"https://api.github.com/users/jack870131/events{/privacy}","received_events_url":"https://api.github.com/users/jack870131/received_events","type":"User","site_admin":false},"body":"#5879 ","created_at":"2018-10-27T22:52:43Z","updated_at":"2018-12-03T23:51:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cb2541e9e66e73e81c71340c4bf419b01e3ba738","assignee":{"login":"rnveach","id":5427943,"node_id":"MDQ6VXNlcjU0Mjc5NDM=","avatar_url":"https://avatars1.githubusercontent.com/u/5427943?v=4","gravatar_id":"","url":"https://api.github.com/users/rnveach","html_url":"https://github.com/rnveach","followers_url":"https://api.github.com/users/rnveach/followers","following_url":"https://api.github.com/users/rnveach/following{/other_user}","gists_url":"https://api.github.com/users/rnveach/gists{/gist_id}","starred_url":"https://api.github.com/users/rnveach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnveach/subscriptions","organizations_url":"https://api.github.com/users/rnveach/orgs","repos_url":"https://api.github.com/users/rnveach/repos","events_url":"https://api.github.com/users/rnveach/events{/privacy}","received_events_url":"https://api.github.com/users/rnveach/received_events","type":"User","site_admin":false},"assignees":[{"login":"rnveach","id":5427943,"node_id":"MDQ6VXNlcjU0Mjc5NDM=","avatar_url":"https://avatars1.githubusercontent.com/u/5427943?v=4","gravatar_id":"","url":"https://api.github.com/users/rnveach","html_url":"https://github.com/rnveach","followers_url":"https://api.github.com/users/rnveach/followers","following_url":"https://api.github.com/users/rnveach/following{/other_user}","gists_url":"https://api.github.com/users/rnveach/gists{/gist_id}","starred_url":"https://api.github.com/users/rnveach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnveach/subscriptions","organizations_url":"https://api.github.com/users/rnveach/orgs","repos_url":"https://api.github.com/users/rnveach/repos","events_url":"https://api.github.com/users/rnveach/events{/privacy}","received_events_url":"https://api.github.com/users/rnveach/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/checkstyle/checkstyle/pulls/6172/commits","review_comments_url":"https://api.github.com/repos/checkstyle/checkstyle/pulls/6172/comments","review_comment_url":"https://api.github.com/repos/checkstyle/checkstyle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/6172/comments","statuses_url":"https://api.github.com/repos/checkstyle/checkstyle/statuses/31c7729e483e625e4220fb37ba00d5fac91a4e40","head":{"label":"jack870131:suppression_xpath_single_filter","ref":"suppression_xpath_single_filter","sha":"31c7729e483e625e4220fb37ba00d5fac91a4e40","user":{"login":"jack870131","id":34185019,"node_id":"MDQ6VXNlcjM0MTg1MDE5","avatar_url":"https://avatars0.githubusercontent.com/u/34185019?v=4","gravatar_id":"","url":"https://api.github.com/users/jack870131","html_url":"https://github.com/jack870131","followers_url":"https://api.github.com/users/jack870131/followers","following_url":"https://api.github.com/users/jack870131/following{/other_user}","gists_url":"https://api.github.com/users/jack870131/gists{/gist_id}","starred_url":"https://api.github.com/users/jack870131/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jack870131/subscriptions","organizations_url":"https://api.github.com/users/jack870131/orgs","repos_url":"https://api.github.com/users/jack870131/repos","events_url":"https://api.github.com/users/jack870131/events{/privacy}","received_events_url":"https://api.github.com/users/jack870131/received_events","type":"User","site_admin":false},"repo":{"id":145151687,"node_id":"MDEwOlJlcG9zaXRvcnkxNDUxNTE2ODc=","name":"checkstyle","full_name":"jack870131/checkstyle","private":false,"owner":{"login":"jack870131","id":34185019,"node_id":"MDQ6VXNlcjM0MTg1MDE5","avatar_url":"https://avatars0.githubusercontent.com/u/34185019?v=4","gravatar_id":"","url":"https://api.github.com/users/jack870131","html_url":"https://github.com/jack870131","followers_url":"https://api.github.com/users/jack870131/followers","following_url":"https://api.github.com/users/jack870131/following{/other_user}","gists_url":"https://api.github.com/users/jack870131/gists{/gist_id}","starred_url":"https://api.github.com/users/jack870131/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jack870131/subscriptions","organizations_url":"https://api.github.com/users/jack870131/orgs","repos_url":"https://api.github.com/users/jack870131/repos","events_url":"https://api.github.com/users/jack870131/events{/privacy}","received_events_url":"https://api.github.com/users/jack870131/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jack870131/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/jack870131/checkstyle","forks_url":"https://api.github.com/repos/jack870131/checkstyle/forks","keys_url":"https://api.github.com/repos/jack870131/checkstyle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jack870131/checkstyle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jack870131/checkstyle/teams","hooks_url":"https://api.github.com/repos/jack870131/checkstyle/hooks","issue_events_url":"https://api.github.com/repos/jack870131/checkstyle/issues/events{/number}","events_url":"https://api.github.com/repos/jack870131/checkstyle/events","assignees_url":"https://api.github.com/repos/jack870131/checkstyle/assignees{/user}","branches_url":"https://api.github.com/repos/jack870131/checkstyle/branches{/branch}","tags_url":"https://api.github.com/repos/jack870131/checkstyle/tags","blobs_url":"https://api.github.com/repos/jack870131/checkstyle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jack870131/checkstyle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jack870131/checkstyle/git/refs{/sha}","trees_url":"https://api.github.com/repos/jack870131/checkstyle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jack870131/checkstyle/statuses/{sha}","languages_url":"https://api.github.com/repos/jack870131/checkstyle/languages","stargazers_url":"https://api.github.com/repos/jack870131/checkstyle/stargazers","contributors_url":"https://api.github.com/repos/jack870131/checkstyle/contributors","subscribers_url":"https://api.github.com/repos/jack870131/checkstyle/subscribers","subscription_url":"https://api.github.com/repos/jack870131/checkstyle/subscription","commits_url":"https://api.github.com/repos/jack870131/checkstyle/commits{/sha}","git_commits_url":"https://api.github.com/repos/jack870131/checkstyle/git/commits{/sha}","comments_url":"https://api.github.com/repos/jack870131/checkstyle/comments{/number}","issue_comment_url":"https://api.github.com/repos/jack870131/checkstyle/issues/comments{/number}","contents_url":"https://api.github.com/repos/jack870131/checkstyle/contents/{+path}","compare_url":"https://api.github.com/repos/jack870131/checkstyle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jack870131/checkstyle/merges","archive_url":"https://api.github.com/repos/jack870131/checkstyle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jack870131/checkstyle/downloads","issues_url":"https://api.github.com/repos/jack870131/checkstyle/issues{/number}","pulls_url":"https://api.github.com/repos/jack870131/checkstyle/pulls{/number}","milestones_url":"https://api.github.com/repos/jack870131/checkstyle/milestones{/number}","notifications_url":"https://api.github.com/repos/jack870131/checkstyle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jack870131/checkstyle/labels{/name}","releases_url":"https://api.github.com/repos/jack870131/checkstyle/releases{/id}","deployments_url":"https://api.github.com/repos/jack870131/checkstyle/deployments","created_at":"2018-08-17T18:01:28Z","updated_at":"2018-08-17T18:01:35Z","pushed_at":"2018-12-03T23:27:07Z","git_url":"git://github.com/jack870131/checkstyle.git","ssh_url":"git@github.com:jack870131/checkstyle.git","clone_url":"https://github.com/jack870131/checkstyle.git","svn_url":"https://github.com/jack870131/checkstyle","homepage":"https://checkstyle.org/","size":59804,"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,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"checkstyle:master","ref":"master","sha":"067cd51b400408eaaa1809d991d93dc3da8f648e","user":{"login":"checkstyle","id":5179750,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUxNzk3NTA=","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,"node_id":"MDEwOlJlcG9zaXRvcnkxMjQ5OTI1MQ==","name":"checkstyle","full_name":"checkstyle/checkstyle","private":false,"owner":{"login":"checkstyle","id":5179750,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUxNzk3NTA=","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},"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":"2018-12-03T20:44:29Z","pushed_at":"2018-12-03T23:27:11Z","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":"https://checkstyle.org/","size":59863,"stargazers_count":4069,"watchers_count":4069,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6676,"mirror_url":null,"archived":false,"open_issues_count":489,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":6676,"open_issues":489,"watchers":4069,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/checkstyle/checkstyle/pulls/6172"},"html":{"href":"https://github.com/checkstyle/checkstyle/pull/6172"},"issue":{"href":"https://api.github.com/repos/checkstyle/checkstyle/issues/6172"},"comments":{"href":"https://api.github.com/repos/checkstyle/checkstyle/issues/6172/comments"},"review_comments":{"href":"https://api.github.com/repos/checkstyle/checkstyle/pulls/6172/comments"},"review_comment":{"href":"https://api.github.com/repos/checkstyle/checkstyle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/checkstyle/checkstyle/pulls/6172/commits"},"statuses":{"href":"https://api.github.com/repos/checkstyle/checkstyle/statuses/31c7729e483e625e4220fb37ba00d5fac91a4e40"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"rnveach"}}