pmd-devel Mailing List for PMD (Page 10)
A source code analyzer
Brought to you by:
adangel,
juansotuyo
You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(768) |
Aug
(543) |
Sep
(364) |
Oct
(326) |
Nov
(182) |
Dec
(148) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(144) |
Feb
(223) |
Mar
(339) |
Apr
(406) |
May
(128) |
Jun
(225) |
Jul
(171) |
Aug
(171) |
Sep
(153) |
Oct
(150) |
Nov
(176) |
Dec
(88) |
| 2004 |
Jan
(71) |
Feb
(28) |
Mar
(91) |
Apr
(184) |
May
(127) |
Jun
(144) |
Jul
(186) |
Aug
(78) |
Sep
(193) |
Oct
(153) |
Nov
(92) |
Dec
(177) |
| 2005 |
Jan
(223) |
Feb
(319) |
Mar
(253) |
Apr
(106) |
May
(215) |
Jun
(299) |
Jul
(341) |
Aug
(286) |
Sep
(270) |
Oct
(212) |
Nov
(283) |
Dec
(345) |
| 2006 |
Jan
(243) |
Feb
(426) |
Mar
(278) |
Apr
(254) |
May
(259) |
Jun
(197) |
Jul
(156) |
Aug
(84) |
Sep
(150) |
Oct
(719) |
Nov
(319) |
Dec
(169) |
| 2007 |
Jan
(484) |
Feb
(222) |
Mar
(61) |
Apr
(51) |
May
(63) |
Jun
(182) |
Jul
(177) |
Aug
(89) |
Sep
(46) |
Oct
(178) |
Nov
(116) |
Dec
(89) |
| 2008 |
Jan
(23) |
Feb
(198) |
Mar
(227) |
Apr
(203) |
May
(174) |
Jun
(215) |
Jul
(55) |
Aug
(152) |
Sep
(129) |
Oct
(177) |
Nov
(79) |
Dec
(84) |
| 2009 |
Jan
(91) |
Feb
(179) |
Mar
(102) |
Apr
(67) |
May
(40) |
Jun
(41) |
Jul
(43) |
Aug
(53) |
Sep
(4) |
Oct
(17) |
Nov
(48) |
Dec
(76) |
| 2010 |
Jan
(28) |
Feb
(17) |
Mar
(27) |
Apr
(9) |
May
(19) |
Jun
(50) |
Jul
(21) |
Aug
(9) |
Sep
(42) |
Oct
(30) |
Nov
(33) |
Dec
(10) |
| 2011 |
Jan
(14) |
Feb
(6) |
Mar
(18) |
Apr
(8) |
May
(4) |
Jun
(18) |
Jul
(21) |
Aug
(19) |
Sep
(298) |
Oct
(82) |
Nov
(102) |
Dec
(241) |
| 2012 |
Jan
(41) |
Feb
(29) |
Mar
(43) |
Apr
(18) |
May
(42) |
Jun
(53) |
Jul
(53) |
Aug
(43) |
Sep
(16) |
Oct
(20) |
Nov
(36) |
Dec
(26) |
| 2013 |
Jan
(15) |
Feb
(14) |
Mar
(36) |
Apr
(38) |
May
(20) |
Jun
(5) |
Jul
(6) |
Aug
(18) |
Sep
(3) |
Oct
(24) |
Nov
(14) |
Dec
(1) |
| 2014 |
Jan
(13) |
Feb
(12) |
Mar
(8) |
Apr
(19) |
May
(4) |
Jun
(4) |
Jul
(27) |
Aug
(18) |
Sep
(11) |
Oct
(15) |
Nov
(32) |
Dec
(13) |
| 2015 |
Jan
(11) |
Feb
(13) |
Mar
(21) |
Apr
(22) |
May
(32) |
Jun
(14) |
Jul
(11) |
Aug
(7) |
Sep
(33) |
Oct
(40) |
Nov
(20) |
Dec
(13) |
| 2016 |
Jan
(24) |
Feb
(16) |
Mar
(11) |
Apr
(25) |
May
(46) |
Jun
(13) |
Jul
(3) |
Aug
(3) |
Sep
(8) |
Oct
(3) |
Nov
(17) |
Dec
(9) |
| 2017 |
Jan
(6) |
Feb
(3) |
Mar
(13) |
Apr
(16) |
May
(7) |
Jun
(5) |
Jul
(30) |
Aug
(3) |
Sep
(3) |
Oct
(10) |
Nov
(2) |
Dec
(3) |
| 2018 |
Jan
(8) |
Feb
(4) |
Mar
(6) |
Apr
(2) |
May
(3) |
Jun
(3) |
Jul
(6) |
Aug
(4) |
Sep
(4) |
Oct
(4) |
Nov
(4) |
Dec
(5) |
| 2019 |
Jan
(3) |
Feb
(2) |
Mar
(3) |
Apr
(2) |
May
(3) |
Jun
(2) |
Jul
(5) |
Aug
(2) |
Sep
(5) |
Oct
(3) |
Nov
(7) |
Dec
(1) |
| 2020 |
Jan
(3) |
Feb
(2) |
Mar
(2) |
Apr
(2) |
May
(3) |
Jun
(2) |
Jul
(2) |
Aug
(2) |
Sep
(2) |
Oct
(3) |
Nov
(3) |
Dec
(2) |
| 2021 |
Jan
(2) |
Feb
(2) |
Mar
(2) |
Apr
(4) |
May
(4) |
Jun
(3) |
Jul
(4) |
Aug
(2) |
Sep
(3) |
Oct
(5) |
Nov
(1) |
Dec
(1) |
| 2022 |
Jan
(3) |
Feb
(2) |
Mar
(4) |
Apr
(2) |
May
(2) |
Jun
(3) |
Jul
(2) |
Aug
(2) |
Sep
(3) |
Oct
(1) |
Nov
(2) |
Dec
(2) |
| 2023 |
Jan
(2) |
Feb
(2) |
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
(1) |
Jul
(1) |
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
(1) |
Dec
(1) |
| 2024 |
Jan
(1) |
Feb
(1) |
Mar
(1) |
Apr
(3) |
May
(1) |
Jun
(2) |
Jul
(2) |
Aug
(2) |
Sep
(1) |
Oct
(1) |
Nov
(8) |
Dec
(2) |
| 2025 |
Jan
(1) |
Feb
(2) |
Mar
(1) |
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
(1) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
|
|
From: Nikhil S. <cre...@gm...> - 2018-02-28 06:35:26
|
Hello,
I am Nikhil Shinde, final year UG student persuing Computer
Science in Nirma University, India. Working\development on plugins and
tooling sounds quite interesting and I would be quite delighted to
contribute to your organization. I have successfully completed GSoC 2017
<https://summerofcode.withgoogle.com/archive/2017/projects/5686344500117504/>
project
for Checker Framework Organisation under Prof. Michael Ernst. I have quite
experience in working with Java technologies\frameworks and large code
bases and hope to get enough matured to deal with its issues.
For quite time I was exploring the repositories and ideas of
your organization. All project ideas are interesting but I was able to
catch up with the following proposed ideas :-
1) Easy installation packages.
2) Support Java 10
3) Complete type resolution for Java
It would be helpful to know expectations for these project so
I can initiate on drafting proposal and discuss more about project. Looking
forward to contribute.
Thanks ,
Nikhil Shinde.
|
|
From: Rory O'D. <ror...@or...> - 2018-02-13 10:11:09
|
Hi Andreas, *JDK 10 build 43 is our first JDK 10 Release Candidate [1]* * JDK 10 Early Access build 43 is available at : - jdk.java.net/10/ Notable changes since previous email.** *build 43 * * JDK-8194764 <https://bugs.openjdk.java.net/browse/JDK-8194764> - javac incorrectly flags deprecated for removal imports * JDK-8196678 <https://bugs.openjdk.java.net/browse/JDK-8196678> - avoid printing uninitialized buffer in os::print_memory_info on AIX * JDK-8195837 <https://bugs.openjdk.java.net/browse/JDK-8195837> - (tz) Upgrade time-zone data to tzdata2018c ** *Bug fixes reported by Open Source Projects :* * JDK-8196296 <https://bugs.openjdk.java.net/browse/JDK-8196296> Lucene test crashes C2 compilation *Security Manager Survey * If you have written or maintain code that uses the SecurityManager or related APIs such as the AccessController, then we would appreciate if you would complete this survey: https://www.surveymonkey.com/r/RSGMF3K More info on the survey [2] Regards, Rory [1] http://mail.openjdk.java.net/pipermail/jdk-dev/2018-February/000742.html [2] http://mail.openjdk.java.net/pipermail/jdk-dev/2018-February/000649.html -- Rgds,Rory O'Donnell Quality Engineering Manager Oracle EMEA , Dublin, Ireland |
|
From: Rory O'D. <ror...@or...> - 2018-01-22 10:41:05
|
Hi Andreas, Happy New Year! *OpenJDK builds - *JDK 10 Early Access build 40 is available at http://jdk.java.net/10/ * These early-access, open-source builds are provided under the GNU General Public License, version 2, with the Classpath Exception <http://openjdk.java.net/legal/gplv2+ce.html>. * Summary of changes :- https://download.java.net/java/jdk10/archive/40/jdk-10+40.html *JDK 10 will enter Rampdown Phase Two on Thursday the 18th of January, 2018. * * More details , see Mark Reinhold's email to jdk-dev mailing list [1] * The Rampdown Phase Two process will be similar to that of JDK 9 [2]. * JDK 10 Schedule, Status & Features are available [3] *JDK **8u172 Early-Access build 03*is available at :- http://jdk.java.net/8/ * Summary of Changes here :- https://download.java.net/java/jdk8u172/changes/jdk8u172-b02.html <http://openjdk.java.net/projects/jdk8u/releases/8u162.html> Regards, Rory [1] http://mail.openjdk.java.net/pipermail/jdk-dev/2018-January/000416.html [2] http://openjdk.java.net/projects/jdk/10/rdp-2 [3] http://openjdk.java.net/projects/jdk/10/ -- Rgds,Rory O'Donnell Quality Engineering Manager Oracle EMEA, Dublin,Ireland |
|
From: Andreas D. <and...@ad...> - 2018-01-21 16:16:07
|
The PMD team is pleased to announce PMD 6.0.1. This is a bug fixing release. Download: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F6.0.1 <https://github.com/pmd/pmd/blob/pmd_releases/6.0.1/docs/pages/release_notes.md#table-of-contents>Table Of Contents * Additional information about the new introduced rule categories <https://github.com/pmd/pmd/blob/pmd_releases/6.0.1/docs/pages/release_notes.md#additional-information-about-the-new-introduced-rule-categories> * Fixed Issues <https://github.com/pmd/pmd/blob/pmd_releases/6.0.1/docs/pages/release_notes.md#fixed-issues> * API Changes <https://github.com/pmd/pmd/blob/pmd_releases/6.0.1/docs/pages/release_notes.md#api-changes> * External Contributions <https://github.com/pmd/pmd/blob/pmd_releases/6.0.1/docs/pages/release_notes.md#external-contributions> <https://github.com/pmd/pmd/blob/pmd_releases/6.0.1/docs/pages/release_notes.md#additional-information-about-the-new-introduced-rule-categories>Additional information about the new introduced rule categories With the release of PMD 6.0.0, all rules have been sorted into one of the following eight categories: 1. *Best Practices*: These are rules which enforce generally accepted best practices. 2. *Code Style*: These rules enforce a specific coding style. 3. *Design*: Rules that help you discover design issues. 4. *Documentation*: These rules are related to code documentation. 5. *Error Prone*: Rules to detect constructs that are either broken, extremely confusing or prone to runtime errors. 6. *Multithreading*: These are rules that flag issues when dealing with multiple threads of execution. 7. *Performance*: Rules that flag suboptimal code. 8. *Security*: Rules that flag potential security flaws. Please note, that not every category in every language may have a rule. There might be categories with no rules at all, such as |category/java/security.xml|, which has currently no rules. There are even languages, which only have rules of one category (e.g. |category/xml/errorprone.xml|). You can find the information about available rules in the generated rule documentation, available at https://pmd.github.io/6.0.1/. In order to help migrate to the new category scheme, the new name for the old, deprecated rule names will be logged as a warning. See PR #865 <https://github.com/pmd/pmd/pull/865>. Please note, that the deprecated rule names will keep working throughout PMD 6. You can upgrade to PMD 6 without the immediate need to migrate your current ruleset. That backwards compatibility will be maintained until PMD 7.0.0 is released. <https://github.com/pmd/pmd/blob/pmd_releases/6.0.1/docs/pages/release_notes.md#fixed-issues>Fixed Issues * all o #842 <https://github.com/pmd/pmd/issues/842>: [core] Use correct java bootclasspath for compiling * apex-errorprone o #792 <https://github.com/pmd/pmd/issues/792>: [apex] AvoidDirectAccessTriggerMap incorrectly detects array access in classes * apex-security o #788 <https://github.com/pmd/pmd/issues/788>: [apex] Method chaining breaks ApexCRUDViolation * doc o #782 <https://github.com/pmd/pmd/issues/782>: [doc] Wrong information in the Release Notes about the Security ruleset o #794 <https://github.com/pmd/pmd/issues/794>: [doc] Broken documentation links for 6.0.0 * java o #793 <https://github.com/pmd/pmd/issues/793>: [java] Parser error with private method in nested classes in interfaces o #814 <https://github.com/pmd/pmd/issues/814>: [java] UnsupportedClassVersionError is failure instead of a warning o #831 <https://github.com/pmd/pmd/issues/831>: [java] StackOverflow in JavaTypeDefinitionSimple.toString * java-bestpractices o #783 <https://github.com/pmd/pmd/issues/783>: [java] GuardLogStatement regression o #800 <https://github.com/pmd/pmd/issues/800>: [java] ForLoopCanBeForeach NPE when looping on |this| object * java-codestyle o #817 <https://github.com/pmd/pmd/issues/817>: [java] UnnecessaryModifierRule crashes on valid code * java-design o #785 <https://github.com/pmd/pmd/issues/785>: [java] NPE in DataClass rule o #812 <https://github.com/pmd/pmd/issues/812>: [java] Exception applying rule DataClass o #827 <https://github.com/pmd/pmd/issues/827>: [java] GodClass crashes with java.lang.NullPointerException * java-performance o #841 <https://github.com/pmd/pmd/issues/841>: [java] InsufficientStringBufferDeclaration NumberFormatException * java-typeresolution o #866 <https://github.com/pmd/pmd/issues/866>: [java] rulesets/java/typeresolution.xml lists non-existent rules <https://github.com/pmd/pmd/blob/pmd_releases/6.0.1/docs/pages/release_notes.md#api-changes>API Changes * The constant |net.sourceforge.pmd.PMD.VERSION| has been deprecated and will be removed with PMD 7.0.0. Please use |net.sourceforge.pmd.PMDVersion.VERSION| instead. <https://github.com/pmd/pmd/blob/pmd_releases/6.0.1/docs/pages/release_notes.md#external-contributions>External Contributions * #796 <https://github.com/pmd/pmd/pull/796>: [apex] AvoidDirectAccessTriggerMap incorrectly detects array access in classes - Robert Sösemann <https://github.com/up2go-rsoesemann> * #799 <https://github.com/pmd/pmd/pull/799>: [apex] Method chaining breaks ApexCRUDViolation - Robert Sösemann <https://github.com/up2go-rsoesemann> |
|
From: Andreas D. <and...@ad...> - 2018-01-11 18:36:18
|
Thanks! This is fixed now. Am 09.01.2018 um 21:18 schrieb Mark Abene: > This is a dead link: > > https://pmd.github.io/latest/usage/integrations.html#Eclipse > > It appears at the bottom of https://pmd.github.io/ in the "Plugins" > section. > You may want to update your page. > > Regards, > Mark > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > _______________________________________________ > Pmd-devel mailing list > Pmd...@li... > https://lists.sourceforge.net/lists/listinfo/pmd-devel |
|
From: Andreas D. <and...@ad...> - 2018-01-11 18:27:11
|
Another idea, but it's very vague: How about, if PMD would provide support for the language server protocol? https://microsoft.github.io/language-server-protocol/ It definitely would need some thought and PoCs (e.g. we do not need only access to the source code of a single file, but also to the compiled classes). But it might open the door to integrate into other tools/editors and would be something like "PMD as a Service" :) Am 10.01.2018 um 21:58 schrieb Juan Martín Sotuyo Dodero: > Nice ideas! We should write drafts for those too, and try to rank > them by impact / detect if any are too big for a single GSoC. > > I like the idea of using gitter! Since it uses github to login it's > easier to setup / know who is who. > > On Wed, Jan 10, 2018 at 5:05 PM, Andreas Dangel > <and...@ad... <mailto:and...@ad...>> wrote: > > Thanks for taking the initiative! > > > Am 08.01.2018 um 04:58 schrieb Juan Martín Sotuyo Dodero: >> >> Given the success of our participation in GSoC 2017, we will be >> applying again this year. >> >> I’ve already created the organization, and started filling the >> application. >> >> I’ve taken the time to clean up the idea list a little. I created >> a new wiki page [GSoC 2017] Taken Ideas Archive & Status >> <https://github.com/pmd/pmd/wiki/%5BGSoC-2017%5D-Taken-Ideas-Archive-&-Status> >> for the ideas already taken. >> >> I’ve updated Project Ideas [Mature] >> <https://github.com/pmd/pmd/wiki/Project-Ideas-%5BMature%5D> with >> the timeline for GSoC 2018, and cleaned up the idea list. >> >> I’ve cleaned up Roadmap and future directions >> <https://github.com/pmd/pmd/wiki/Roadmap-and-future-directions>, >> as some of the things listed there have already been implemented >> over 2017. >> >> I think we should all try to chip in to produce an idea list we >> are comfortable with. >> >> Some ideas (without a specific order): >> >> * #360 <https://github.com/pmd/pmd/issues/360> [core] Add >> integration tests against real projects >> > +1 > There are two main benefits: Find potential parsing errors > (grammar related) and find rule errors which gives us all more > confidence. > >> * #237 <https://github.com/pmd/pmd/issues/237> [core] RFC: >> Analyzing embedded snippets from other languages >> * Revamping Data Flow Analysis - it doesn’t support many >> features from java 1.5+, has plenty of issues… >> * Work on the new designer - we already have #714 >> <https://github.com/pmd/pmd/issues/714> and we can probably >> think even more stuff to do on it >> > > Another GUI related project would be: Graphical Rule Set Builder > a) built in rules > b) set/configure properties > c) support custom rules > d) migrate old rulesets? > It would allow to simply create your own custom ruleset by > selecting the rules you want. Similar like the configuration of > checkstyle within eclipse. > > >> * #361 <https://github.com/pmd/pmd/issues/361> [core] Enable / >> update dogfood ruleset on PMD’s codebase >> > > > Would it make sense to have a project for Java 10? -> #743 > <https://github.com/pmd/pmd/issues/743> > > > Since we have currently no rules for Java in the security > category, maybe something like > https://github.com/GDSSecurity/GDS-PMD-Security-Rules > <https://github.com/GDSSecurity/GDS-PMD-Security-Rules> (Note: > this is GPL licensed...) > > > Oh, and something different: What do you think of using IRC (e.g. > http://webchat.freenode.net/?channels=%23pmd&uio=MTY9dHJ1ZQ79 > <http://webchat.freenode.net/?channels=%23pmd&uio=MTY9dHJ1ZQ79>), > or should we register for https://gitter.im ? > > > > >> All ideas and feedback are welcomed >> >> >> >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> >> >> _______________________________________________ >> Pmd-devel mailing list >> Pmd...@li... >> <mailto:Pmd...@li...> >> https://lists.sourceforge.net/lists/listinfo/pmd-devel >> <https://lists.sourceforge.net/lists/listinfo/pmd-devel> > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Pmd-devel mailing list > Pmd...@li... > <mailto:Pmd...@li...> > https://lists.sourceforge.net/lists/listinfo/pmd-devel > <https://lists.sourceforge.net/lists/listinfo/pmd-devel> > > |
|
From: Juan M. S. D. <jua...@gm...> - 2018-01-10 20:58:58
|
Nice ideas! We should write drafts for those too, and try to rank them by impact / detect if any are too big for a single GSoC. I like the idea of using gitter! Since it uses github to login it's easier to setup / know who is who. On Wed, Jan 10, 2018 at 5:05 PM, Andreas Dangel <and...@ad...> wrote: > Thanks for taking the initiative! > > > Am 08.01.2018 um 04:58 schrieb Juan Martín Sotuyo Dodero: > > Given the success of our participation in GSoC 2017, we will be applying > again this year. > > I’ve already created the organization, and started filling the application. > > I’ve taken the time to clean up the idea list a little. I created a new > wiki page [GSoC 2017] Taken Ideas Archive & Status > <https://github.com/pmd/pmd/wiki/%5BGSoC-2017%5D-Taken-Ideas-Archive-&-Status> > for the ideas already taken. > > I’ve updated Project Ideas [Mature] > <https://github.com/pmd/pmd/wiki/Project-Ideas-%5BMature%5D> with the > timeline for GSoC 2018, and cleaned up the idea list. > > I’ve cleaned up Roadmap and future directions > <https://github.com/pmd/pmd/wiki/Roadmap-and-future-directions>, as some > of the things listed there have already been implemented over 2017. > > I think we should all try to chip in to produce an idea list we are > comfortable with. > > Some ideas (without a specific order): > > - #360 <https://github.com/pmd/pmd/issues/360> [core] Add integration > tests against real projects > > +1 > There are two main benefits: Find potential parsing errors (grammar > related) and find rule errors which gives us all more confidence. > > > - #237 <https://github.com/pmd/pmd/issues/237> [core] RFC: Analyzing > embedded snippets from other languages > - Revamping Data Flow Analysis - it doesn’t support many features from > java 1.5+, has plenty of issues… > - Work on the new designer - we already have #714 > <https://github.com/pmd/pmd/issues/714> and we can probably think even > more stuff to do on it > > > Another GUI related project would be: Graphical Rule Set Builder > a) built in rules > b) set/configure properties > c) support custom rules > d) migrate old rulesets? > It would allow to simply create your own custom ruleset by selecting the > rules you want. Similar like the configuration of checkstyle within eclipse. > > > > - #361 <https://github.com/pmd/pmd/issues/361> [core] Enable / update > dogfood ruleset on PMD’s codebase > > > > Would it make sense to have a project for Java 10? -> #743 > <https://github.com/pmd/pmd/issues/743> > > > Since we have currently no rules for Java in the security category, maybe > something like https://github.com/GDSSecurity/GDS-PMD-Security-Rules > (Note: this is GPL licensed...) > > > Oh, and something different: What do you think of using IRC (e.g. > http://webchat.freenode.net/?channels=%23pmd&uio=MTY9dHJ1ZQ79), or should > we register for https://gitter.im ? > > > > > > > All ideas and feedback are welcomed > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > > _______________________________________________ > Pmd-devel mailing lis...@li...://lists.sourceforge.net/lists/listinfo/pmd-devel > > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Pmd-devel mailing list > Pmd...@li... > https://lists.sourceforge.net/lists/listinfo/pmd-devel > > |
|
From: Andreas D. <and...@ad...> - 2018-01-10 20:05:42
|
Thanks for taking the initiative! Am 08.01.2018 um 04:58 schrieb Juan Martín Sotuyo Dodero: > > Given the success of our participation in GSoC 2017, we will be > applying again this year. > > I’ve already created the organization, and started filling the > application. > > I’ve taken the time to clean up the idea list a little. I created a > new wiki page [GSoC 2017] Taken Ideas Archive & Status > <https://github.com/pmd/pmd/wiki/%5BGSoC-2017%5D-Taken-Ideas-Archive-&-Status> > for the ideas already taken. > > I’ve updated Project Ideas [Mature] > <https://github.com/pmd/pmd/wiki/Project-Ideas-%5BMature%5D> with the > timeline for GSoC 2018, and cleaned up the idea list. > > I’ve cleaned up Roadmap and future directions > <https://github.com/pmd/pmd/wiki/Roadmap-and-future-directions>, as > some of the things listed there have already been implemented over 2017. > > I think we should all try to chip in to produce an idea list we are > comfortable with. > > Some ideas (without a specific order): > > * #360 <https://github.com/pmd/pmd/issues/360> [core] Add > integration tests against real projects > +1 There are two main benefits: Find potential parsing errors (grammar related) and find rule errors which gives us all more confidence. > * #237 <https://github.com/pmd/pmd/issues/237> [core] RFC: Analyzing > embedded snippets from other languages > * Revamping Data Flow Analysis - it doesn’t support many features > from java 1.5+, has plenty of issues… > * Work on the new designer - we already have #714 > <https://github.com/pmd/pmd/issues/714> and we can probably think > even more stuff to do on it > Another GUI related project would be: Graphical Rule Set Builder a) built in rules b) set/configure properties c) support custom rules d) migrate old rulesets? It would allow to simply create your own custom ruleset by selecting the rules you want. Similar like the configuration of checkstyle within eclipse. > * #361 <https://github.com/pmd/pmd/issues/361> [core] Enable / > update dogfood ruleset on PMD’s codebase > Would it make sense to have a project for Java 10? -> #743 <https://github.com/pmd/pmd/issues/743> Since we have currently no rules for Java in the security category, maybe something like https://github.com/GDSSecurity/GDS-PMD-Security-Rules (Note: this is GPL licensed...) Oh, and something different: What do you think of using IRC (e.g. http://webchat.freenode.net/?channels=%23pmd&uio=MTY9dHJ1ZQ79), or should we register for https://gitter.im ? > All ideas and feedback are welcomed > > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > _______________________________________________ > Pmd-devel mailing list > Pmd...@li... > https://lists.sourceforge.net/lists/listinfo/pmd-devel |
|
From: Mark A. <ph...@ph...> - 2018-01-09 20:48:34
|
This is a dead link: https://pmd.github.io/latest/usage/integrations.html#Eclipse It appears at the bottom of https://pmd.github.io/ in the "Plugins" section. You may want to update your page. Regards, Mark |
|
From: Juan M. S. D. <jua...@gm...> - 2018-01-08 03:58:58
|
Given the success of our participation in GSoC 2017, we will be applying again this year. I’ve already created the organization, and started filling the application. I’ve taken the time to clean up the idea list a little. I created a new wiki page [GSoC 2017] Taken Ideas Archive & Status <https://github.com/pmd/pmd/wiki/%5BGSoC-2017%5D-Taken-Ideas-Archive-&-Status> for the ideas already taken. I’ve updated Project Ideas [Mature] <https://github.com/pmd/pmd/wiki/Project-Ideas-%5BMature%5D> with the timeline for GSoC 2018, and cleaned up the idea list. I’ve cleaned up Roadmap and future directions <https://github.com/pmd/pmd/wiki/Roadmap-and-future-directions>, as some of the things listed there have already been implemented over 2017. I think we should all try to chip in to produce an idea list we are comfortable with. Some ideas (without a specific order): - #360 <https://github.com/pmd/pmd/issues/360> [core] Add integration tests against real projects - #237 <https://github.com/pmd/pmd/issues/237> [core] RFC: Analyzing embedded snippets from other languages - Revamping Data Flow Analysis - it doesn’t support many features from java 1.5+, has plenty of issues… - Work on the new designer - we already have #714 <https://github.com/pmd/pmd/issues/714> and we can probably think even more stuff to do on it - #361 <https://github.com/pmd/pmd/issues/361> [core] Enable / update dogfood ruleset on PMD’s codebase All ideas and feedback are welcomed |
|
From: Rory O'D. <ror...@or...> - 2017-12-18 10:11:54
|
Hi Andreas, *JDK 10 entered Rampdown Phase One on Thursday, 14 December [1] * * The Rampdown Phase One process will be similar to that of JDK 9 [2]. *JDK 10 Early Access build 36 is available at : - jdk.java.net/10/* Notable changes since previous email. *JEPS included **the last 3 builds:* JDK-8192833 <https://bugs.openjdk.java.net/browse/JDK-8192833> :This is the primary implementation subtask of JEP 322 - *Time-Based Release Versioning* JDK-8189941 <https://bugs.openjdk.java.net/browse/JDK-8189941> : Implementation JEP 312: Thread-local handshake JDK-8186571 <https://bugs.openjdk.java.net/browse/JDK-8186571> : Implementation: JEP 307: Parallel Full GC for G1 JDK-8190308 <https://bugs.openjdk.java.net/browse/JDK-8190308> : Implementation: JEP 316: Heap Allocation on Alternative Memory Devices *build 36 *JDK-8148421 <https://bugs.openjdk.java.net/browse/JDK-8148421> : Transport Layer Security (TLS) Session Hash and Extended Master Secret Extension JDK-5016517 <https://bugs.openjdk.java.net/browse/JDK-5016517> : Replace plaintext passwords by hashed passwords for out-of-the-box JMX Agent ** *build 35 * JDK-8188870 <https://bugs.openjdk.java.net/browse/JDK-8188870> - Bump classfile version number to 54 JDK-8185985 <http://bugs.openjdk.java.net/browse/JDK-8185985> - HTML files in doc-files subdirectories are wrapped with standard javadoc decorations JDK-8186535 <http://bugs.openjdk.java.net/browse/JDK-8186535>*- *Remove deprecated pre-1.2 SecurityManager methods and fields *build 34* - JDK-8024352 <http://bugs.openjdk.java.net/browse/JDK-8024352> - MBeanOperationInfo accepts any int value as "impact" *Bug fixes reported by Open Source Projects :*<https://bugs.openjdk.java.net/browse/JDK-8191834> JDK-8191078 <https://bugs.openjdk.java.net/browse/JDK-8191078> : Wrong "Package not found" warning JDK-8191636 <https://bugs.openjdk.java.net/browse/JDK-8191636> : [Windows] jshell tool: Wrong character in /env class-path command crashes jshell JDK-8191834 <https://bugs.openjdk.java.net/browse/JDK-8191834> : Assigning a void expression to a "var" crashes the compiler<https://bugs.openjdk.java.net/browse/JDK-8182638> JDK-8182638 <https://bugs.openjdk.java.net/browse/JDK-8182638> : [macosx] Active modal dialog is hidden by another non-active one JDK-8043315 <https://bugs.openjdk.java.net/browse/JDK-8043315> : Nimbus: Setting Nimbus.Overrides property affects custom keymap installation JDK-8172244 <https://bugs.openjdk.java.net/browse/JDK-8172244> : AIOOBE in KeyStore.getCertificateAlias on Windows JDK-8180141 <https://bugs.openjdk.java.net/browse/JDK-8180141> : Missing entry in LineNumberTable for break statement that jumps out of try-finall JDK 10 Schedule, Status & Features are available [3] *Feedback* - If you have suggestions or encounter bugs, please submit them using the usual Java SE bug-reporting channel. Be sure to include complete version information from the output of the |java --version| command. Regards, Rory [1] http://mail.openjdk.java.net/pipermail/jdk-dev/2017-December/000357.html [2] http://openjdk.java.net/projects/jdk9/rdp-1 [3] http://openjdk.java.net/projects/jdk/10/ -- Rgds,Rory O'Donnell Quality Engineering Manager Oracle EMEA , Dublin, Ireland |
|
From: Juan M. S. D. <jua...@gm...> - 2017-12-15 20:38:55
|
I'd like to take the chance to thank everyone that contributed on this release. This is by far the most significant update to PMD in a couple years, and took a significant amount of effort from a lot of people, and I'm extremely grateful to all that helped on this. We strongly believe this new release is a far better foundation for things to come. We should now be able to switch back to our regular ~1 month release cycles, so incremental updates and fixes should come quick enough. On Fri, Dec 15, 2017 at 1:15 PM, Andreas Dangel <and...@ad...> wrote: > The PMD team is pleased to announce PMD 6.0.0. > > This is a major release. > > * Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F6. > 0.0 > * Documentation: https://pmd.github.io/pmd-6.0.0/ > * Release Notes: https://pmd.github.io/pmd-6.0.0/pmd_release_notes.html > > That's quite a big release containing metrics, typeresolution, many new > rules, ruleset categories, new rule designer, ... > > Many thanks to all contributors! > > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Pmd-devel mailing list > Pmd...@li... > https://lists.sourceforge.net/lists/listinfo/pmd-devel > |
|
From: Andreas D. <and...@ad...> - 2017-12-15 16:32:26
|
The PMD team is pleased to announce PMD 6.0.0. This is a major release. * Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F6.0.0 * Documentation: https://pmd.github.io/pmd-6.0.0/ * Release Notes: https://pmd.github.io/pmd-6.0.0/pmd_release_notes.html That's quite a big release containing metrics, typeresolution, many new rules, ruleset categories, new rule designer, ... Many thanks to all contributors! |
|
From: Rory O'D. <ror...@or...> - 2017-11-28 15:29:53
|
Hi Andreas, *JDK 10 Early Access build 33 is available at : - **jdk.java.net/10/* Notable changes since previous email. <http://bugs.openjdk.java.net/browse/JDK-8175094>JDK-8180019 <http://bugs.openjdk.java.net/browse/JDK-8180019> - *javadoc treats failure to access a URL as an error , not a warning.* If javadoc cannot access the contents of a URL provided with the -link or -linkoffline options,the tool will now report an error. Previously, the tool continued with a warning, producing incorrect documentation output. JDK-8175094 <http://bugs.openjdk.java.net/browse/JDK-8175094>*- **The java.security.acl APIs are deprecated, for removal**** * The deprecated java.security.acl APIs are now marked with forRemoval=true and are subject to removal in a future version of Java SE. JDK-8175091 <http://bugs.openjdk.java.net/browse/JDK-8175091> *- The java.security.{Certificate,Identity,IdentityScope,Signer} APIs are deprecated, for removal* The deprecated java.security.{Certificate, Identity, IdentityScope, Signer} classes are now marked with forRemoval=true and are subject to removal in a future version of Java SE. JDK 10 Schedule, Status & Features are available [1] Notes * OpenJDK EA binaries will be available at a later date. * Oracle has proposed: Newer version-string scheme for the Java SE Platform and the JDK o Please see Mark Reinhold's proposal [2] *JDK 8u162 Early Access build 03 is available at :- http://jdk.java.net/8/* <http://openjdk.java.net/projects/jdk8u/releases/8u162.html> *Feedback* - If you have suggestions or encounter bugs, please submit them using the usual Java SE bug-reporting channel. Be sure to include complete version information from the output of the |java --version| command. Regards, Rory [1] http://openjdk.java.net/projects/jdk/10/ [2] http://mail.openjdk.java.net/pipermail/jdk-dev/2017-November/000089.html -- Rgds,Rory O'Donnell Quality Engineering Manager Oracle EMEA , Dublin, Ireland |
|
From: Rory O'D. <ror...@or...> - 2017-11-03 10:07:57
|
Hi Andreas, JDK 10 Early Access build 29 is available at : - jdk.java.net/10/ JDK 10 Early Access Release Notes are available [1] JDK 10 Schedule, Status & Features are available [2] Notes * OpenJDK EA binaries will be available at a later date. * Oracle has proposed: Newer version-string scheme for the Java SE Platform and the JDK o Please see Mark Reinhold's proposal [3] , feedback via the mailing list to Mark please. <http://openjdk.java.net/projects/jdk8u/releases/8u162.html> Feedback - If you have suggestions or encounter bugs, please submit them using the usual Java SE bug-reporting channel. Be sure to include complete version information from the output of the |java --version| command. Regards, Rory [1] http://jdk.java.net/10/release-notes [2] http://openjdk.java.net/projects/jdk/10/ [3] http://mail.openjdk.java.net/pipermail/jdk-dev/2017-November/000089.html -- Rgds,Rory O'Donnell Quality Engineering Manager Oracle EMEA , Dublin, Ireland |
|
From: Rory O'D. <ror...@or...> - 2017-10-27 08:39:36
|
Hi Andreas, *JDK 8u162 Early Access* build 01 is available at : - jdk.java.net/8/ <http://jdk.java.net/8/> Information and schedules specific to OpenJDK 8u162 release are listed here <http://openjdk.java.net/projects/jdk8u/releases/8u162.html> <http://openjdk.java.net/projects/jdk8u/releases/8u162.html> *JRE and JDK Cryptographic Roadmap* has been updated the details are here <https://www.java.com/en/jre-jdk-cryptoroadmap.html> ** *JavaOne2017* took place October 1 to 5, 2017 at San Francisco. If you were unable to attend the event or missed some talks, below you will find links to keynotes from last week that have been posted for on-demand replay: * JavaOne Opening Keynote (Monday, Oct. 2): o https://www.oracle.com/javaone/on-demand.html?bcid=5596229112001 * Oracle Code Keynote (Tuesday, Oct. 3): o https://www.oracle.com/javaone/on-demand.html?bcid=5600354378001 * JavaOne Community Keynote (Thursday, Oct. 5): o https://www.oracle.com/javaone/on-demand.html?bcid=5604479599001 Regards, Rory -- Rgds,Rory O'Donnell Quality Engineering Manager Oracle EMEA , Dublin, Ireland |
|
From: Vikram S. <sin...@gm...> - 2017-10-24 14:01:47
|
Thank you for your response. On 24 Oct 2017 7:13 pm, "Juan Martín Sotuyo Dodero" <jua...@gm...> wrote: > Hi Vikram, > > Is this to be done as part of a PMD rule, or for a different application? > > If it's a PMD rule, you should be looking at https://pmd.github.io/ > latest/apidocs/net/sourceforge/pmd/lang/apex/rule/AbstractApexRule.html > which is a visitor on the AST you can implement to look at ASTUserClass > nodes and get their names. > > If this is for a different application, you can use that parser to obtain > a root node for the compilation unit, and then use https://pmd.github.io/ > latest/apidocs/net/sourceforge/pmd/lang/apex/ast/ > ApexParserVisitorAdapter.html to write a visitor on that tree. However, > you may opt to use Apex Jorje directly instead of PMD's abstractions over > it. > > Regards > > On Tue, Oct 24, 2017 at 9:52 AM, Vikram Singh <sin...@gm... > > wrote: > >> Hi, I've been wanting to parse or iterate through AST generated for APEX >> class and extract method names from the class file. I've been studying >> about parsing and here's what i found so far. https://pmd.github.io/lat >> est/apidocs/net/sourceforge/pmd/lang/apex/ast/ApexParser.html >> >> Any help regarding this is well appreciated. >> Thanks in advance. >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Pmd-devel mailing list >> Pmd...@li... >> https://lists.sourceforge.net/lists/listinfo/pmd-devel >> >> > |
|
From: Juan M. S. D. <jua...@gm...> - 2017-10-24 13:44:05
|
Hi Vikram, Is this to be done as part of a PMD rule, or for a different application? If it's a PMD rule, you should be looking at https://pmd.github.io/latest/apidocs/net/sourceforge/pmd/lang/apex/rule/AbstractApexRule.html which is a visitor on the AST you can implement to look at ASTUserClass nodes and get their names. If this is for a different application, you can use that parser to obtain a root node for the compilation unit, and then use https://pmd.github.io/latest/apidocs/net/sourceforge/pmd/lang/apex/ast/ApexParserVisitorAdapter.html to write a visitor on that tree. However, you may opt to use Apex Jorje directly instead of PMD's abstractions over it. Regards On Tue, Oct 24, 2017 at 9:52 AM, Vikram Singh <sin...@gm...> wrote: > Hi, I've been wanting to parse or iterate through AST generated for APEX > class and extract method names from the class file. I've been studying > about parsing and here's what i found so far. https://pmd.github.io/ > latest/apidocs/net/sourceforge/pmd/lang/apex/ast/ApexParser.html > > Any help regarding this is well appreciated. > Thanks in advance. > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Pmd-devel mailing list > Pmd...@li... > https://lists.sourceforge.net/lists/listinfo/pmd-devel > > |
|
From: Vikram S. <sin...@gm...> - 2017-10-24 12:52:31
|
Hi, I've been wanting to parse or iterate through AST generated for APEX class and extract method names from the class file. I've been studying about parsing and here's what i found so far. https://pmd.github.io/latest/apidocs/net/sourceforge/pmd/lang/apex/ast/ApexParser.html Any help regarding this is well appreciated. Thanks in advance. |
|
From: Juan M. S. D. <jua...@gm...> - 2017-10-05 13:54:14
|
Vikram, PMD has no specific rules for AngularJS. As a Javascript library / framework, all current Javascript rules apply <https://pmd.github.io/pmd-5.8.1/pmd-javascript/rules/index.html>. However, all such rules are general, and not specific to AngularJS best-practices (nor React, Backbone, nor any other for the case). You can however write rules yourself <https://pmd.github.io/pmd-5.8.1/customizing/howtowritearule.html>, either using a Java visitor on the AST, or simply using XPath <https://pmd.github.io/pmd-5.8.1/customizing/xpathruletutorial.html>. Just bare in mind, type resolution is not available for JS at the time of this writing. Feel free to submit your rules as PRs for consideration, we are always looking to expand our current rulesets. Those links should be enough to get you started. If you have more doubts, feel free to ask. Regards On Thu, Oct 5, 2017 at 7:23 AM, Vikram Singh <sin...@gm...> wrote: > Hi, I want to use PMD for static code analysis of my angularjs project. I > needed help regarding rulesets for angular js code becuase i could easily > find rule sets for javascript syntax but not for MVC scripting languages > like angularjs. Any help regarding any existing rulesets or how can i write > one for my project, will be apprecited. > > Thanks in Advance. > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Pmd-devel mailing list > Pmd...@li... > https://lists.sourceforge.net/lists/listinfo/pmd-devel > > |
|
From: Vikram S. <sin...@gm...> - 2017-10-05 10:23:52
|
Hi, I want to use PMD for static code analysis of my angularjs project. I needed help regarding rulesets for angular js code becuase i could easily find rule sets for javascript syntax but not for MVC scripting languages like angularjs. Any help regarding any existing rulesets or how can i write one for my project, will be apprecited. Thanks in Advance. |
|
From: Juan M. S. D. <jua...@gm...> - 2017-10-04 13:06:13
|
This particular XPath function has been around since PMD 4.1 On Wed, Oct 4, 2017 at 1:45 AM, Valeriy Manenkov <v.m...@gm...> wrote: > Thank you! This is what I need. > > What version of PMD first introduced this functionality? > > > On Oct 4, 2017 2:10 AM, "Juan Martín Sotuyo Dodero" <jua...@gm...> > wrote: > >> Valeriy, it seems you are looking for type resolution code. You have the >> `typeof` function available to do just that, and let it handle everything >> on it's own (imports, fully-qualified access, star imports, same package >> visibility, etc.). >> >> You can find more info on how to use this function from XPath on our >> docs: https://pmd.github.io/pmd-5.8.1/customizing/howtowrite >> arule.html#I_need_some_kind_of_Type_Resolution_for_my_rule >> >> Hope that helps! >> >> On Mon, Oct 2, 2017 at 11:01 AM, Valeriy Manenkov <v.m...@gm...> >> wrote: >> >>> Hello, >>> >>> I will begin immediately with an example: >>> >>> void okMethod3() { >>> // ... >>> MyType con = connectionFactory.createConnection(); >>> // ... >>> publisher.close(); >>> session.close(); >>> con.stop(); // !!! does not free jms resources >>> } >>> >>> void okMethod3() { >>> // ... >>> Connection con = connectionFactory.createConnection(); >>> // ... >>> publisher.close(); >>> session.close(); >>> con.stop(); // !!! does not free jms resources >>> other.close(); >>> } >>> >>> I need to add violation to line `con.stop()` when `con` have >>> `Connection` type. How to check type of variable with PMD using XPath? >>> >>> I tried this, xpath expression: >>> >>> //BlockStatement >>> [ends-with(Statement/StatementExpression/PrimaryExpression/P >>> rimaryPrefix/Name/@Image, >>> '.stop')] >>> [starts-with(Statement/StatementExpression/PrimaryExpression >>> /PrimaryPrefix/Name/@Image, >>> ancestor::MethodDeclaration//BlockStatement/LocalVariableDec >>> laration/VariableDeclarator/VariableDeclaratorId >>> [../Type/ReferenceType/ClassOrInterfaceType[@Image='Connection']] >>> [//ImportDeclaration/Name[@Image='javax.jms.Connection']] >>> )] >>> >>> But it is not works >>> >>> -- >>> Regards, >>> Valeriy Manenkov >>> >>> ------------------------------------------------------------ >>> ------------------ >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> _______________________________________________ >>> Pmd-devel mailing list >>> Pmd...@li... >>> https://lists.sourceforge.net/lists/listinfo/pmd-devel >>> >> >> |
|
From: Valeriy M. <v.m...@gm...> - 2017-10-04 04:45:55
|
Thank you! This is what I need. What version of PMD first introduced this functionality? On Oct 4, 2017 2:10 AM, "Juan Martín Sotuyo Dodero" <jua...@gm...> wrote: > Valeriy, it seems you are looking for type resolution code. You have the > `typeof` function available to do just that, and let it handle everything > on it's own (imports, fully-qualified access, star imports, same package > visibility, etc.). > > You can find more info on how to use this function from XPath on our docs: > https://pmd.github.io/pmd-5.8.1/customizing/howtowritearule.html#I_need_ > some_kind_of_Type_Resolution_for_my_rule > > Hope that helps! > > On Mon, Oct 2, 2017 at 11:01 AM, Valeriy Manenkov <v.m...@gm...> > wrote: > >> Hello, >> >> I will begin immediately with an example: >> >> void okMethod3() { >> // ... >> MyType con = connectionFactory.createConnection(); >> // ... >> publisher.close(); >> session.close(); >> con.stop(); // !!! does not free jms resources >> } >> >> void okMethod3() { >> // ... >> Connection con = connectionFactory.createConnection(); >> // ... >> publisher.close(); >> session.close(); >> con.stop(); // !!! does not free jms resources >> other.close(); >> } >> >> I need to add violation to line `con.stop()` when `con` have >> `Connection` type. How to check type of variable with PMD using XPath? >> >> I tried this, xpath expression: >> >> //BlockStatement >> [ends-with(Statement/StatementExpression/PrimaryExpression/P >> rimaryPrefix/Name/@Image, >> '.stop')] >> [starts-with(Statement/StatementExpression/PrimaryExpression >> /PrimaryPrefix/Name/@Image, >> ancestor::MethodDeclaration//BlockStatement/LocalVariableDec >> laration/VariableDeclarator/VariableDeclaratorId >> [../Type/ReferenceType/ClassOrInterfaceType[@Image='Connection']] >> [//ImportDeclaration/Name[@Image='javax.jms.Connection']] >> )] >> >> But it is not works >> >> -- >> Regards, >> Valeriy Manenkov >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Pmd-devel mailing list >> Pmd...@li... >> https://lists.sourceforge.net/lists/listinfo/pmd-devel >> > > |
|
From: Juan M. S. D. <jua...@gm...> - 2017-10-03 23:10:29
|
Valeriy, it seems you are looking for type resolution code. You have the `typeof` function available to do just that, and let it handle everything on it's own (imports, fully-qualified access, star imports, same package visibility, etc.). You can find more info on how to use this function from XPath on our docs: https://pmd.github.io/pmd-5.8.1/customizing/howtowritearule.html#I_need_some_kind_of_Type_Resolution_for_my_rule Hope that helps! On Mon, Oct 2, 2017 at 11:01 AM, Valeriy Manenkov <v.m...@gm...> wrote: > Hello, > > I will begin immediately with an example: > > void okMethod3() { > // ... > MyType con = connectionFactory.createConnection(); > // ... > publisher.close(); > session.close(); > con.stop(); // !!! does not free jms resources > } > > void okMethod3() { > // ... > Connection con = connectionFactory.createConnection(); > // ... > publisher.close(); > session.close(); > con.stop(); // !!! does not free jms resources > other.close(); > } > > I need to add violation to line `con.stop()` when `con` have > `Connection` type. How to check type of variable with PMD using XPath? > > I tried this, xpath expression: > > //BlockStatement > [ends-with(Statement/StatementExpression/PrimaryExpression/ > PrimaryPrefix/Name/@Image, > '.stop')] > [starts-with(Statement/StatementExpression/PrimaryExpression/ > PrimaryPrefix/Name/@Image, > ancestor::MethodDeclaration//BlockStatement/ > LocalVariableDeclaration/VariableDeclarator/VariableDeclaratorId > [../Type/ReferenceType/ClassOrInterfaceType[@Image='Connection']] > [//ImportDeclaration/Name[@Image='javax.jms.Connection']] > )] > > But it is not works > > -- > Regards, > Valeriy Manenkov > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Pmd-devel mailing list > Pmd...@li... > https://lists.sourceforge.net/lists/listinfo/pmd-devel > |
|
From: Valeriy M. <v.m...@gm...> - 2017-10-02 14:01:37
|
Hello,
I will begin immediately with an example:
void okMethod3() {
// ...
MyType con = connectionFactory.createConnection();
// ...
publisher.close();
session.close();
con.stop(); // !!! does not free jms resources
}
void okMethod3() {
// ...
Connection con = connectionFactory.createConnection();
// ...
publisher.close();
session.close();
con.stop(); // !!! does not free jms resources
other.close();
}
I need to add violation to line `con.stop()` when `con` have
`Connection` type. How to check type of variable with PMD using XPath?
I tried this, xpath expression:
//BlockStatement
[ends-with(Statement/StatementExpression/PrimaryExpression/PrimaryPrefix/Name/@Image,
'.stop')]
[starts-with(Statement/StatementExpression/PrimaryExpression/PrimaryPrefix/Name/@Image,
ancestor::MethodDeclaration//BlockStatement/LocalVariableDeclaration/VariableDeclarator/VariableDeclaratorId
[../Type/ReferenceType/ClassOrInterfaceType[@Image='Connection']]
[//ImportDeclaration/Name[@Image='javax.jms.Connection']]
)]
But it is not works
--
Regards,
Valeriy Manenkov
|