{"action":"created","issue":{"url":"https://api.github.com/repos/checkstyle/checkstyle/issues/3269","repository_url":"https://api.github.com/repos/checkstyle/checkstyle","labels_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/3269/labels{/name}","comments_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/3269/comments","events_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/3269/events","html_url":"https://github.com/checkstyle/checkstyle/pull/3269","id":159740042,"number":3269,"title":"Issue #3117: Add ability to differentiate annotation placement in foreach, for loops, parameter definition","user":{"login":"MEZk","id":7242568,"avatar_url":"https://avatars.githubusercontent.com/u/7242568?v=3","gravatar_id":"","url":"https://api.github.com/users/MEZk","html_url":"https://github.com/MEZk","followers_url":"https://api.github.com/users/MEZk/followers","following_url":"https://api.github.com/users/MEZk/following{/other_user}","gists_url":"https://api.github.com/users/MEZk/gists{/gist_id}","starred_url":"https://api.github.com/users/MEZk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MEZk/subscriptions","organizations_url":"https://api.github.com/users/MEZk/orgs","repos_url":"https://api.github.com/users/MEZk/repos","events_url":"https://api.github.com/users/MEZk/events{/privacy}","received_events_url":"https://api.github.com/users/MEZk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-06-10T23:11:30Z","updated_at":"2016-06-19T10:02:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/checkstyle/checkstyle/pulls/3269","html_url":"https://github.com/checkstyle/checkstyle/pull/3269","diff_url":"https://github.com/checkstyle/checkstyle/pull/3269.diff","patch_url":"https://github.com/checkstyle/checkstyle/pull/3269.patch"},"body":"#3117 \r\n\r\n@romani \r\nFixed for foreach, for loops, catch, method, lambdas parameters.\r\nI'm not able to generate regression reports against Apache-Apex, as I have got the following exceptions (before and after changes):\r\n\r\n```\r\n[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project sample: Execution default-site of goal org.apache.maven.plugins:maven-site-plugin:3.3:site failed. NullPointerException -> [Help 1]\r\norg.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project sample: Execution default-site of goal org.apache.maven.plugins:maven-site-plugin:3.3:site failed.\r\n\tat org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)\r\n\tat org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)\r\n\tat org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)\r\n\tat org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)\r\n\tat org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)\r\n\tat org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)\r\n\tat org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)\r\n\tat org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)\r\n\tat org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)\r\n\tat org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)\r\n\tat org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)\r\n\tat org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)\r\n\tat org.apache.maven.cli.MavenCli.main(MavenCli.java:199)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)\r\n\tat org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)\r\n\tat org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)\r\n\tat org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)\r\nCaused by: org.apache.maven.plugin.PluginExecutionException: Execution default-site of goal org.apache.maven.plugins:maven-site-plugin:3.3:site failed.\r\n\tat org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)\r\n\tat org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)\r\n\t... 20 more\r\nCaused by: java.lang.NullPointerException\r\n\tat org.apache.maven.jxr.pacman.JavaFileImpl.parse(JavaFileImpl.java:108)\r\n\tat org.apache.maven.jxr.pacman.JavaFileImpl.<init>(JavaFileImpl.java:64)\r\n\tat org.apache.maven.jxr.pacman.FileManager.getFile(FileManager.java:68)\r\n\tat org.apache.maven.jxr.pacman.PackageManager.parse(PackageManager.java:123)\r\n\tat org.apache.maven.jxr.pacman.PackageManager.process(PackageManager.java:161)\r\n\tat org.apache.maven.jxr.JXR.xref(JXR.java:262)\r\n\tat org.apache.maven.plugin.jxr.AbstractJxrReport.createXref(AbstractJxrReport.java:279)\r\n\tat org.apache.maven.plugin.jxr.AbstractJxrReport.executeReport(AbstractJxrReport.java:473)\r\n\tat org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:255)\r\n\tat org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:219)\r\n\tat org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:319)\r\n\tat org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:135)\r\n\tat org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:175)\r\n\tat org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:138)\r\n\tat org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)\r\n\t... 21 more\r\n[ERROR] \r\n[ERROR] Re-run Maven using the -X switch to enable full debug logging.\r\n[ERROR] \r\n[ERROR] For more information about the errors and possible solutions, please read the following articles:\r\n[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException\r\n```\r\n\r\nHowever,  I generated regression reports against the following projects:\r\n1) pmd\r\n2) lombok\r\n3) spring-framework\r\n4) java-design-patterns\r\n5) MaterialDesignLibrary\r\n6) Hbase\r\n7) apache-ant\r\n8) apache-jsecurity\r\n9) android-launcher\r\n10) infinispan\r\n11) protonpack\r\n12) jOOL\r\n13) RxJava\r\n14) checkstyle-with-excludes\r\n15) sevntu-checkstyle-with-excludes\r\n16) findbugs-with-excldues\r\n17) hibernate-orm-with-excludes\r\n18) guava-mvnstyle\r\n\r\nwith the following configuration:\r\n\r\n```xml\r\n<module name = \"Checker\">\r\n    <property name=\"charset\" value=\"UTF-8\"/>\r\n    <property name=\"severity\" value=\"warning\"/>\r\n    <module name=\"TreeWalker\">\r\n         <module name=\"AnnotationLocation\">\r\n         \t <property name=\"allowSamelineMultipleAnnotations\" value=\"false\"/>\r\n         \t <property name=\"allowSamelineSingleParameterlessAnnotation\" value=\"false\"/>\r\n         \t <property name=\"allowSamelineParameterizedAnnotation\" value=\"false\"/>\r\n         \t <property name=\"tokens\" value=\"CLASS_DEF, INTERFACE_DEF,\r\nENUM_DEF, METHOD_DEF, \r\nCTOR_DEF, VARIABLE_DEF, \r\nANNOTATION_DEF, TYPECAST,\r\nLITERAL_THROWS, IMPLEMENTS_CLAUSE, \r\nTYPE_ARGUMENT, LITERAL_NEW, \r\nDOT, ANNOTATION_FIELD_DEF\"/>\r\n         </module> \r\n    </module>\r\n</module>\r\n```\r\n\r\nTake into account that I had to exclude PARAMETER_DEF from tokens as it produces to much noise. Reports before and after are equal which is quite strange (I can't believe that all the projects do not use annotations in foreach / for loops, for instance Spring, Hibernate). \r\nNevertheless, I generated report against Guava and added PARAMETER_DEF into tokens set. As you can see from the report there is a huge regression: annotations for parameter types were removed from report after changes.\r\nhttp://mezk.github.io/i3117-AnnotationLocationCheck/guava_diff/index.html"},"comment":{"url":"https://api.github.com/repos/checkstyle/checkstyle/issues/comments/226989094","html_url":"https://github.com/checkstyle/checkstyle/pull/3269#issuecomment-226989094","issue_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/3269","id":226989094,"user":{"login":"MEZk","id":7242568,"avatar_url":"https://avatars.githubusercontent.com/u/7242568?v=3","gravatar_id":"","url":"https://api.github.com/users/MEZk","html_url":"https://github.com/MEZk","followers_url":"https://api.github.com/users/MEZk/followers","following_url":"https://api.github.com/users/MEZk/following{/other_user}","gists_url":"https://api.github.com/users/MEZk/gists{/gist_id}","starred_url":"https://api.github.com/users/MEZk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MEZk/subscriptions","organizations_url":"https://api.github.com/users/MEZk/orgs","repos_url":"https://api.github.com/users/MEZk/repos","events_url":"https://api.github.com/users/MEZk/events{/privacy}","received_events_url":"https://api.github.com/users/MEZk/received_events","type":"User","site_admin":false},"created_at":"2016-06-19T10:02:28Z","updated_at":"2016-06-19T10:02:28Z","body":"@romani \r\n>Please create issue on cobertura and use old syntax.\r\n\r\nDone. See https://github.com/mojohaus/cobertura-maven-plugin/issues/21 . Cobertura instrumentation and check phases work OK, but cobertura report generation phase does not support java 1.8.\r\n\r\n>Please deactivate dsm plugin in separate PR. Issue is already created.\r\n\r\nDone. See https://github.com/checkstyle/checkstyle/pull/3291"}}
{"actor":{"display_login":"MEZk"}}