Skip to content
This repository was archived by the owner on Apr 27, 2021. It is now read-only.
This repository was archived by the owner on Apr 27, 2021. It is now read-only.

Failed to find a source file matching path * in program created with * ( tsconfig.json) #883

@totodile94

Description

@totodile94

I want to report a bug.

SonarTS version: 1.9

Node.js version: 10.16.0

TypeScript version: 3.6.4

SonarQube version: 8.0.0.29455

TSLint version: 5.20.0

Logs

INFO: Analyzing 520 typescript file(s) with the following configuration file D:\Latest\fleet-streams\tsconfig.json
ERROR: Failed to find a source file matching path D:\Latest\fleet-streams\poller\__test__\status-data-validator.test.ts in program created with D:\Latest\fleet-streams\tsconfig.json

Expected behavior

Am getting this error for all my test files. I have only one tsconfig.json file at the root. My tests are in different folders

My tsconfig file at the root ( D:\Latest\fleet-streams\tsconfig.json)

{
	"compilerOptions": {
		"baseUrl": ".",
		"paths": {
			"async-lock": [
				"ts-types.d.ts"
			],
			"shared/*": [
				"shared/*"
			]
		},
		"lib": [
			"es2018",
			"dom"
		],
		"outDir": "./tsc-dist",
		"sourceMap": true,
		"module": "commonjs",
		"resolveJsonModule": true,
		"allowJs": true,
		"target": "es2018",
		"strict": false,
		"noUnusedParameters": true,
		"noUnusedLocals": true,
		"experimentalDecorators": true,
		"allowUnreachableCode": false
	},
	"include": [
		"./**/src/**/*",
		"./**/src/**/*.ts",
        "./enrollment-functions/**/*",
        "./enrollment-functions/**/*.json",
        "./enrolment-functions/extensions.csproj",
		"./shared/**/*.ts",
		"./shared/db-scripts/**/*.js"
	],
	"exclude": [
        "node_modules"
	]
}

My sonar-project.properties file in the root

sonar.typescript.tsconfigPath=tsconfig.json
sonar.exclusions=**/node_modules/**

I tried adding sonar.typescript.tsconfigPath as suggested in an earlier post but it did not work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions