Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about recursive analysis... #54

Closed
leobip opened this issue Feb 27, 2020 · 9 comments
Closed

Question about recursive analysis... #54

leobip opened this issue Feb 27, 2020 · 9 comments
Labels

Comments

@leobip
Copy link

leobip commented Feb 27, 2020

First of all, thanks for the plugin ... I have installed it and I have successfully performed analysis of a source directory ... but I cannot configure it for recursive analysis of a directory with two subdir´s and several inside with the sources

@begarco
Copy link
Contributor

begarco commented Feb 27, 2020

Hi @leobip,

The plugin analyzes all files you declare in sonar.sources which have the correct extension, e.g.: sh, ksh, bash, etc.

Can you check your configuration or provide it to us?

@leobip
Copy link
Author

leobip commented Feb 28, 2020

Hi ...
Thanks for the help, the sources of the project I want to analyze are like this:
SOURCE / src / ... several dir's with .f90
SOURCE / srcsim / ... several dir's with f90

and this is my jenkins config:

sonar.projectKey=KeyOfTheProject
sonar.projectName=NameOfTheProject

sonar.projectBaseDir=K:/Repositories/SONAR_s3fdf_Fortran/SOURCE/
sonar.sources=src,srcsim

sonar.cxx.cppcheck.reportPath=$WORKSPACE/S3FDF_cppcheck-report.xml

thanks again..

@begarco
Copy link
Contributor

begarco commented Mar 3, 2020

Can you try using sonar.sources=.?

This path seems strange: K:/Repositories/SONAR_s3fdf_Fortran/SOURCE/ are you on windows or linux?

@leobip
Copy link
Author

leobip commented Mar 4, 2020

Hi.. thanks for your help.
I tried using sonar.sources =.
but failed too
here is my console output...

10:37:45 [SONAR_s3fdf_Fortran] $ "C:\Program Files (x86)\Jenkins\tools\hudson.plugins.sonar.SonarRunnerInstallation\Sonar-scanner\bin\sonar-scanner.bat" -Dsonar.host.url=http://gmvsonar.gmv.es:8080 ******** -Dsonar.cxx.cppcheck.reportPath=K:/Repositories/SONAR_s3fdf_Fortran/S3FDF_cppcheck-report.xml -Dsonar.projectName=S3FDF -Dsonar.icode.embedded=true -Dsonar.projectKey=S3FDF -Dsonar.projectBaseDir=K:/Repositories/SONAR_s3fdf_Fortran/SOURCE/src -Dsonar.sources=.
10:37:45 INFO: Scanner configuration file: C:\Program Files (x86)\Jenkins\tools\hudson.plugins.sonar.SonarRunnerInstallation\Sonar-scanner\bin..\conf\sonar-scanner.properties
10:37:45 INFO: Project root configuration file: NONE
10:37:45 INFO: SonarQube Scanner 3.2.0.1227
10:37:45 INFO: Java 1.8.0_221 Oracle Corporation (64-bit)
10:37:45 INFO: Windows 10 10.0 amd64
10:37:46 INFO: User cache: C:\Users\soporte-ad-cm.sonar\cache
10:37:46 INFO: SonarQube server 6.7.7
10:37:46 INFO: Default locale: "es_ES", source code encoding: "windows-1252" (analysis is platform dependent)
10:37:46 INFO: Publish mode
10:37:46 INFO: Load global settings
10:37:46 INFO: Load global settings (done) | time=54ms
10:37:46 INFO: Server id: 49B321BC-AWrqmL3WaN5Q86v64K22
10:37:46 INFO: User cache: C:\Users\soporte-ad-cm.sonar\cache
10:37:46 INFO: Load plugins index
10:37:46 INFO: Load plugins index (done) | time=35ms
10:37:47 INFO: Process project properties
10:37:47 INFO: Load project repositories
10:37:47 INFO: Load project repositories (done) | time=91ms
10:37:47 INFO: Load quality profiles
10:37:47 INFO: Load quality profiles (done) | time=22ms
10:37:47 INFO: Load active rules
10:37:48 INFO: Load active rules (done) | time=362ms
10:37:48 INFO: Load metrics repository
10:37:48 INFO: Load metrics repository (done) | time=19ms
10:37:48 INFO: Project key: S3FDF
10:37:48 INFO: ------------- Scan S3FDF
10:37:48 INFO: Load server rules
10:37:48 INFO: Load server rules (done) | time=108ms
10:37:48 INFO: Base dir: K:\Repositories\SONAR_s3fdf_Fortran\SOURCE\src
10:37:48 INFO: Working dir: K:\Repositories\SONAR_s3fdf_Fortran\SOURCE\src.scannerwork
10:37:48 INFO: Source paths: .
10:37:48 INFO: Source encoding: windows-1252, default locale: es_ES
10:37:48 INFO: Index files
10:37:48 INFO: 528 files indexed
10:37:48 INFO: Quality profile for c++: Sonar way
10:37:48 INFO: Quality profile for f77: Sonar way
10:37:48 INFO: Quality profile for f90: Sonar way
10:37:48 INFO: Quality profile for php: Sonar way
10:37:49 INFO: Sensor C++ (Community) SquidSensor [cxx]
10:37:49 INFO: Sensor C++ (Community) SquidSensor [cxx] (done) | time=255ms
10:37:49 INFO: Sensor C++ (Community) CppCheckSensor [cxx]
10:37:49 INFO: Searching reports by relative path with basedir 'K:\Repositories\SONAR_s3fdf_Fortran\SOURCE\src' and search prop 'sonar.cxx.cppcheck.reportPath'
10:37:49 WARN: Property 'sonar.cxx.cppcheck.reportPath': cannot find any files matching the Ant pattern(s) 'K:\Repositories\SONAR_s3fdf_Fortran\S3FDF_cppcheck-report.xml'
10:37:49 INFO: CXX-CPPCHECK processed = 0
10:37:49 INFO: Sensor C++ (Community) CppCheckSensor [cxx] (done) | time=15ms
10:37:49 INFO: Sensor Coverage Report Import [csharp]
10:37:49 INFO: Sensor Coverage Report Import [csharp] (done) | time=0ms
10:37:49 INFO: Sensor Coverage Report Import [csharp]
10:37:49 INFO: Sensor Coverage Report Import [csharp] (done) | time=0ms
10:37:49 INFO: Sensor Unit Test Results Import [csharp]
10:37:49 INFO: Sensor Unit Test Results Import [csharp] (done) | time=0ms
10:37:49 INFO: Sensor JavaXmlSensor [java]
10:37:49 INFO: Sensor JavaXmlSensor [java] (done) | time=5ms
10:37:49 INFO: Sensor fr.cnes.sonar.plugins.icode.check.ICodeSensor [sonaricode]
10:37:50 INFO: Reflections took 182 ms to scan 12 urls, producing 27 keys and 243 values
10:37:50 INFO: Reflections took 118 ms to scan 12 urls, producing 27 keys and 243 values
10:37:50 INFO: Reflections took 125 ms to scan 12 urls, producing 27 keys and 243 values
10:37:50 INFO: Reflections took 106 ms to scan 12 urls, producing 27 keys and 243 values
10:37:50 INFO: Reflections took 103 ms to scan 12 urls, producing 27 keys and 243 values
10:37:50 INFO: Reflections took 137 ms to scan 12 urls, producing 27 keys and 243 values
10:37:50 INFO: Reflections took 107 ms to scan 12 urls, producing 27 keys and 243 values
10:37:51 INFO: Reflections took 107 ms to scan 12 urls, producing 27 keys and 243 values
10:37:51 INFO: Reflections took 102 ms to scan 12 urls, producing 27 keys and 243 values
10:37:51 INFO: Reflections took 123 ms to scan 12 urls, producing 27 keys and 243 values
10:37:51 INFO: Reflections took 132 ms to scan 12 urls, producing 27 keys and 243 values
10:38:00 INFO: ------------------------------------------------------------------------
10:38:00 INFO: EXECUTION FAILURE
10:38:00 INFO: ------------------------------------------------------------------------
10:38:00 INFO: Total time: 14.485s
10:38:00 INFO: Final Memory: 419M/1185M
10:38:00 INFO: ------------------------------------------------------------------------
10:38:00 ERROR: Error during SonarQube Scanner execution
10:38:00 ERROR: Index: -1, Size: 1
10:38:00 ERROR:
10:38:00 ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
10:38:00 WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succedeed?
10:38:00 ERROR: SonarQube scanner exited with non-zero code: 1
10:38:03 Finished: FAILURE

@begarco
Copy link
Contributor

begarco commented Mar 5, 2020

Hi @leobip,

It seems your sonar.sources were not correctly set.

The new problem seems to be an internal i-Code error. I come back to you as soon as possible, I have created a dedicated issue #55.

@begarco
Copy link
Contributor

begarco commented Apr 28, 2020

Does the version 2.0.2 solve your problem?

@leobip
Copy link
Author

leobip commented Jun 2, 2020

Hi...
the 2.0.2 version it's not for 6.7 sonar.
but i have some other problem.... maybe you can helpme.....

this is the message

thanks in advance

18:44:08.241 WARN: i-Code CNES analysis encountered a problem.
18:44:08
18:44:08 Analysis failure : Your file could not be analyzed. Please verify that it was encoded in an UNIX format.
18:44:08 CheckerId: fr.cnes.icode.fortran77.rules.COMDATAInitialisation
18:44:08 File: K:\Repositories\Sonar_Galfoc\SOURCE\galfoc\branches\SLES12_Migration\repository_napeos\src\auxtool\bgs.f
18:44:08 Line:0
18:44:08 Column:80
18:44:08 Last word scanned: [
] [13 ]
18:44:08 Please report this issue on : https://github.com/lequal/i-CodeCNES/issues/
18:44:08 fr.cnes.icode.exception.JFlexException: i-Code CNES analysis encountered a problem.
18:44:08
18:44:08 Analysis failure : Your file could not be analyzed. Please verify that it was encoded in an UNIX format.
18:44:08 CheckerId: fr.cnes.icode.fortran77.rules.COMDATAInitialisation
18:44:08 File: K:\Repositories\Sonar_Galfoc\SOURCE\galfoc\branches\SLES12_Migration\repository_napeos\src\auxtool\bgs.f
18:44:08 Line:0
18:44:08 Column:80
18:44:08 Last word scanned: [
] [13 ]
18:44:08 Please report this issue on : https://github.com/lequal/i-CodeCNES/issues/

@dgokcin
Copy link

dgokcin commented Aug 20, 2020

@leobip you need to convert the files to a unix format which could be done with a tool like dos2unix. After that you will see that the error is gone.

@leobip leobip closed this as completed Jan 20, 2021
@leobip
Copy link
Author

leobip commented Jan 20, 2021

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants