HTML and Typescript Custom Rule Writing


(Amruth) #1

Hello Team,
Is there anyway to write custom rules for HTML and TypeScript (for open-source or paid version)? We need immediate help!

(Tibor Blenessy) #2


unfortunately writing custom rules in SonarTS is currently not possible, and we don’t plan to work on it for the time being.

However if the rule you have in mind is applicable in general, you can share the idea and we can consider to implement the rule.

(Amruth) #3

We have already done modification for sonarweb plugin according to our requirements but wrt SonarTS we are not able to understand the architecture of that plugin coding style means like implementation file, test file and unit test file. The repo we got from github is having multiple files with typescript and java so is it possible to write the code with java only like we do in Sonarweb. I will be thankful for your cooperation as by this way i can contribute to SONAR community as well.
Thanks in advance!

(Tibor Blenessy) #4

We do not support writing custom rules in SonarTS. Architecture of that plugin is quite different because it is based on TypeScript compiler and TSLint. Rules are actually written in TypeScript.

If you really need to write custom rules, best way would be to write custom rule for TSLint and import the report from TSLint into SonarQube.

TSLint report import will be available in SonarQube 7.2 and SonarTS 1.7, which are about to be released soon.

(Amruth) #5

Okay,Thank you for your quick response

(Tibor Blenessy) #6