Closed kaikreuzer closed 7 years ago
[INFO] There are 2291 errors reported by Checkstyle 7.2 with sun_checks.xml ruleset.
Our rulesets are not used at all (and the tool falls back to the default sun_checks.xml).
All the changes that are missing and you have mentioned above should be applied as user properties here and here. Travis is not OK with these lines.
Travis is not OK with these lines.
What do you mean by this? That it does not see the properties?
FYI: Please not this change that I did, could that be related in any way? Do I have to activate check-bundles profile as well? I don't think so, because it should work based on existence of MANIFEST, right?
Note that there was similar report at the community forum, but running locally:
https://community.openhab.org/t/static-code-analysis-tool/24489/44
Also, I see the following when I add '--debug' to the mvn command above: [DEBUG] request.getConfigLocation() sun_checks.xml which makes me believe the rules.xml file from the jar is being ignored as well.
And my local build-server also fails to run the checks properly, I run teamcity with Maven 3.0.5. And my Windows development server runs maven 3.3.9.
As a test I upgraded my build server to run with 3.3.9 as well.
I don't think so, because it should work based on existence of MANIFEST, right?
Yes, exactly.
What do you mean by this? That it does not see the properties?
I am not sure what exactly happens, but it is related with the properties.
As a test I upgraded my build server to run with 3.3.9 as well.
Thanks.
That might work more-or-less:
[Step 1/3] [INFO] --- static-code-analysis:0.0.3:report (default) @ org.openhab.binding.homematic ---
[09:57:48][Step 1/3] [INFO] Individual report appended to summary report.
[09:57:48]
[Step 1/3] Failed to execute goal org.openhab.tools:static-code-analysis:0.0.3:report (default) on project org.openhab.binding.homematic: Code Analysis Tool has found 29 error(s)!
Please fix the errors and rerun the build.
Errors list:
ERROR found by findbugs: org.openhab.binding.homematic.discovery.HomematicDeviceDiscoveryService$1.java:113 Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance
ERROR found by findbugs: org.openhab.binding.homematic.handler.HomematicBridgeHandler.java:194 Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance
ERROR found by findbugs: org.openhab.binding.homematic.handler.HomematicBridgeHandler.java:320 Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance
ERROR found by findbugs: org.openhab.binding.homematic.handler.HomematicBridgeHandler$1.java:86 Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance
ERROR found by findbugs: org.openhab.binding.homematic.handler.HomematicThingHandler.java:142 Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance
ERROR found by findbugs: org.openhab.binding.homematic.handler.HomematicThingHandler.java:184 Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance
ERROR found by findbugs: org.openhab.binding.homematic.handler.HomematicThingHandler.java:189 Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance
ERROR found by findbugs: org.openhab.binding.homematic.handler.HomematicThingHandler.java:191 Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance
ERROR found by findbugs: org.openhab.binding.homematic.handler.HomematicThingHandler.java:196 Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance
ERROR found by findbugs: org.openhab.binding.homematic.handler.HomematicThingHandler.java:238 Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance
ERROR found by findbugs: org.openhab.binding.homematic.handler.HomematicThingHandler.java:395 Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance
ERROR found by findbugs: org.openhab.binding.homematic.handler.HomematicThingHandler$1.java:113 Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance
ERROR found by findbugs: org.openhab.binding.homematic.internal.communicator.AbstractHomematicGateway.java:243 Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance
ERROR found by findbugs: org.openhab.binding.homematic.internal.communicator.AbstractHomematicGateway.java:691 Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance
ERROR found by findbugs: org.openhab.binding.homematic.internal.communicator.AbstractHomematicGateway.java:801 Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance
ERROR found by findbugs: org.openhab.binding.homematic.internal.communicator.AbstractHomematicGateway$EventTrackerThread.java:825 Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance
ERROR found by findbugs: org.openhab.binding.homematic.internal.communicator.AbstractHomematicGateway$EventTrackerThread.java:826 Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance
ERROR found by findbugs: org.openhab.binding.homematic.internal.communicator.AbstractHomematicGateway$ReconnectThread.java:903 Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance
ERROR found by findbugs: org.openhab.binding.homematic.internal.communicator.message.BinRpcMessage.java:241 Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance
ERROR found by findbugs: org.openhab.binding.homematic.internal.communicator.server.BinRpcCallbackHandler.java:68 Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance
ERROR found by findbugs: org.openhab.binding.homematic.internal.communicator.server.BinRpcCallbackHandler.java:101 Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance
ERROR found by findbugs: org.openhab.binding.homematic.internal.communicator.server.BinRpcServer.java:60 Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance
ERROR found by findbugs: org.openhab.binding.homematic.internal.communicator.server.XmlRpcServer.java:89 Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance
ERROR found by findbugs: org.openhab.binding.homematic.internal.communicator.server.XmlRpcServer$ResponseHandler.java:121 Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance
ERROR found by findbugs: org.openhab.binding.homematic.internal.communicator.server.XmlRpcServer$ResponseHandler.java:153 Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance
ERROR found by findbugs: org.openhab.binding.homematic.internal.misc.DelayedExecuter$1.java:55 Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance
ERROR found by findbugs: org.openhab.binding.homematic.internal.misc.MiscUtils.java:
Logger should be non-static field. Change this field (logger) to non-static field.
ERROR found by findbugs: org.openhab.binding.homematic.type.HomematicTypeGeneratorImpl.java:329 Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance
ERROR found by findbugs: org.openhab.binding.homematic.type.MetadataUtils.java:
Logger should be non-static field. Change this field (logger) to non-static field.
Detailed report can be found at: file////opt/buildagent/work/5c3cd640ded15833/addons/binding/org.openhab.binding.homematic/target/code-analysis/report.html
The build however fails at Homematic and does not continue after that, maybe i'm some commits behind:
[09:57:48][Step 1/3] [INFO] ------------------------------------------------------------------------
[09:57:48][Step 1/3] [INFO] Reactor Summary:
[09:57:48][Step 1/3] [INFO]
[09:57:48][Step 1/3] [INFO] openHAB ............................................ SUCCESS [ 0.289 s]
[09:57:48][Step 1/3] [INFO] openHAB Add-ons .................................... SUCCESS [ 0.009 s]
[09:57:48][Step 1/3] [INFO] openHAB Bindings ................................... SUCCESS [ 0.010 s]
[09:57:48][Step 1/3] [INFO] AirQuality Binding ................................. SUCCESS [ 17.769 s]
[09:57:48][Step 1/3] [INFO] AllPlay Binding .................................... SUCCESS [ 6.541 s]
[09:57:48][Step 1/3] [INFO] Amazon Dash Button Binding ......................... SUCCESS [ 6.758 s]
[09:57:48][Step 1/3] [INFO] Astro Binding ...................................... SUCCESS [ 9.426 s]
[09:57:48][Step 1/3] [INFO] Atlona Binding ..................................... SUCCESS [ 11.670 s]
[09:57:48][Step 1/3] [INFO] Autelis Binding .................................... SUCCESS [ 5.392 s]
[09:57:48][Step 1/3] [INFO] AVM FRITZ! Binding ................................. SUCCESS [ 6.983 s]
[09:57:48][Step 1/3] [INFO] BoschIndego Binding ................................ SUCCESS [ 5.120 s]
[09:57:48][Step 1/3] [INFO] Chromecast Binding ................................. SUCCESS [ 5.404 s]
[09:57:48][Step 1/3] [INFO] CoolMasterNet Binding .............................. SUCCESS [ 5.408 s]
[09:57:48][Step 1/3] [INFO] DSCAlarm Binding ................................... SUCCESS [ 10.438 s]
[09:57:48][Step 1/3] [INFO] Exec Binding ....................................... SUCCESS [ 5.277 s]
[09:57:48][Step 1/3] [INFO] openHAB I/O Add-Ons ................................ SUCCESS [ 0.009 s]
[09:57:48][Step 1/3] [INFO] Transport Feed bundle .............................. SUCCESS [ 0.456 s]
[09:57:48][Step 1/3] [INFO] Feed Binding ....................................... SUCCESS [ 4.911 s]
[09:57:48][Step 1/3] [INFO] Feed Binding Tests ................................. SUCCESS [ 8.012 s]
[09:57:48][Step 1/3] [INFO] Folding Binding .................................... SUCCESS [ 5.470 s]
[09:57:48][Step 1/3] [INFO] Freebox Binding .................................... SUCCESS [ 7.545 s]
[09:57:48][Step 1/3] [INFO] Gardena Binding .................................... SUCCESS [ 7.318 s]
[09:57:48][Step 1/3] [INFO] HarmonyHub Binding ................................. SUCCESS [ 6.502 s]
[09:57:48][Step 1/3] [INFO] HDanywhere Binding ................................. SUCCESS [ 5.495 s]
[09:57:48][Step 1/3] [INFO] Hunter Douglas PowerView Binding ................... SUCCESS [ 5.830 s]
[09:57:48][Step 1/3] [INFO] Homematic Binding .................................. FAILURE [ 14.032 s]
Note that travis does indeed run on:
Apache Maven 3.2.5
https://docs.travis-ci.com/user/ci-environment/#Maven-version
With an up-2-date master and my build-server on 3.3.9 I have a green build 👍
With the correct report.
Most of the time things like this are caused by maven picking default version of plug-ins (different in different maven versions) when you did not specify them, but a quick check revealed that it seems that only the compiler plug-in has no specific version, imho not really the main suspect.
So shall we try https://github.com/travis-ci/enterprise-installation/issues/14#issuecomment-273746437 or is there a better way to get to a more recent Maven version on Travis?
According to the docs not I fear
Trying it, let's touch wood: https://travis-ci.org/openhab/openhab2-addons/builds/218034637
Success! Let's see if this will make other PRs fail that don't comply to the guidelines.
As The Jenkins PR builder has memory issues with activated checks, I tried out Travis instead.
There, the builds run through nicely, without any memory issues. Unfortunately, they seem to be "too green" - almost every PR has succeeded and if I look at the logs, it seems as if the check result files are missing:
Furthermore, it seems to miss some other of our recent changes as I see things like
and
Any idea what might be wrong on Travis?