I am using circleci orb to execute the scan action, after migration to the version 1.1.0, I was on version 1.03 before, the scan begin to analyse the test folder.
It looks like the latest version is 1.1.1. But what is the error you’re seeing? Can you share your analysis logs?
The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.
Your parameters in the first post include sonar.tests, but I don’t see that reflected in your analysis log. Are you sure those are your current analysis parameters/settings?
I think it’s worth double-checking because I see another discrepancy:
Your OP
Versus your analysis log:
That leading ./ on the inclusion is a minor discrepancy, but analysis woudln’t have added it in on its own. It’s another indication that maybe you’re not running with the parameters you think you are.
Note that you can use sonar.scanner.dumpToFile=[path to file] to see the final parameter list analysis is running with.
In the logs i found that maybe this new problem, last week everything worked OK, is that something change an for some reason now I am seeing this: 08:45:15.118 DEBUG: Created program for /home/circleci/project/tsconfig.json with 1610 files. that not normal because my tsconfig file only has “include”: [“./src/**/*.ts”],
“exclude”:
The real problem is the time, normally its take 2 mins max, now its taking more than 5 mins some times 7 mins without any code change, and no more files. Maybe the " /home/circleci/project/tsconfig.json with 1610 files" is what’s taking more time than before?
I also tested with this configuration:
sonar.language=js
sonar.sources=src/
sonar.inclusions=src/**/*.ts
sonar.exclusions=test/**,src/**/configurationParametersMap.ts
sonar.tests=test/
sonar.test.exclusions=tests/**,src/**/configurationParametersMap.ts
sonar.javascript.lcov.reportPaths=coverage/lcov.info
# workaround for avoid memory problem
sonar.javascript.node.maxspace=4096
sonar.verbose=true
``
Without any change with the time.
Regards
Ruben
** in an exclusion/inclusion pattern means 0-n directories, so sonar.exclusions=test/** isn’t doing what you think it is. Try sonar.exclusions=test/**/*.ts (&etc) instead
except that your specification of sonar.tests=test/ naturally already excludes those files from being considered source files.