My SonarScanner run completes "successfully" but then the component says "The main branch has no lines of code."
After googling around, it seems like this is potentially a pretty in-depth issue with many possible causes, so maybe as more of a hail-marry, is there anything obviously wrong with my SONAR_SCANNER_OPTS? Or are there any recommendations on where to start digging?
This package uses python and the whole thing is running inside an AWS Lambda function if that makes any difference.
SONAR_SCANNER_OPTS=
-Dsonar.host.url=https://internal.integ.sonarqube.adninfra.net
-Dsonar.login=<VALID_LOGIN_CHARS>
-Dsonar.projectBaseDir=/tmp/tmp_static_analysis_xywpac41/tmpo0eyrv2a/generic-flavor/src
-Dsonar.projectName=VALID_PROJECT_NAME
-Dsonar.projectKey=VALID_PROJECT_KEY
-Dsonar.projectVersion=1.0.29043.0
-Dsonar.externalIssuesReportPaths=
-Dsonar.coverage.exclusions=build/**/*,**/tst/**/*,**/test/**/*,**/examples/**/*,**/doc/**/*,**/documentation/**/*,**/third-party-src/**/*,**/generated/**/*
-Dsonar.coverage.jacoco.xmlReportPaths=-
-Dsonar.lang.patterns.c=-
-Dsonar.cpp.file.suffixes=-
-Dsonar.objc.file.suffixes=-
-Dsonar.css.file.suffixes=-
-Dsonar.sourceEncoding=UTF-8
-Dsonar.scm.disabled=true
-Dsonar.sonar.python.coverage.reportPaths=/tmp/tmp_static_analysis_xywpac41/gtd-no-branch-wv98cchq.xml
-Dsonar.python.file.suffixes=.cc,.cpp,.cxx,.h,.hpp,.hxx,.c
-Dsonar.inclusions=**/*
-Dsonar.branch.name=VALID_BRANCH/NAME
Much appreciated!
Turns out the issue was with the -Dsonar.python.file.suffixes param.
Setting it to this solved the issue: -Dsonar.python.file.suffixes=.py,.pyc,.pyo,pyd
Related
I'm trying to go get go.etcd.io/etcd/tools/benchmark.
Previously this has worked, flawlessly. However when I try to do it currently I have alternatively got no errors and I've had it fail on me with:
go/src/go.etcd.io/etcd/vendor/google.golang.org/grpc/balancer_conn_wrappers.go:28:2: use of internal package google.golang.org/grpc/internal/buffer not allowed
go/src/go.etcd.io/etcd/vendor/google.golang.org/grpc/clientconn.go:49:2: use of internal package google.golang.org/grpc/internal/resolver/dns not allowed
go/src/go.etcd.io/etcd/vendor/google.golang.org/grpc/clientconn.go:50:2: use of internal package google.golang.org/grpc/internal/resolver/passthrough not allowed
The first time I ran it on a new go-1.13 installation it worked, but the following times it has failed as above.
The repo has not changed as far as I can tell in the past 8 months and I've tried on various golang versions but all so far have failed (bar the go-1.13 on that first try...).
Any assistance debugging this would be greatly appreciated!
I have both a workaround and an official fix.
The workaround:
Here I defined a go.mod which then used a previous version of the library.
The official fix:
This was fixed upstream and thus no one else should experience this.
I guess you can try by removing vendor folder from the go.etcd.io/etcd repo. Also disable the vendoring mode. It should work.
I'm trying to figure out how to use gradle on bash on Ubuntu on Windows, but all the tutorials assume that everything goes smoothly and I keep getting this error:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred starting process 'Gradle build daemon'
I tried to post code from the stacktrace here, but it was impossible to format as code on this form. The "code" button doesn't do anything and I wasn't even able to use 4 spaces in parts of my code to manually format it. I am extremely intelligent, but I have never used gradle successfully before (and this form being wonky is double frustrating) and I've worked dozens of hours to find a useful tutorial for someone like me who has run many complex programs in compilers, but never used a build tool before. Frankly, no one has ever told me what a build tool is useful for (other than basic scripting which I understand) and the information is hidden very well online. My programs run fine without a scripting tool, but I know I'm missing something and gradle seems to be essential for some reason, but nearly impossible to learn without expert guidance since all the tutorials leave out essential information. I assume knowledge of ant and maven are taken for granted, but if gradle is as superior as it is touted to be, it would be counterproductive to learn the inferior build tools. Is there any way to learn gradle without wishing for death? Please help.
Whilst coding a fun new trash can for a Minecraft server network that I develop for, I came across a pretty strange, and therefore infuriating, bug concerning Maven. I've been using it for a year or two now and have only gotten a single build error before, when I first started using it. Suddenly, this problem has shown itself.
The red arrows indicate the lines that are causing the build failure.
This is a screenshot of the Maven logs that are causing the issue.
Well, according to the Bukkit API docs (note that the official docs seem to be down, thus third party), the class InventoryClickEvent has no method getClickedInventory().
This fact definitely explains your compilation error. The error comes from your Java compiler, Maven has nothing to do with it.
I'm developing a package for nitrous.io autoparts and wonder if there is any documentation or resources for package developers.
My main problem is that autoparts is not very verbose. It's just telling me that a command failed but not why it failed or the output of that command. Is there a way to increase the verbosity? Log files? Anything?
Additionally, it's behaviour is really strange, see that gist: https://gist.github.com/phortx/9504396
The Autoparts documentation has been updated to include package development information. Here are a couple guides to help you out.
Guidelines and contribution instructions: https://github.com/nitrous-io/autoparts/blob/master/docs/contributing.md
Example part: https://github.com/nitrous-io/autoparts/blob/master/docs/example-part.rb
You can also view the documentation within your Nitrous.IO box by running the following commands within the console. You may need to run $ parts update in the console first to pull the latest documentation.
$ cat ~/.parts/autoparts/docs/contributing.md
$ cat ~/.parts/autoparts/docs/example-part.rb
Meanwhile I still not found docs, but found solutions for my problems. Actually parts is verbose, it crashes before any output. The reason for that crash which I also showed in my gist is that it can't extract .xz files.
I'm really stuck on this one. I built the Godaddy Ruby plugin for Sonar and it seems to run fine, I can log out results from Cane and others, but at this line:
https://github.com/GoDaddy-Hosting/ruby-sonar-plugin/blob/master/src/main/java/com/godaddy/sonar/ruby/metricfu/MetricfuComplexityYamlParserImpl.java#L38
I get a null pointer exception because Saikuro doesn't seem to be in that object. I'm wondering if I'm missing a configuration item or something. Has anyone seen this problem?
What's more annoying is that if I comment out the offending code, none of the results of the other analysis tools get saved to Sonar. I get a massive MetricFu results.yml but nothing is reported to Sonar.
A quick glance at the code looks like it might rely on the old metric_fu interface... Your version of metric_fu might be too new for the above code. Please enter an issue on the metric_fu issues tracker and we can help you better, there. https://github.com/metricfu/metric_fu/issues