> On 7 Nov 2019, at 00:34, Gilles Sadowski <gillese...@gmail.com> wrote:
> 
> 2019-11-07 1:03 UTC+01:00, Alex Herbert <alex.d.herb...@gmail.com 
> <mailto:alex.d.herb...@gmail.com>>:
>> 
>> 
>>> On 6 Nov 2019, at 23:17, Eric Barnhill <ericbarnh...@gmail.com 
>>> <mailto:ericbarnh...@gmail.com>> wrote:
>>> 
>>> +1 on all suggestions. Thanks, Alex.
>> 
>> I’ve borrowed the checkstyle, PMD and spot bugs config from commons-rng. I
>> updated the parent to 49 and updated the travis build script to run the
>> check goal instead of creating reports.
> 
> I had updated the PMD configuration (copying from [RNG] and removing
> references to specific classes) this afternoon.

I did not really change the PMD config. Just a bump of the PMD versions.

However pmd:check was never run so this is now in the default goal and run on 
travis.

Travis currently has a problem with the length of the log file being too long 
as Maven downloads the entire internet. So I’m trying a fix for that.

> 
>> 
>> This requires disabling checkstyle:check and pmd:check from failing.
>> Checkstyle errors were previously listed. PMD has the following errors:
>> 
>> [INFO] You have 23 PMD violations. For more details see:
>> /Users/ah403/git/commons-numbers/commons-numbers-core/target/pmd.xml
>> [INFO] You have 16 PMD violations. For more details see:
>> /Users/ah403/git/commons-numbers/commons-numbers-complex/target/pmd.xml
>> [INFO] You have 30 PMD violations. For more details see:
>> /Users/ah403/git/commons-numbers/commons-numbers-complex-streams/target/pmd.xml
>> [INFO] You have 30 PMD violations. For more details see:
>> /Users/ah403/git/commons-numbers/commons-numbers-primes/target/pmd.xml
>> [INFO] You have 13 PMD violations. For more details see:
>> /Users/ah403/git/commons-numbers/commons-numbers-quaternion/target/pmd.xml
>> [INFO] You have 42 PMD violations. For more details see:
>> /Users/ah403/git/commons-numbers/commons-numbers-fraction/target/pmd.xml
>> [INFO] You have 3 PMD violations. For more details see:
>> /Users/ah403/git/commons-numbers/commons-numbers-angle/target/pmd.xml
>> [INFO] You have 192 PMD violations. For more details see:
>> /Users/ah403/git/commons-numbers/commons-numbers-gamma/target/pmd.xml
>> [INFO] You have 35 PMD violations. For more details see:
>> /Users/ah403/git/commons-numbers/commons-numbers-combinatorics/target/pmd.xml
>> [INFO] You have 14 PMD violations. For more details see:
>> /Users/ah403/git/commons-numbers/commons-numbers-arrays/target/pmd.xml
>> [INFO] You have 10 PMD violations. For more details see:
>> /Users/ah403/git/commons-numbers/commons-numbers-field/target/pmd.xml
>> [INFO] You have 1 PMD violation. For more details see:
>> /Users/ah403/git/commons-numbers/commons-numbers-rootfinder/target/pmd.xml
> 
> Yes, those should be fixed (and perhaps some could be considered
> as false positives).

I’m not planning on doing a lot of fixing. With RNG I made most of the PMD 
issues go away with some rule tweaking.

I will fix checkstyle though. This can be semi automated.

> 
>> 
>> A simple fix for apache-rat:check and spotbugs:check was needed.
>> 
>> Javadoc:javadoc builds on JDK 11 which is strict so that is good.
>> 
>> All the changes are in a PR which passes 'mvn test site’. If travis is OK
>> I’ll merge to master and then set to fixing checkstyle and PMD.
>> 
>> Then I’ll fix Complex.
> 
> OK.
> 
> Regards,
> Gilles
> 
>> 
>>> 
>>> On Wed, Nov 6, 2019 at 2:38 PM Alex Herbert <alex.d.herb...@gmail.com>
>>> wrote:
>>> 
>>>> 
>>>> 
>>>>> On 6 Nov 2019, at 18:17, Gilles Sadowski <gillese...@gmail.com> wrote:
>>>>> 
>>>>>> [...]
>>>>>> 
>>>>>> 
>>>>>> Any objections to updating multiply/divide/isNaN to match the
>>>>>> standard?
>>>>> 
>>>>> Let me think... ;-)
>>>> 
>>>> OK, I’ll fix it and double check the other tests against the c
>>>> reference.
>>>> 
>>>>> 
>>>>>> 
>>>>>> I'll add unit tests to hit the edge cases that should fail with the
>>>>>> current implementation.
>>>>> 
>>>>> Thanks,
>>>>> Gilles
>>>> 
>>>> Are changes to numbers going under Jira tickets?
>>>> 
>>>> It looks like it needs an update to checkstyle, PMD, spotbugs, the
>>>> commons-parent and travis.
>>>> 
>>>> Checkstyle config from commons-rng finds:
>>>> 
>>>> [INFO] There are 115 errors reported by Checkstyle 8.20 with
>>>> /Users/ah403/git/commons-numbers/commons-numbers-core/../src/main/resources/checkstyle/checkstyle.xml
>>>> ruleset.
>>>> [INFO] There are 202 errors reported by Checkstyle 8.20 with
>>>> /Users/ah403/git/commons-numbers/commons-numbers-complex/../src/main/resources/checkstyle/checkstyle.xml
>>>> ruleset.
>>>> [INFO] There are 102 errors reported by Checkstyle 8.20 with
>>>> /Users/ah403/git/commons-numbers/commons-numbers-complex-streams/../src/main/resources/checkstyle/checkstyle.xml
>>>> ruleset.
>>>> [INFO] There are 276 errors reported by Checkstyle 8.20 with
>>>> /Users/ah403/git/commons-numbers/commons-numbers-primes/../src/main/resources/checkstyle/checkstyle.xml
>>>> ruleset.
>>>> [INFO] There are 68 errors reported by Checkstyle 8.20 with
>>>> /Users/ah403/git/commons-numbers/commons-numbers-quaternion/../src/main/resources/checkstyle/checkstyle.xml
>>>> ruleset.
>>>> [INFO] There are 289 errors reported by Checkstyle 8.20 with
>>>> /Users/ah403/git/commons-numbers/commons-numbers-fraction/../src/main/resources/checkstyle/checkstyle.xml
>>>> ruleset.
>>>> [INFO] There are 10 errors reported by Checkstyle 8.20 with
>>>> /Users/ah403/git/commons-numbers/commons-numbers-angle/../src/main/resources/checkstyle/checkstyle.xml
>>>> ruleset.
>>>> [INFO] There are 3503 errors reported by Checkstyle 8.20 with
>>>> /Users/ah403/git/commons-numbers/commons-numbers-gamma/../src/main/resources/checkstyle/checkstyle.xml
>>>> ruleset.
>>>> [INFO] There are 56 errors reported by Checkstyle 8.20 with
>>>> /Users/ah403/git/commons-numbers/commons-numbers-combinatorics/../src/main/resources/checkstyle/checkstyle.xml
>>>> ruleset.
>>>> [INFO] There are 50 errors reported by Checkstyle 8.20 with
>>>> /Users/ah403/git/commons-numbers/commons-numbers-arrays/../src/main/resources/checkstyle/checkstyle.xml
>>>> ruleset.
>>>> [INFO] There are 10 errors reported by Checkstyle 8.20 with
>>>> /Users/ah403/git/commons-numbers/commons-numbers-field/../src/main/resources/checkstyle/checkstyle.xml
>>>> ruleset.
>>>> [INFO] There are 4 errors reported by Checkstyle 8.20 with
>>>> /Users/ah403/git/commons-numbers/commons-numbers-rootfinder/../src/main/resources/checkstyle/checkstyle.xml
>>>> ruleset.
>>>> 
>>>> The mass of errors is white space style in the test classes. Without the
>>>> test classes the result is:
>>>> 
>>>> [INFO] There are 12 errors reported by Checkstyle 8.20 with
>>>> /Users/ah403/git/commons-numbers/commons-numbers-core/../src/main/resources/checkstyle/checkstyle.xml
>>>> ruleset.
>>>> [INFO] There are 54 errors reported by Checkstyle 8.20 with
>>>> /Users/ah403/git/commons-numbers/commons-numbers-complex/../src/main/resources/checkstyle/checkstyle.xml
>>>> ruleset.
>>>> [INFO] There are 19 errors reported by Checkstyle 8.20 with
>>>> /Users/ah403/git/commons-numbers/commons-numbers-complex-streams/../src/main/resources/checkstyle/checkstyle.xml
>>>> ruleset.
>>>> [INFO] There are 49 errors reported by Checkstyle 8.20 with
>>>> /Users/ah403/git/commons-numbers/commons-numbers-primes/../src/main/resources/checkstyle/checkstyle.xml
>>>> ruleset.
>>>> [INFO] There are 5 errors reported by Checkstyle 8.20 with
>>>> /Users/ah403/git/commons-numbers/commons-numbers-quaternion/../src/main/resources/checkstyle/checkstyle.xml
>>>> ruleset.
>>>> [INFO] There are 6 errors reported by Checkstyle 8.20 with
>>>> /Users/ah403/git/commons-numbers/commons-numbers-fraction/../src/main/resources/checkstyle/checkstyle.xml
>>>> ruleset.
>>>> [INFO] There are 3 errors reported by Checkstyle 8.20 with
>>>> /Users/ah403/git/commons-numbers/commons-numbers-angle/../src/main/resources/checkstyle/checkstyle.xml
>>>> ruleset.
>>>> [INFO] There are 20 errors reported by Checkstyle 8.20 with
>>>> /Users/ah403/git/commons-numbers/commons-numbers-gamma/../src/main/resources/checkstyle/checkstyle.xml
>>>> ruleset.
>>>> [INFO] There are 19 errors reported by Checkstyle 8.20 with
>>>> /Users/ah403/git/commons-numbers/commons-numbers-combinatorics/../src/main/resources/checkstyle/checkstyle.xml
>>>> ruleset.
>>>> [INFO] There are 4 errors reported by Checkstyle 8.20 with
>>>> /Users/ah403/git/commons-numbers/commons-numbers-arrays/../src/main/resources/checkstyle/checkstyle.xml
>>>> ruleset.
>>>> [INFO] There are 6 errors reported by Checkstyle 8.20 with
>>>> /Users/ah403/git/commons-numbers/commons-numbers-field/../src/main/resources/checkstyle/checkstyle.xml
>>>> ruleset.
>>>> 
>>>> 
>>>> Also looking at Complex it would benefit from:
>>>> 
>>>>   public Complex subtractFrom(double minuend) {
>>>>       return new Complex(minuend - real, imaginary);
>>>>   }
>>>> 
>>>> This would avoid:
>>>> 
>>>> Complex a = …;
>>>> double b = …;
>>>> Complex c  = Complex.ofCartesian(b - a.real(), a.imag());
>>>> Complex d  = Complex.ofReal(b).subtract(a).conj();
>>>> 
>>>> With
>>>> 
>>>> Complex a = …;
>>>> double b = …;
>>>> Complex c  = a.subtractFrom(b);
>>>> 
>>>> 
>>>>> 
>>>>>> 
>>>>>> 
>>>>>> [1] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf
>>>>>> 
>>>>>> [2] http://www.open-std.org/JTC1/SC22/WG14/www/standards
>>>>> 
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
>>>>> For additional commands, e-mail: dev-h...@commons.apache.org
>>>>> 
>>>> 
>>>> 
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org 
> <mailto:dev-unsubscr...@commons.apache.org>
> For additional commands, e-mail: dev-h...@commons.apache.org 
> <mailto:dev-h...@commons.apache.org>

Reply via email to