First of all, this is using the Rust Plugin. I don’t believe this is the issue, as it gets to that point fine.
Right after successfully analyzing my file lib.rs
, sonar-scanner gives me this error:
java.lang.IllegalArgumentException: Start pointer [line=1, lineOffset=0] should be before end pointer [line=1, lineOffset=0]
I’m using this script to launch it:
#!/bin/bash
grcov ./target/debug/ -s . -t cobertura --llvm --branch --ignore-not-existing -o ./target/debug/coverage.xml
cargo +nightly clippy --message-format=json >| TEMP_CLIPPY.json
sudo sonar-scanner -X \
-Dsonar.projectKey=qiish-parse \
-Dsonar.sources=./src/ \
-Dsonar.host.url=http://localhost:9000 \
-Dsonar.login=<MY_TOKEN> \
(<MY_TOKEN> is replaced with my token in the script).
Here’s lib.rs
: gist
And here’s my sonar-project.properties file:
community.rust.clippy.reportPaths = TEMP_CLIPPY.json
community.rust.cobertura.reportPaths = target/debug/coverage.xml