Closed evgeniagusakova closed 7 years ago
The metrics are correct in the sense, that the ColdFusion plugin doesn't (yet) show LOC nor Duplications. There's a plan to cover those via issue #1.
As for the Bugs, Vulnerabilities and Code Smells---these might be correct, depending on the actual code you were scanning. Perhaps there are no issues to report :)
Note that you shouldn't need to force a specific language for your project, because the analyzer will automatically detect the language of each file, based on its extension. In other words, you can skip the sonar.language
property.
Thank you for your replay!
Could you please provide my .cfm file with has bugs/issues in it, and I'll try to check settings with bugged file?
I test with:
cp /bin/ls /path/to/project/123.cfm
2. added file with random text, test.cfm - also not valid cfm file
And re-run Sonar.
Binary ls
is not valid cfm file but:
17:45:01.047 DEBUG: Language of file '123.cfm' is detected to be 'cf'
17:45:01.047 WARN: Invalid character encountered in file /var/lib/jenkins/workspace/xxxx_sonar/123.cfm at line 1 for encoding US-ASCII. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
Still have 0 in all output metrics.
The plugin will find issues in ColdFusion code files. What I see you're trying to do is running the scan on /bin/ls
which is a binary file that, obviously, the plugin will not be able to scan, hence no results.
You could find good files for testing in CFLint's test suite.
I'm trying to use cf plugin in the following way (all env. variables are set and valid):
LANG=cf
And got the following output:
Sonar Server version: 6.1 Sonar Runner: 2.8
I checked same configuration with JAVA project (
LANG=java
) and for the first view it looks OK.I do not sure is it really bug in plugin or misconfiguration, could you please advice?