Sonar runner not able to run cppcheck - c

I have a c project and a c plugin of sonar. Sonar was not able to run the cppcheck automatically and give the results.
Is there a way that sonar can run the cppcheck which is installed locallay ?
Always i see in the sonar log
12:56:15.608 INFO - Sensor Cppcheck...
after this it complains cppcheckreport is not available and giving error.

The log error indicates that the analysis can't find your pre-generated CPPCheck report. I.e. the SonarQube analysis doesn't run CPPCheck, it simply imports the results.
See the docs for details on importing a CPPCheck report.

Related

Apex replay debugger is throwing Java 8 is required to run

I am following this trail and I have completed all the steps correctly. Even I able to download the debug logs.
But Problem occurs when I am trying to run the following command
> SFDX: Launch Apex Replay Debugger with Current File
It shows the below error.
But, the thing is, I have jdk-12.0.1 installed on my PC. After that, I have installed the Java 8 also and thus jdk-1.8.0_181 is also installed.
My Java Home setting in VS code is following
I have also restarted my PC, But no luck. It is throwing the same error.
How to solve this ?
You have to set the path as 'C://Program Files//Java//jdk1.8.0_181' and then restart the vs code
In case any Mac users needed help:
I installed Java 11 and then ran this code:
/usr/libexec/java_home -v 11 to find the exact directory and then pasted it in the user settings you have marked with a red rectangle. Then I restarted VS code and it worked.
Edit: Looked at your screenshots...
You did this: C:\Program Files\Java\jdk1.8.0_181
You wanted this: C:/Program Files/Java/jdk1.8.0_181
From the Trailhead unit you linked:

PhpUnit runs indefinitely

None of the PHP Unit tests implemented run.
It doesn't throw errors either.
No errors are logged and the test keeps running infinitely.
C:\xampp_v7.0\htdocs\...>vendor\bin\phpunit --verbose tests\TestCase\Model\Table\UsersTableTest.php
PHPUnit 6.5.9 by Sebastian Bergmann and contributors.
Runtime: PHP 7.0.30 with Xdebug 2.5.5
Configuration: C:\xampp_v7.0\htdocs\...\phpunit.xml.dist
I restarted MySql server and this was fixed.
Another possible reason could be
Errors in the data loaded in Fixtures (Any syntax errors in the fixture files can lead to this situation) This can be identified by excluding all fixtures and including them one at a time and running the tests. Using this way the fixture that caused the issue can be found.

Android build fails in codenameone build sever

My android build fails after build and this is the error log i get
Total time: 1 mins 16.631 secs
Stopped 0 compiler daemon(s).
Received result Failure[value=org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':dexRelease'.] from daemon DaemonInfo{pid=5907, address=[10331ba5-2501-41cc-aa13-52a0ba46bd51 port:41817, addresses:[/0:0:0:0:0:0:0:1%1, /127.0.0.1]], idle=false, context=DefaultDaemonContext[uid=2862cb6d-50e8-4321-a1fa-590435e89f0f,javaHome=/usr/java/jdk1.7.0_67,daemonRegistryDir=/home/ec2-user/.gradle/daemon,pid=5907,idleTimeout=120000,daemonOpts=-XX:MaxPermSize=512m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1500m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be done).
This is probably related to this: https://www.codenameone.com/blog/video-new-defaults-barcode-qrcode-changes.html
You can workaround this by using android.gradle=false in the build hints. However, I'm guessing its related to some cn1lib or build hint you added. But it seems the build error log you provided is partial so I don't see any issue there.

I get this Missing or bad plugin while running sonar-runner on a C project

I'm trying to analyze a example project which was provided by the sonarQube examples. I have this C/C++ version 2.0 plugin installed on my SonarQube.
My sonar-project.properties has these contents.
sonar-project.properties
sonar.projectKey=org.codehaus.sonar:simple-c-project
sonar.projectName=Simple C project analyzed with the SonarQube Runner
sonar.projectVersion=1.0
sonar.sources=src
sonar.language=c
sonar.sourceEncoding=UTF-8
When i run the sonar-runner command for this project i get an error as given below
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:90)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:41)
Caused by: com.A.A.A.B.A: Missing or bad plugin license. Please check logs.
Am i missing any plugins or is the plugin installed not proper.
Thank You.
Alternatively you can use another plugin in sonar called sonar-cxx if you don't want to use the commercial plugin. Its community edition Plugin. You can find it Here- https://github.com/wenns/sonar-cxx/wiki/Installation
You can download it from here - https://github.com/wenns/sonar-cxx/releases/tag/cxx-0.9.1
The C/C++ plugin is a commercial plugin, which requires a purchased licenses. I suspect the problem is that it can't find your licenses.
According to the official instructions, you need to do this:
Log in as a System administrator, go to Settings > General Settings > Licenses, paste your license key and Save (was Settings > General Settings > C/C++ (SonarSource) prior to version 1.6).

Is JRebel necessary to run Maven?

Greetings,
I am trying to start a scala/liftweb project for deployment on Google App Engine. To do this, i need to package it up as a .war using maven.
However, whenever I run the 'mvn' command, I am met with:
Error opening zip file or JAR manifest missing : /Applications/JRebel/jrebel.jar
Error occurred during initialization of VM
agent library failed to init: instrument
Is there something wrong with my maven or do I need Jrebel? I see jrebel is not free which is why I am so surprised.
thanks!
No, JRebel is definitely not required to run Maven.
As Matt mentioned, JRebel is not required to run Maven. However, ZeroTurnaround does offer a free version that works with Scala. You can get it here:
http://sales.zeroturnaround.com/
As for your error - it indicates you are trying to start the JVM as though you are using JRebel. What is the full Maven command you are running? What is in your MAVEN_OPTS environment variable? If either of them contain something like -noverify -javaagent:/Applications/JRebel/jrebel.jar, then that's your problem.
One of the reason of the problem is a blank in the path of jrebel.jar
Make sure that there is no blank in the path like in "Program Files"

Resources