there will be 0 files to be analyzed, so why would this happen?
and
without the -Dsonar.scm.disabled=true, the execution will be ok, while all files are ignored.
with the -Dsonar.scm.disabled=true, the execution will throw exception like
java.lang.StackOverflowError
at org.sonar.channel.CodeReader.popTo(CodeReader.java:141)
at org.sonar.plugins.html.lex.ElementTokenizer.handleBeforeNodeName(ElementTokenizer.java:180)
at org.sonar.plugins.html.lex.ElementTokenizer.parseToken(ElementTokenizer.java:127)
at org.sonar.plugins.html.lex.ElementTokenizer.parseToken(ElementTokenizer.java:96)
at org.sonar.plugins.html.lex.ElementTokenizer.addNode(ElementTokenizer.java:55)
at org.sonar.plugins.html.lex.AbstractTokenizer.consume(AbstractTokenizer.java:94)
at org.sonar.plugins.html.lex.NormalElementTokenizer.consume(NormalElementTokenizer.java:46)
at org.sonar.plugins.html.lex.PageLexer.nestedParse(PageLexer.java:109)
at org.sonar.plugins.html.lex.ElementTokenizer.parseNestedTag(ElementTokenizer.java:116)
at org.sonar.plugins.html.lex.ElementTokenizer.nestedTag(ElementTokenizer.java:103)
at org.sonar.plugins.html.lex.ElementTokenizer.parseToken(ElementTokenizer.java:84)
at org.sonar.plugins.html.lex.ElementTokenizer.addNode(ElementTokenizer.java:55)
at org.sonar.plugins.html.lex.AbstractTokenizer.consume(AbstractTokenizer.java:94)
command : sonar-scanner -Dsonar.organization=*** -Dsonar.projectKey=*** -Dsonar.sources=*** -Dsonar.cfamily.build-wrapper-output=build-wrapper -Dsonar.host.url=[https://sonarcloud.io] withoutSCM.log (507.8 KB)
results can be uploaded to sonarcloud, while there are 0 lines indexed, 0 lines to be analyzed.
command: sonar-scanner -Dsonar.organization=*** -Dsonar.projectKey=*** -Dsonar.sources=*** -Dsonar.cfamily.build-wrapper-output=build-wrapper -Dsonar.host.url=https://sonarcloud.io -Dsonar.scm.disabled=true
sonnar-scanner executed error, files are indexed, while still 0 lines to be analyzed. withSCM.log (455.9 KB)
Thanks for the logs. They’ve helped me better understand your OP.
This is actually two different things. I have no idea why all your files are ignored when you disable SCM.
I see a lot of this in that log: 11:20:51.816 DEBUG: File '/home/disk4/dulong/starrocks/be/...' is excluded by the scm ignore settings.
Normally, I’d go down that rabbit hole, but we try to keep it to one topic per thread; otherwise it gets messy, fast. And I think the StackOverflowError is more important so I’d like to focus this thread on that. And I’m going to refer this to more expert eyes.
I was able to upload scanner result with the -Dsonar.language=c++, not sure why could this happen. BTW, i’m wondering if the github pull request can sync the sonarcloud result???
i changed the sonar.Sources to code src directory instead of build output directory, and with the following Dsonar.scm.exclusions.disabled=true -Dsonar.scm.forceReloadAll=true -Dsonar.language=c++. In the previous log, i can see the some files are indexed with language ‘null’, i suppose some files postfix are not correct.