I'm using node_modules/codelyzer
to analyze my source code Typescript
. I define manually rules in tslint.json
file.
But it is possible to analyze Typescript
with SonarQube
?
I'm using node_modules/codelyzer
to analyze my source code Typescript
. I define manually rules in tslint.json
file.
But it is possible to analyze Typescript
with SonarQube
?
You can use a plugin developed by the SonarQube community to support TypeScript.
You will find it on the "Other Plugins" page on the official SonarQube Plugin Library.
Just to chime in as I did not see the TypeScript plugin on that page. This one seems to be useful: https://github.com/Pablissimo/SonarTsPlugin
Just in case you are building using Visual Studio 2017, you can use the SonarScanner for MSBuild 4.2 to build the .NET Core project(s) that contain your Typescript source code.
For example in this case, the following commands are in a package.json file for an Angular project:
Set the following commands to be executed during build in the .csproj file:
You can then use the .NET Core dotnet build/publish
tasks to build the project.
After that, end the SonarScanner and analyse the results on SonarQube. You may see Typescript, Javascript and a bunch of other languages that you may have in your project. Using the VSTS CI tasks makes this uber easy.
© 2022 - 2024 — McMap. All rights reserved.