pmd-devel Mailing List for PMD (Page 12)
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: Caleb K. <cal...@en...> - 2017-07-12 20:49:20
|
Awesome, thanks!
On Jul 12, 2017 3:47 PM, "Juan Martín Sotuyo Dodero" <jua...@gm...>
wrote:
> Yeap, you got it.
>
> On Wed, Jul 12, 2017 at 5:27 PM, Caleb Knox <cal...@en...>
> wrote:
>
>> So, I should add my variables into the ruleViolationAdded method, and/or
>> add the RuleViolation instances to a list? Right now, my variables are
>> lists to which I add a value every time the method is called.
>>
>> public void ruleViolationAdded(RuleViolation ruleViolation) {
>> violations.incrementAndGet();
>> l_rule.add(ruleViolation.getRule().getName());
>> l_message.add(ruleViolation.getDescription());
>> l_beginLine.add(ruleViolation.getBeginLine());
>> l_endLine.add(ruleViolation.getEndLine());
>>
>> //l_ruleset.add("Custom");
>> //l_priority.add(3);
>>
>> //j++;
>> }
>>
>> On Wed, Jul 12, 2017 at 3:20 PM, Juan Martín Sotuyo Dodero <
>> jua...@gm...> wrote:
>>
>>> You should use directly the ruleViolationAdded method.
>>>
>>> Keep in mind that method will be called once for each violation found on
>>> any file. Your local variables l_rule, l_message, etc. will be
>>> rewritten, and you will only keep the last one. I’d suggest you add the
>>> RuleViolations to a list and process them after analysis.
>>>
>>> Regards
>>>
>>>
>>> On Wed, Jul 12, 2017 at 4:43 PM, Caleb Knox <cal...@en...>
>>> wrote:
>>>
>>>> Hello again,
>>>>
>>>> Here is some code I have for extracting the details of the PMD reports.
>>>>
>>>> RuleContext l_ctx = new RuleContext();
>>>> final AtomicInteger violations = new AtomicInteger(0);
>>>> l_ctx.getReport().addListener(new
>>>> ThreadSafeReportListener() {
>>>> @Override
>>>> public void ruleViolationAdded(RuleViolation
>>>> ruleViolation) {
>>>> violations.incrementAndGet();
>>>> }
>>>>
>>>> // here is where you can extract violation info
>>>> // to update bean
>>>> public void ruleViolationDetailExtractor(RuleViolation
>>>> ruleViolation) {
>>>> l_rule = ruleViolation.getRule().getName();
>>>> l_message = ruleViolation.getDescription();
>>>> l_beginLine = ruleViolation.getBeginLine();
>>>> l_endLine = ruleViolation.getEndLine();
>>>>
>>>> }
>>>>
>>>> @Override
>>>> public void metricAdded(Metric metric) {
>>>> }
>>>> });
>>>>
>>>> Does anyone know how I use the listener or my
>>>> ruleViolationDetailExtractor method outside of this context such that I can
>>>> populate a bean with the specified details (l_rule, l_message, etc.)?
>>>>
>>>> Should I return the variables? Put my bean updating in the listener
>>>> (that seems very wrong)?
>>>>
>>>> Thank you.
>>>>
>>>> --
>>>> Caleb Knox
>>>>
>>>> Endeveran
>>>>
>>>> ------------------------------------------------------------
>>>> ------------------
>>>> 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
>>>>
>>>>
>>>
>>
>>
>> --
>> Caleb Knox
>>
>> Endeveran
>>
>
>
|
|
From: Juan M. S. D. <jua...@gm...> - 2017-07-12 20:47:53
|
Yeap, you got it.
On Wed, Jul 12, 2017 at 5:27 PM, Caleb Knox <cal...@en...>
wrote:
> So, I should add my variables into the ruleViolationAdded method, and/or
> add the RuleViolation instances to a list? Right now, my variables are
> lists to which I add a value every time the method is called.
>
> public void ruleViolationAdded(RuleViolation ruleViolation) {
> violations.incrementAndGet();
> l_rule.add(ruleViolation.getRule().getName());
> l_message.add(ruleViolation.getDescription());
> l_beginLine.add(ruleViolation.getBeginLine());
> l_endLine.add(ruleViolation.getEndLine());
>
> //l_ruleset.add("Custom");
> //l_priority.add(3);
>
> //j++;
> }
>
> On Wed, Jul 12, 2017 at 3:20 PM, Juan Martín Sotuyo Dodero <
> jua...@gm...> wrote:
>
>> You should use directly the ruleViolationAdded method.
>>
>> Keep in mind that method will be called once for each violation found on
>> any file. Your local variables l_rule, l_message, etc. will be
>> rewritten, and you will only keep the last one. I’d suggest you add the
>> RuleViolations to a list and process them after analysis.
>>
>> Regards
>>
>>
>> On Wed, Jul 12, 2017 at 4:43 PM, Caleb Knox <cal...@en...>
>> wrote:
>>
>>> Hello again,
>>>
>>> Here is some code I have for extracting the details of the PMD reports.
>>>
>>> RuleContext l_ctx = new RuleContext();
>>> final AtomicInteger violations = new AtomicInteger(0);
>>> l_ctx.getReport().addListener(new
>>> ThreadSafeReportListener() {
>>> @Override
>>> public void ruleViolationAdded(RuleViolation
>>> ruleViolation) {
>>> violations.incrementAndGet();
>>> }
>>>
>>> // here is where you can extract violation info
>>> // to update bean
>>> public void ruleViolationDetailExtractor(RuleViolation
>>> ruleViolation) {
>>> l_rule = ruleViolation.getRule().getName();
>>> l_message = ruleViolation.getDescription();
>>> l_beginLine = ruleViolation.getBeginLine();
>>> l_endLine = ruleViolation.getEndLine();
>>>
>>> }
>>>
>>> @Override
>>> public void metricAdded(Metric metric) {
>>> }
>>> });
>>>
>>> Does anyone know how I use the listener or my
>>> ruleViolationDetailExtractor method outside of this context such that I can
>>> populate a bean with the specified details (l_rule, l_message, etc.)?
>>>
>>> Should I return the variables? Put my bean updating in the listener
>>> (that seems very wrong)?
>>>
>>> Thank you.
>>>
>>> --
>>> Caleb Knox
>>>
>>> Endeveran
>>>
>>> ------------------------------------------------------------
>>> ------------------
>>> 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
>>>
>>>
>>
>
>
> --
> Caleb Knox
>
> Endeveran
>
|
|
From: Caleb K. <cal...@en...> - 2017-07-12 20:28:06
|
So, I should add my variables into the ruleViolationAdded method, and/or
add the RuleViolation instances to a list? Right now, my variables are
lists to which I add a value every time the method is called.
public void ruleViolationAdded(RuleViolation ruleViolation) {
violations.incrementAndGet();
l_rule.add(ruleViolation.getRule().getName());
l_message.add(ruleViolation.getDescription());
l_beginLine.add(ruleViolation.getBeginLine());
l_endLine.add(ruleViolation.getEndLine());
//l_ruleset.add("Custom");
//l_priority.add(3);
//j++;
}
On Wed, Jul 12, 2017 at 3:20 PM, Juan Martín Sotuyo Dodero <
jua...@gm...> wrote:
> You should use directly the ruleViolationAdded method.
>
> Keep in mind that method will be called once for each violation found on
> any file. Your local variables l_rule, l_message, etc. will be rewritten,
> and you will only keep the last one. I’d suggest you add the RuleViolations
> to a list and process them after analysis.
>
> Regards
>
>
> On Wed, Jul 12, 2017 at 4:43 PM, Caleb Knox <cal...@en...>
> wrote:
>
>> Hello again,
>>
>> Here is some code I have for extracting the details of the PMD reports.
>>
>> RuleContext l_ctx = new RuleContext();
>> final AtomicInteger violations = new AtomicInteger(0);
>> l_ctx.getReport().addListener(new ThreadSafeReportListener()
>> {
>> @Override
>> public void ruleViolationAdded(RuleViolation
>> ruleViolation) {
>> violations.incrementAndGet();
>> }
>>
>> // here is where you can extract violation info
>> // to update bean
>> public void ruleViolationDetailExtractor(RuleViolation
>> ruleViolation) {
>> l_rule = ruleViolation.getRule().getName();
>> l_message = ruleViolation.getDescription();
>> l_beginLine = ruleViolation.getBeginLine();
>> l_endLine = ruleViolation.getEndLine();
>>
>> }
>>
>> @Override
>> public void metricAdded(Metric metric) {
>> }
>> });
>>
>> Does anyone know how I use the listener or my
>> ruleViolationDetailExtractor method outside of this context such that I can
>> populate a bean with the specified details (l_rule, l_message, etc.)?
>>
>> Should I return the variables? Put my bean updating in the listener (that
>> seems very wrong)?
>>
>> Thank you.
>>
>> --
>> Caleb Knox
>>
>> Endeveran
>>
>> ------------------------------------------------------------
>> ------------------
>> 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
>>
>>
>
--
Caleb Knox
Endeveran
|
|
From: Juan M. S. D. <jua...@gm...> - 2017-07-12 20:21:03
|
You should use directly the ruleViolationAdded method.
Keep in mind that method will be called once for each violation found on
any file. Your local variables l_rule, l_message, etc. will be rewritten,
and you will only keep the last one. I’d suggest you add the RuleViolations
to a list and process them after analysis.
Regards
On Wed, Jul 12, 2017 at 4:43 PM, Caleb Knox <cal...@en...>
wrote:
> Hello again,
>
> Here is some code I have for extracting the details of the PMD reports.
>
> RuleContext l_ctx = new RuleContext();
> final AtomicInteger violations = new AtomicInteger(0);
> l_ctx.getReport().addListener(new ThreadSafeReportListener() {
> @Override
> public void ruleViolationAdded(RuleViolation
> ruleViolation) {
> violations.incrementAndGet();
> }
>
> // here is where you can extract violation info
> // to update bean
> public void ruleViolationDetailExtractor(RuleViolation
> ruleViolation) {
> l_rule = ruleViolation.getRule().getName();
> l_message = ruleViolation.getDescription();
> l_beginLine = ruleViolation.getBeginLine();
> l_endLine = ruleViolation.getEndLine();
>
> }
>
> @Override
> public void metricAdded(Metric metric) {
> }
> });
>
> Does anyone know how I use the listener or my ruleViolationDetailExtractor
> method outside of this context such that I can populate a bean with the
> specified details (l_rule, l_message, etc.)?
>
> Should I return the variables? Put my bean updating in the listener (that
> seems very wrong)?
>
> Thank you.
>
> --
> Caleb Knox
>
> Endeveran
>
> ------------------------------------------------------------
> ------------------
> 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: Caleb K. <cal...@en...> - 2017-07-12 19:43:54
|
Hello again,
Here is some code I have for extracting the details of the PMD reports.
RuleContext l_ctx = new RuleContext();
final AtomicInteger violations = new AtomicInteger(0);
l_ctx.getReport().addListener(new ThreadSafeReportListener() {
@Override
public void ruleViolationAdded(RuleViolation ruleViolation)
{
violations.incrementAndGet();
}
// here is where you can extract violation info
// to update bean
public void ruleViolationDetailExtractor(RuleViolation
ruleViolation) {
l_rule = ruleViolation.getRule().getName();
l_message = ruleViolation.getDescription();
l_beginLine = ruleViolation.getBeginLine();
l_endLine = ruleViolation.getEndLine();
}
@Override
public void metricAdded(Metric metric) {
}
});
Does anyone know how I use the listener or my ruleViolationDetailExtractor
method outside of this context such that I can populate a bean with the
specified details (l_rule, l_message, etc.)?
Should I return the variables? Put my bean updating in the listener (that
seems very wrong)?
Thank you.
--
Caleb Knox
Endeveran
|
|
From: Juan M. S. D. <jua...@gm...> - 2017-07-12 15:15:42
|
Hello Caleb, Johnco here. Following on my response on Stackoverflow ( https://stackoverflow.com/questions/45043725/how-do-i-get-pmd-reports-the-details-therein-without-using-i-o )… The RuleContext is straightforward to create (see how doPMD does it here <https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/PMD.java#L269>), and if using the approach I suggested all the setup is done by PMD itself. All the APIs you need to use are public. You don’t need to “modify” the PMD source, you can simply use pmd-core and pmd-apex modules as dependencies and use them directly from your application code. Regards, On Wed, Jul 12, 2017 at 11:37 AM, Caleb Knox <cal...@en...> wrote: > Hi, > > I posted this on StackOverflow, but was recommended to reach out to the > mailing list. As well, the forums seem to be quite dead. > > From SO: > > "I am trying to generate a PMD report by using a custom ruleset. The input > is a bunch of Apex classes in String format. Without outputting to a file, > I'd like to then parse the report contents directly (XML format) to create > a summary of violations, begin/end lines, priority, the rule name, and the > message attached. This is to be done on multiple bodies of Apex code, > adding to a report bean every time there is a violation. > > I was trying to do this with SourceCodeProcessor, but couldn't figure out > what some of the required objects/arguments looked like, nor how they were > built. I still don't know how to make a RuleContext object property. > > Any help is massively appreciated." > I was recommended by Johnco to pursue basically rewriting doPMD for my own > needs, however, I am having some trouble. Mostly, with creating a > RuleContext (not much documentation and my investigative skills are weak as > I am a beginner) and a listener for the report. > > If anyone has any further insight, please let me know. > > Also, please let me know if this is the right way to use this mailing list. > > Thanks much. > > -- > Caleb Knox > > Endeveran > > ------------------------------------------------------------ > ------------------ > 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: Caleb K. <cal...@en...> - 2017-07-12 15:01:53
|
Hi, I posted this on StackOverflow, but was recommended to reach out to the mailing list. As well, the forums seem to be quite dead. >From SO: "I am trying to generate a PMD report by using a custom ruleset. The input is a bunch of Apex classes in String format. Without outputting to a file, I'd like to then parse the report contents directly (XML format) to create a summary of violations, begin/end lines, priority, the rule name, and the message attached. This is to be done on multiple bodies of Apex code, adding to a report bean every time there is a violation. I was trying to do this with SourceCodeProcessor, but couldn't figure out what some of the required objects/arguments looked like, nor how they were built. I still don't know how to make a RuleContext object property. Any help is massively appreciated." I was recommended by Johnco to pursue basically rewriting doPMD for my own needs, however, I am having some trouble. Mostly, with creating a RuleContext (not much documentation and my investigative skills are weak as I am a beginner) and a listener for the report. If anyone has any further insight, please let me know. Also, please let me know if this is the right way to use this mailing list. Thanks much. -- Caleb Knox Endeveran |
|
From: Andreas D. <ad...@us...> - 2017-07-07 19:48:38
|
Hi Mallikarjun, Please have a look here: https://pmd.github.io/pmd-5.8.1/pmd-apex/rules/index.html Regards, Andreas Am 06.06.2017 um 03:47 schrieb vadlamudi mallikarjun: > Hi Team, > > I am looking for rulesets for Components in salesforce. > Can you please send me the link where i can find the rulesets. > > > Thanks > Mallikarjun > > > ------------------------------------------------------------------------------ > 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 -- Andreas Dangel https://github.com/adangel skype: andreas_dangel |
|
From: Andreas D. <ad...@us...> - 2017-07-04 20:41:23
|
Hi, this depends on how you are calling PMD: Are you calling PMD from Commandline, via ANT, via maven or via gradle? For general command line options, see https://pmd.github.io/pmd-5.8.1/usage/running.html The "linkPrefix" is a property of the "html" formatter, you specify it via the "property" command line option. This should work: ./run.sh pmd -R java-basic -d src -f html -property linkPrefix="../doc-folder/src" Regards, Andreas Am 03.07.2017 um 07:18 schrieb rg...@si...: > Hello: > how to use the options "linkPrefix". > > > > ------------------------------------------------------------------------------ > 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 -- Andreas Dangel https://github.com/adangel skype: andreas_dangel |
|
From: <rg...@si...> - 2017-07-03 05:18:55
|
Hello: how to use the options "linkPrefix". |
|
From: Andreas D. <ad...@us...> - 2017-07-01 21:52:27
|
01-July-2017 - 5.8.1
The PMD team is pleased to announce PMD 5.8.1.
This is a bug fixing release.
Table Of Contents
* Fixed Issues <#>
* API Changes <#>
* External Contributions <#>
Fixed Issues
* java
o #471 <https://github.com/pmd/pmd/issues/471>: [java] Error while
processing class when EnumMap is used in PMD 5.8.0
o #477 <https://github.com/pmd/pmd/issues/477>: [core]
NoClassDefFoundError under 5.8
o #478 <https://github.com/pmd/pmd/issues/478>: [core] Processing
issues dealing with anonymous classes
API Changes
* The |getGenericArgs()| method introduced to |TypeNode| in 5.8.0 was
removed. You can access to generics' info through
the |JavaTypeDefinition| object.
* The |JavaTypeDefinitionBuilder| class introduced in 5.8.0 is not
more. You can use factory methods available on|JavaTypeDefinition|
External Contributions
* #472 <https://github.com/pmd/pmd/pull/472>: [java] fix error with
raw types, bug #471
--
Andreas Dangel
https://github.com/adangel
skype: andreas_dangel
|
|
From: Andreas D. <ad...@us...> - 2017-06-24 21:51:33
|
A new PMD for Eclipse plugin version has been released. It is available via the update site: https://dl.bintray.com/pmd/pmd-eclipse-plugin/updates/ Release notes: https://github.com/pmd/pmd-eclipse-plugin/blob/4.0.15.v20170624-2134/ReleaseNotes.md <https://github.com/pmd/pmd-eclipse-plugin/blob/4.0.14.v20170528-1456/ReleaseNotes.md> -- Andreas Dangel https://github.com/adangel skype: andreas_dangel |
|
From: Andreas D. <ad...@us...> - 2017-06-24 21:18:44
|
24-June-2017 - 5.8.0
The PMD team is pleased to announce PMD 5.8.0.
This is a minor release.
Table Of Contents
* New and noteworthy <#>
o Java Type Resolution <#>
o Metrics Framework <#>
o Modified Rules <#>
o Deprecated Rules <#>
* Fixed Issues <#>
* External Contributions <#>
New and noteworthy
Java Type Resolution
As part of Google Summer of Code 2017, Bendegúz Nagy
<https://github.com/WinterGrascph> has been working on completing type
resolution for Java. His progress so far has allowed to properly
resolve, in addition to previously supported statements:
* References to |this| and |super|, even when qualified
* References to fields, even when chained
(ie: |this.myObject.aField|), and properly handling inheritance /
shadowing
Lambda parameter types where these are infered rather than explicit are
still not supported. Expect future releases to do so.
Metrics Framework
As part of Google Summer of Code 2017, Clément Fournier
<https://github.com/oowekyala> has been working on a new metrics
framework for object-oriented metrics.
The basic groundwork has been done already and with this release,
including a first rule based on the metrics framework as a
proof-of-concept: The rule /CyclomaticComplexity/, currently in the
temporary ruleset /java-metrics/, uses the Cyclomatic Complexity metric
to find overly complex code. This rule will eventually replace the
existing three /CyclomaticComplexity/rules that are currently defined in
the /java-codesize/ ruleset (see also issue #445
<https://github.com/pmd/pmd/issues/445>).
Since this work is still in progress, the metrics API
(package |net.sourceforge.pmd.lang.java.oom|) is not finalized yet and
is expected to change.
Modified Rules
* The Java rule |UnnecessaryFinalModifier| (ruleset java-unnecessary)
now also reports on private methods marked as|final|. Being private,
such methods can't be overriden, and therefore, the final keyword is
redundant.
* The Java rule |PreserveStackTrace| (ruleset java-design) has been
relaxed to support the builder pattern on thrown exception. This
change may introduce some false positives if using the exception in
non-orthodox ways for things other than setting the root cause of
the exception. Contact us if you find any such scenarios.
* The ruleset java-junit now properly detects JUnit5, and rules are
being adapted to the changes on it's API. This support is, however,
still incomplete. Let us know of any uses we are still missing on
the issue tracker <https://github.com/pmd/pmd/issues>
* The Java rule |EmptyTryBlock| (ruleset java-empty) now allows empty
blocks when using try-with-resources.
* The Java rule |EmptyCatchBlock| (ruleset java-empty) now exposes a
new property called |allowExceptionNameRegex|. This allow to setup a
regular expression for names of exceptions you wish to ignore for
this rule. For instance, setting it to|^(ignored|expected)$| would
ignore all empty catch blocks where the catched exception is named
either |ignored| or|expected|. The default ignores no exceptions,
being backwards compatible.
Deprecated Rules
* The three complexity
rules |CyclomaticComplexity|, |StdCyclomaticComplexity|, |ModifiedCyclomaticComplexity| (ruleset
java-codesize) have been deprecated. They will be eventually
replaced by a new CyclomaticComplexity rule based on the metrics
framework. See also issue #445 <https://github.com/pmd/pmd/issues/445>.
Fixed Issues
* General
o #380 <https://github.com/pmd/pmd/issues/380>: [core] NPE in
RuleSet.hashCode
o #407 <https://github.com/pmd/pmd/issues/407>: [web] Release date
is not properly formatted
o #429 <https://github.com/pmd/pmd/issues/429>: [core] Error when
running PMD from folder with space
* apex
o #427 <https://github.com/pmd/pmd/issues/427>: [apex] CPD error
when parsing apex code from release 5.5.3
* cpp
o #431 <https://github.com/pmd/pmd/issues/431>: [cpp] CPD gives
wrong duplication blocks for CPP code
* java
o #414 <https://github.com/pmd/pmd/issues/414>: [java] Java 8
parsing problem with annotations for wildcards
o #415 <https://github.com/pmd/pmd/issues/415>: [java] Parsing
Error when having an Annotated Inner class
o #417 <https://github.com/pmd/pmd/issues/417>: [java] Parsing
Problem with Annotation for Array Member Types
* java-design
o #397 <https://github.com/pmd/pmd/issues/397>: [java]
ConstructorCallsOverridableMethodRule: false positive for method
called from lambda expression
o #410 <https://github.com/pmd/pmd/issues/410>: [java]
ImmutableField: False positive with lombok
o #422 <https://github.com/pmd/pmd/issues/422>: [java]
PreserveStackTraceRule: false positive when using builder pattern
* java-empty
o #413 <https://github.com/pmd/pmd/issues/413>: [java]
EmptyCatchBlock don't fail when exception is named ignore / expected
o #432 <https://github.com/pmd/pmd/issues/432>: [java]
EmptyTryBlock: false positive for empty try-with-resource
* java-imports:
o #348 <https://github.com/pmd/pmd/issues/348>: [java]
imports/UnusedImport rule not considering static inner classes
of imports
* java-junit
o #428 <https://github.com/pmd/pmd/issues/428>: [java] PMD
requires public modifier on JUnit 5 test
o #465 <https://github.com/pmd/pmd/issues/465>: [java]
NullPointerException in JUnitTestsShouldIncludeAssertRule
* java-logging:
o #365 <https://github.com/pmd/pmd/issues/365>: [java]
InvalidSlf4jMessageFormat does not handle inline incrementation
of arguments
* java-strictexceptions
o #350 <https://github.com/pmd/pmd/issues/350>: [java] Throwing
Exception in method signature is fine if the method is
overriding or implementing something
* java-typeresolution
o #350 <https://github.com/pmd/pmd/issues/350>: [java] Throwing
Exception in method signature is fine if the method is
overriding or implementing something
* java-unnecessary
o #421 <https://github.com/pmd/pmd/issues/421>: [java]
UnnecessaryFinalModifier final in private method
* jsp
o #311 <https://github.com/pmd/pmd/issues/311>: [jsp] Parse error
on HTML boolean attribute
External Contributions
* #406 <https://github.com/pmd/pmd/pull/406>: [java] False positive
with lambda in java-design/ConstructorCallsOverridableMethod
* #409 <https://github.com/pmd/pmd/pull/409>: [java] Groundwork for
the upcoming metrics framework
* #416 <https://github.com/pmd/pmd/pull/416>: [java] FIXED: Java 8
parsing problem with annotations for wildcards
* #418 <https://github.com/pmd/pmd/pull/418>: [java] Type resolution:
super and this keywords
* #423 <https://github.com/pmd/pmd/pull/423>: [java] Add field access
type resolution in non-generic cases
* #425 <https://github.com/pmd/pmd/pull/425>: [java] False positive
with builder pattern in java-design/PreserveStackTrace
* #426 <https://github.com/pmd/pmd/pull/426>: [java]
UnnecessaryFinalModifier final in private method
* #436 <https://github.com/pmd/pmd/pull/436>: [java] Metrics framework
tests and various improvements
* #440 <https://github.com/pmd/pmd/pull/440>: [core] Created ruleset
schema 3.0.0 (to use metrics)
* #443 <https://github.com/pmd/pmd/pull/443>: [java] Optimize
typeresolution, by skipping package and import declarations in
visit(ASTName)
* #444 <https://github.com/pmd/pmd/pull/444>: [java] [typeresolution]:
add support for generic fields
* #451 <https://github.com/pmd/pmd/pull/451>: [java] Metrics
framework: first metrics + first rule
--
Andreas Dangel
https://github.com/adangel
skype: andreas_dangel
|
|
From: Rory O'D. <ror...@or...> - 2017-06-16 10:04:45
|
Hi Andreas, *JDK 9 Early Access* build 174 is available at : - jdk.java.net/9/ A summary of all the changes in this build are listed here <http://download.java.net/java/jdk9/changes/jdk-9+174.html>. Changes which were introduced since the last availability email that may be of interest : * b172 - JDK-8179014 : JFileChooser with Windows look and feel crashes on win 10 * b173 - JDK-8180582 : the bind to rmiregistry is rejected by registryFilter even though registryFilter is set * b174 - JDK-8181702 : deprecate for removal the following tool modules:jdk.xml.bind and jdk.xml.ws *JDK 9 Schedule Update* * The new GA date for JDK 9 is now set to 2017-09-21 [1] * We have updated the OpenJDK JDK 9 project page [2] with the new milestones and GA date. *JDK 8u152 Early Access* build 04 is available at : - jdk.java.net/8/ <http://jdk.java.net/8/> A summary of all the changes in this build are listed here <http://download.java.net/java/jdk8u152/changes/jdk8u152-b04.html>. Information and schedules specific to OpenJDK 8u152 release [3] Rgds,Rory [1] http://mail.openjdk.java.net/pipermail/jdk9-dev/2017-June/005867.html [2] http://openjdk.java.net/projects/jdk9/ [3] http://openjdk.java.net/projects/jdk8u/releases/8u152.html -- Rgds,Rory O'Donnell Quality Engineering Manager Oracle EMEA , Dublin, Ireland |
|
From: vadlamudi m. <mal...@gm...> - 2017-06-06 01:47:28
|
Hi Team, I am looking for rulesets for Components in salesforce. Can you please send me the link where i can find the rulesets. Thanks Mallikarjun |
|
From: Rory O'D. <ror...@or...> - 2017-06-02 10:21:28
|
Hi Andreas, ** *Announcing: Early-Access builds of JDK 9 for Alpine Linux/musl at jdk.java.net/9/ [1] * * As of today there are pre-built Early-Access (EA) JDK binaries for Alpine Linux/musl at jdk.java.net/9/** o look for “Alpine Linux”. [1] * The Alpine Linux build is compatible with linux distributions that use the musl C library. *[2]* Feedback is very welcome via the portola-dev mailing list, remembering to subscribe to the mailing list first. *Proposed schedule change for JDK 9 [3]* JDK 9 Project continues to work toward the current goal of producing an initial Release Candidate build on 22 June. This proposal is to adjust the GA date in order to accommodate the additional time required to move through the JCP process. To be specific, we propose to move the GA date out by eight weeks, from 27 July to 21 September. Rgds,Rory [1] http://mail.openjdk.java.net/pipermail/portola-dev/2017-June/000191.html [2] http://www.musl-libc.org/ [3] http://mail.openjdk.java.net/pipermail/jdk9-dev/2017-May/005864.html -- Rgds,Rory O'Donnell Quality Engineering Manager Oracle EMEA , Dublin, Ireland |
|
From: Andreas D. <ad...@us...> - 2017-05-28 15:14:01
|
A new PMD for Eclipse plugin version has been released. It is available via the update site: https://dl.bintray.com/pmd/pmd-eclipse-plugin/updates/ Release notes: https://github.com/pmd/pmd-eclipse-plugin/blob/4.0.14.v20170528-1456/ReleaseNotes.md -- Andreas Dangel https://github.com/adangel skype: andreas_dangel |
|
From: Andreas D. <ad...@us...> - 2017-05-20 21:19:53
|
20-Mai-2017 - 5.7.0
The PMD team is pleased to announce PMD 5.7.0.
This is a minor release.
Table Of Contents
* New and noteworthy <#>
* Fixed Issues <#>
* API Changes <#>
* External Contributions <#>
New and noteworthy
Modified Rules
* The rule "FieldDeclarationsShouldBeAtStartOfClass" of the
java-design ruleset has a new
property |ignoreInterfaceDeclarations|. Setting this property
to |true| ignores interface declarations, that precede fields.
Example usage:
|<rule
ref="rulesets/java/design.xml/FieldDeclarationsShouldBeAtStartOfClass">
<properties> <property name="ignoreInterfaceDeclarations" value="true"/>
</properties> </rule>|
Renderers
* Added the 'empty' renderer which will write nothing. Does not affect
other behaviors, for example the command line PMD exit status will
still indicate whether violations were found.
Fixed Issues
* General
o #377 <https://github.com/pmd/pmd/issues/377>: [core] Use maven
wrapper and upgrade to maven 3.5.0
o #376 <https://github.com/pmd/pmd/issues/376>: [core] Improve
build time on travis
* java
o #378 <https://github.com/pmd/pmd/issues/378>: [java] Parser
Error for empty statements
* java-coupling
o #1427 <https://sourceforge.net/p/pmd/bugs/1427/>: [java] Law of
Demeter violations for the Builder pattern
* java-design
o #345 <https://github.com/pmd/pmd/issues/345>: [java]
FieldDeclarationsShouldBeAtStartOfClass: Add ability to ignore
interfaces
o #389 <https://github.com/pmd/pmd/issues/389>: [java]
RuleSetCompatibility - not taking rename of UnusedModifier into
account
* java-junit
o #358 <https://github.com/pmd/pmd/issues/358>: [java] Mockito
verify method is not taken into account in
JUnitTestsShouldIncludeAssert rule
* java-strings
o #334 <https://github.com/pmd/pmd/issues/334>: [java] [doc] Add
suggestion to use StringUtils#isBlank for
InefficientEmptyStringCheck
* jsp-basic
o #369 <https://github.com/pmd/pmd/issues/369>: [jsp] Wrong issue
"JSP file should use UTF-8 encoding"
API Changes
* The
method |net.sourceforge.pmd.util.StringUtil#htmlEncode(String)| is
deprecated.|org.apache.commons.lang3.StringEscapeUtils#escapeHtml4(String)| should
be used instead.
External Contributions
* #368 <https://github.com/pmd/pmd/pull/368>: [vf] Adding proper AST
support for negation expressions
* #372 <https://github.com/pmd/pmd/pull/372>: [core] Fix XSS in HTML
renderer
* #374 <https://github.com/pmd/pmd/pull/374>: [java] Add property to
ignore interfaces in FieldDeclarationsShouldBeAtStartOfClassRule
* #381 <https://github.com/pmd/pmd/pull/381>: [core] Fix broken link
in the site's doc
* #382 <https://github.com/pmd/pmd/pull/382>: [java] Added
documentation details on InefficientEmptyStringCheck
* #383 <https://github.com/pmd/pmd/pull/383>: [jsp] Fixed JspEncoding
false positive
* #390 <https://github.com/pmd/pmd/pull/390>: [java] Remove trailing
whitespaces in design.xml
* #391 <https://github.com/pmd/pmd/pull/391>: [apex] Fix documentation
typo
* #392 <https://github.com/pmd/pmd/pull/392>: [java] False positive
for Law Of Demeter (Builder pattern)
* #395 <https://github.com/pmd/pmd/pull/395>: [java] Mockito verify
method is not taken into account in JUnitTestsShouldIncludeAssert rule
--
Andreas Dangel
https://github.com/adangel
skype: andreas_dangel
|
|
From: Rory O'D. <ror...@or...> - 2017-05-19 10:23:22
|
Hi Andreas, * JDK 9 Early Access* build 170 is available at the new location : - jdk.java.net/9/ A summary of all the changes in this build are listed here <http://download.java.net/java/jdk9/changes/jdk-9+170.html>. Changes which were introduced since the last availability email that may be of interest : * b168 - JDK-8175814: Update default HttpClient protocol version and optional request version o related to JEP 110 : HTTP/2 Client. * b169 - JDK-8178380 : Module system implementation refresh (5/2017) o changes in command line options * b170 - JDK-8177153 : LambdaMetafactory has default constructorIncompatible change, o release note: JDK-8180035 *New Proposal - Mark Reinhold has asked for comments on the jigsaw-dev mailing list *[1] * Proposal: Allow illegal reflective access by default in JDK 9 In short, the existing "big kill switch" of the `--permit-illegal-access` option [1] will become the default behavior of the JDK 9 run-time system, though without as many warnings. The current behavior of JDK 9, in which illegal reflective-access operations from code on the class path are not permitted, will become the default in a future release. Nothing will change at compile time. Rgds,Rory [1] http://mail.openjdk.java.net/pipermail/jigsaw-dev/2017-May/012673.html -- Rgds,Rory O'Donnell Quality Engineering Manager Oracle EMEA , Dublin, Ireland |
|
From: Ryan G. <rya...@gm...> - 2017-05-06 01:19:11
|
Yes wholehearted congratulations to Bendegúz and Clément, really looking forward to seeing great contributions this summer! Also kudos to Andreas and Juan for shepherding this process. On Fri, May 5, 2017 at 2:35 AM, Juan Martín Sotuyo Dodero < jua...@gm...> wrote: > These are exciting times for PMD. I personally welcome and congratulate > both of them. > > > I'd also like to take the chance to thank everyone that applied for their > interest in PMD. Unfortunately Google's allocations were limited this being > our first year participating. Hopefully next year even more will be > accepted. > > Regards > > On May 5, 2017 9:28 AM, "Andreas Dangel" <ad...@us...> > wrote: > >> The PMD team is pleased to announce that we got 2 projects accepted by >> the Google Summer of Code program this year: >> >> >> * Bendegúz Nagy will be working on Complete type resolution for Java >> >> * Clément Fournier will be working on Bringing Object-Oriented Metrics >> to PMD >> >> >> >> Please join me in welcome Bendegúz and Clément! >> >> There will be exciting times ahead! >> >> >> >> >> -- >> Andreas Dangel >> https://github.com/adangel >> skype: andreas_dangel >> >> >> ------------------------------------------------------------ >> ------------------ >> 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 >> > > ------------------------------------------------------------ > ------------------ > 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. <ad...@ap...> - 2017-05-05 09:09:54
|
The Apache Maven team is pleased to announce the release of the Apache Maven PMD Plugin, version 3.8 A Maven plugin for the PMD toolkit, that produces a report on both code rule violations and detected copy and paste fragments, as well as being able to fail the build based on these metrics. https://maven.apache.org/plugins/maven-pmd-plugin/ You should specify the version in your project's plugin configuration: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pmd-plugin</artifactId> <version>3.8</version> </plugin> Release Notes - Maven PMD Plugin - Version 3.8 Improvements: * [MPMD-232] - Enable typeResolution by default * [MPMD-233] - Upgrade to PMD 5.6.1 New Features: * [MPMD-234] - Support incremental analysis cache Wishes: * [MPMD-230] - Required class missing: org/apache/commons/io/IOUtils Enjoy, -The Apache Maven team |
|
From: Juan M. S. D. <jua...@gm...> - 2017-05-05 07:35:43
|
These are exciting times for PMD. I personally welcome and congratulate both of them. I'd also like to take the chance to thank everyone that applied for their interest in PMD. Unfortunately Google's allocations were limited this being our first year participating. Hopefully next year even more will be accepted. Regards On May 5, 2017 9:28 AM, "Andreas Dangel" <ad...@us...> wrote: > The PMD team is pleased to announce that we got 2 projects accepted by > the Google Summer of Code program this year: > > > * Bendegúz Nagy will be working on Complete type resolution for Java > > * Clément Fournier will be working on Bringing Object-Oriented Metrics > to PMD > > > > Please join me in welcome Bendegúz and Clément! > > There will be exciting times ahead! > > > > > -- > Andreas Dangel > https://github.com/adangel > skype: andreas_dangel > > > ------------------------------------------------------------ > ------------------ > 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. <ad...@us...> - 2017-05-05 07:28:46
|
The PMD team is pleased to announce that we got 2 projects accepted by the Google Summer of Code program this year: * Bendegúz Nagy will be working on Complete type resolution for Java * Clément Fournier will be working on Bringing Object-Oriented Metrics to PMD Please join me in welcome Bendegúz and Clément! There will be exciting times ahead! -- Andreas Dangel https://github.com/adangel skype: andreas_dangel |
|
From: Andreas D. <ad...@us...> - 2017-04-29 20:15:51
|
29-April-2017 - 5.5.7
The PMD team is pleased to announce PMD 5.5.7.
This is a bug fixing release.
Fixed Issues
* General
o #364 <https://github.com/pmd/pmd/issues/364>: [core] Stream
closed exception when running through maven
--
Andreas Dangel
https://github.com/adangel
skype: andreas_dangel
|
|
From: Andreas D. <ad...@us...> - 2017-04-29 18:59:53
|
29-April-2017 - 5.6.1
The PMD team is pleased to announce PMD 5.6.1.
This is a bug fixing release.
Fixed Issues
* General
o #363 <https://github.com/pmd/pmd/issues/363>: [core] Rule
documentation pages are missing
o #364 <https://github.com/pmd/pmd/issues/364>: [core] Stream
closed exception when running through maven
o #373 <https://github.com/pmd/pmd/issues/373>: [core]
RuleSetFactory - add more helper methods
--
Andreas Dangel
https://github.com/adangel
skype: andreas_dangel
|