{"action":"created","issue":{"url":"https://api.github.com/repos/teamed/qulice/issues/701","repository_url":"https://api.github.com/repos/teamed/qulice","labels_url":"https://api.github.com/repos/teamed/qulice/issues/701/labels{/name}","comments_url":"https://api.github.com/repos/teamed/qulice/issues/701/comments","events_url":"https://api.github.com/repos/teamed/qulice/issues/701/events","html_url":"https://github.com/teamed/qulice/issues/701","id":132940800,"number":701,"title":"Duplicated PMD and Checkstyle checks for multiple string literals","user":{"login":"mkordas","id":5467276,"avatar_url":"https://avatars.githubusercontent.com/u/5467276?v=3","gravatar_id":"","url":"https://api.github.com/users/mkordas","html_url":"https://github.com/mkordas","followers_url":"https://api.github.com/users/mkordas/followers","following_url":"https://api.github.com/users/mkordas/following{/other_user}","gists_url":"https://api.github.com/users/mkordas/gists{/gist_id}","starred_url":"https://api.github.com/users/mkordas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkordas/subscriptions","organizations_url":"https://api.github.com/users/mkordas/orgs","repos_url":"https://api.github.com/users/mkordas/repos","events_url":"https://api.github.com/users/mkordas/events{/privacy}","received_events_url":"https://api.github.com/users/mkordas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/teamed/qulice/labels/30%20mins","name":"30 mins","color":"eb6421"},{"url":"https://api.github.com/repos/teamed/qulice/labels/bug","name":"bug","color":"fbca04"},{"url":"https://api.github.com/repos/teamed/qulice/labels/DEV","name":"DEV","color":"bfd4f3"},{"url":"https://api.github.com/repos/teamed/qulice/labels/urgent","name":"urgent","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"dskalenko","id":6028811,"avatar_url":"https://avatars.githubusercontent.com/u/6028811?v=3","gravatar_id":"","url":"https://api.github.com/users/dskalenko","html_url":"https://github.com/dskalenko","followers_url":"https://api.github.com/users/dskalenko/followers","following_url":"https://api.github.com/users/dskalenko/following{/other_user}","gists_url":"https://api.github.com/users/dskalenko/gists{/gist_id}","starred_url":"https://api.github.com/users/dskalenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dskalenko/subscriptions","organizations_url":"https://api.github.com/users/dskalenko/orgs","repos_url":"https://api.github.com/users/dskalenko/repos","events_url":"https://api.github.com/users/dskalenko/events{/privacy}","received_events_url":"https://api.github.com/users/dskalenko/received_events","type":"User","site_admin":false},"milestone":null,"comments":9,"created_at":"2016-02-11T10:48:36Z","updated_at":"2016-02-29T07:11:57Z","closed_at":null,"body":"When Java file contains on purpose multiple string literals (e.g. while building XML or in tests), they can be suppressed as follows:\r\n```java\r\n    String act() {\r\n        // @checkstyle MultipleStringLiterals (1 line)\r\n        return String.format(\"%s%s\", \"test\", \"test\");\r\n    }\r\n```\r\nHowever, if methods contains at least 4 occurrences of some particular string, there is both Checkstyle and PMD violation:\r\n```java\r\n    @SuppressWarnings(\"PMD.AvoidDuplicateLiterals\")\r\n    String act() {\r\n        // @checkstyle MultipleStringLiterals (1 line)\r\n        return String.format(\"%s%s%s%s\", \"test\", \"test\", \"test\", \"test\");\r\n    }\r\n```\r\nI suggest removing Checkstyle rule and leaving just PMD one, as it has more convenient AST suppressions. We need to reconfigure PMD rule to warn from 2 duplicated strings.\r\n\r\nAnother option is to exclude PMD rule.\r\n"},"comment":{"url":"https://api.github.com/repos/teamed/qulice/issues/comments/190071937","html_url":"https://github.com/teamed/qulice/issues/701#issuecomment-190071937","issue_url":"https://api.github.com/repos/teamed/qulice/issues/701","id":190071937,"user":{"login":"krzyk","id":105730,"avatar_url":"https://avatars.githubusercontent.com/u/105730?v=3","gravatar_id":"","url":"https://api.github.com/users/krzyk","html_url":"https://github.com/krzyk","followers_url":"https://api.github.com/users/krzyk/followers","following_url":"https://api.github.com/users/krzyk/following{/other_user}","gists_url":"https://api.github.com/users/krzyk/gists{/gist_id}","starred_url":"https://api.github.com/users/krzyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krzyk/subscriptions","organizations_url":"https://api.github.com/users/krzyk/orgs","repos_url":"https://api.github.com/users/krzyk/repos","events_url":"https://api.github.com/users/krzyk/events{/privacy}","received_events_url":"https://api.github.com/users/krzyk/received_events","type":"User","site_admin":false},"created_at":"2016-02-29T07:11:57Z","updated_at":"2016-02-29T07:11:57Z","body":"@dskalenko and now after merge, you have to ask @mkordas to close the issue "}}