You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We don't analyze files that are part of the project, but they are not directly referenced in tsconfig.json. If we have tsconfig.json such as
{
"files": ["root.ts"]
}
where root.ts imports another file module.ts, which is not referenced in tsconfig.json however it is part of the project build
import * as m from 'module'
module.ts will not be recognized as belonging to project by SonarJS. To be able to recognize it as belonging to the project we would need to create the project using TypeScript APIs (project.getSourceFiles()), and not only parse tsconfig.json file.
As a workaround, project should list all TypeScript files in tsconfig.json file
The text was updated successfully, but these errors were encountered:
Hi, as an end-user I'm not sure if I'm reading your description correctly, but I might be having this problem now? I wrote a longer description here but the gist is that if I have 3 entries in my files array, those 3 files get analyzed but the rest of my project, which is imported from the main entry point, does not. Given that the fix above is tagged as milestone 8.7, and we're on server 8.9.8, should I expect this to be resolved?
We don't analyze files that are part of the project, but they are not directly referenced in
tsconfig.json
. If we havetsconfig.json
such aswhere
root.ts
imports another filemodule.ts
, which is not referenced intsconfig.json
however it is part of the project buildmodule.ts
will not be recognized as belonging to project by SonarJS. To be able to recognize it as belonging to the project we would need to create the project using TypeScript APIs (project.getSourceFiles()
), and not only parsetsconfig.json
file.As a workaround, project should list all TypeScript files in
tsconfig.json
fileThe text was updated successfully, but these errors were encountered: