简体   繁体   中英

Relevance of using SonnarQube on coffeescript compiled JS

I m actually developping an application using coffeescript to transpile into javascript.

I was wondering if it's relevant to use SonnarQube to check generated javascript and to check unit test coverage % ?

Because when running sonar-runner on my ./app folder (the folder with the generated javascript), I have some errors and I can't do anything on these files.

Here's are some errors (due to coffeescript transpiling) :

在此处输入图片说明

Thanks for advance

You could get away with some or all of the issues in your transpiled files by setting up some exclusion rules .

For instance, you can use a file pattern of app/**/*.js with a rule pattern of * , which will get rid of all issues on your transpiled files in the app/ folder.

Now, if you only want coverage on your CoffeeScript code, you can have a look at the generic coverage plugin , in conjunction with the sonar.import_unknown_files property - although this could generate some noise, depending on the types of files you have in your source tree.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM