Skip to content
This repository has been archived by the owner on Jul 8, 2019. It is now read-only.

"ERROR: Missing source file" for files that exist. #192

Open
factoidforrest opened this issue Jun 25, 2018 · 3 comments
Open

"ERROR: Missing source file" for files that exist. #192

factoidforrest opened this issue Jun 25, 2018 · 3 comments

Comments

@factoidforrest
Copy link

Operating system: Debian
Scanner version: sonar-scanner-3.2.0.1227-linux
Typescript version: 2.4.3 and also tried 2.9.2(latest)

When running on my typescript project, the files are correctly scanned and covered by everything except the tslint-sonarts plugin.

The plugin first says it can't find the files, but then finds them locally and seems to generate metadata for them. It's like the absolute paths do not work but the relative paths do. The output:

5:51:25.193 DEBUG: Starting external process `node /project/.scannerwork/sonarts-bundle/node_modules/tslint-sonarts/bin/tsrunner`
15:51:27.211 ERROR: Missing source file : /project/src/auth.ts
15:51:27.216 ERROR: Missing source file : /project/src/config/logger-categories.ts
15:51:27.221 ERROR: Missing source file : /project/src/config/logger-config.ts
15:51:27.229 ERROR: Missing source file : /project/src/features/ex-dashboard/ex-dashboard.component.ts
15:51:27.262 ERROR: Missing source file : /project/src/features/ex-dashboard/tests/ex-dashboard.component.tests.ts
15:51:27.272 ERROR: Missing source file : /project/src/features/functestapp/functestapp.component.ts
15:51:27.288 ERROR: Missing source file : /project/src/features/functestapp/tests/functestapp.component.tests.ts
15:51:27.294 ERROR: Missing source file : /project/src/features/page-not-found/page-not-found.component.ts
15:51:27.314 ERROR: Missing source file : /project/src/features/page-not-found/tests/page-not-found.component.tests.ts
15:51:27.323 ERROR: Missing source file : /project/src/functestapp.module.ts
15:51:27.330 ERROR: Missing source file : /project/src/functestapp.routing.ts
15:51:27.334 ERROR: Missing source file : /project/src/placeholder.ts
15:51:27.339 ERROR: Missing source file : /project/src/polyfills.ts
15:51:27.344 ERROR: Missing source file : /project/src/prelaunch.ts
15:51:27.349 ERROR: Missing source file : /project/src/root.aot.ts
15:51:27.353 ERROR: Missing source file : /project/src/root.ts
15:51:27.454 DEBUG: 'src/auth.ts' generated metadata  with charset 'UTF-8'
15:51:27.545 DEBUG: 'src/config/logger-categories.ts' generated metadata  with charset 'UTF-8'
15:51:27.552 DEBUG: Not enough content in 'src/config/logger-categories.ts' to have CPD blocks, it will not be part of the duplication detection
15:51:27.560 DEBUG: 'src/config/logger-config.ts' generated metadata  with charset 'UTF-8'
15:51:27.574 DEBUG: 'src/features/ex-dashboard/ex-dashboard.component.ts' generated metadata  with charset 'UTF-8'
15:51:27.589 DEBUG: 'src/features/ex-dashboard/tests/ex-dashboard.component.tests.ts' generated metadata  with charset 'UTF-8'
15:51:27.604 DEBUG: 'src/features/functestapp/functestapp.component.ts' generated metadata  with charset 'UTF-8'
15:51:27.621 DEBUG: 'src/features/functestapp/tests/functestapp.component.tests.ts' generated metadata  with charset 'UTF-8'
15:51:27.634 DEBUG: 'src/features/page-not-found/page-not-found.component.ts' generated metadata  with charset 'UTF-8'
15:51:27.647 DEBUG: 'src/features/page-not-found/tests/page-not-found.component.tests.ts' generated metadata  with charset 'UTF-8'
15:51:27.659 DEBUG: 'src/functestapp.module.ts' generated metadata  with charset 'UTF-8'
15:51:27.668 DEBUG: 'src/functestapp.routing.ts' generated metadata  with charset 'UTF-8'
15:51:27.678 DEBUG: 'src/placeholder.ts' generated metadata  with charset 'UTF-8'
15:51:27.682 DEBUG: Not enough content in 'src/placeholder.ts' to have CPD blocks, it will not be part of the duplication detection
15:51:27.687 DEBUG: 'src/polyfills.ts' generated metadata  with charset 'UTF-8'
15:51:27.692 DEBUG: Not enough content in 'src/polyfills.ts' to have CPD blocks, it will not be part of the duplication detection
15:51:27.697 DEBUG: 'src/prelaunch.ts' generated metadata  with charset 'UTF-8'
15:51:27.706 DEBUG: 'src/root.aot.ts' generated metadata  with charset 'UTF-8'
15:51:27.716 DEBUG: 'src/root.ts' generated metadata  with charset 'UTF-8'
15:51:27.720 INFO: Sensor TypeScript Sensor [typescript] (done) | time=5165ms
@atsikov
Copy link

atsikov commented Aug 10, 2018

Same issue on
OS: Mac OS X 10.13.4 x86_64
TS: 2.8.3
Sonar scanner: 3.2.0.1227
Sonar Server: 6.7.5 LTS

@janmax
Copy link

janmax commented Nov 13, 2018

Same issue on
OS: Linux 4.18.16 x86_64
TS: 3.1.3
Sonar scanner: 3.1.0.1141
Sonar Server: 6.7.5 LTS

@gauravpatni123
Copy link

Hi , any solution related to that , i am facing the same issue , i am running it on windows 10. all the ts file exist in local still giving error that

Missing source file : E:/Pyramid Staffing Project1/Development/Pyramid.Staffing/Pyramid.Staffing.Api/node_modules/object.defaults/node_modules/isobject/index.d.ts

please help.

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

No branches or pull requests

4 participants