Pablissimo / SonarTsPlugin

SonarQube plugin for TypeScript files
MIT License
185 stars 105 forks source link

How do determine that the plugin is actually working? #96

Closed DmitryMihailov closed 7 years ago

DmitryMihailov commented 7 years ago

Hi everyone!

I am sitting with this problem almost a week. I was asked to install this TS plugin for analuzing one project and requester isn't happy about his zero bugs/code smells project:

image

I looked on your example project and it's same situation there. Could you please answer: how to determine, that Sonar is actually analyzing .ts files? In logs I saw lines about indexing those files.

DEBUG: Language of file 'src/app/api/content.service.spec.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/api/content.service.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/api/menu-api.service.spec.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/api/menu-api.service.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/api/profile.service.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/app-routing.module.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/app.component.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/app.module.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/core/core-routing.module.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/core/core.component.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/core/core.module.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/core/header/header.component.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/core/notifications/notifications.component.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/core/offscreen/offscreen.component.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/home/home-routing.module.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/home/home-page.component.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/home/home.module.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/listing/listing-routing.module.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/listing/listing.component.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/listing/listing.module.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/model/AvsBaseResponse.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/model/error/DisplayParams.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/model/error/Error.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/model/menu/Menu.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/model/menu/MenuItem.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/model/menu/MenuMetadata.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/model/menu/MenuResultObject.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/model/onboarding/Onboarding.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/model/onboarding/OnboardingMetadata.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/model/profile/User.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/model/profile/UserDetails.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/model/profile/UserDevice.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/model/profile/UserLegal.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/model/profile/UserLine.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/model/profile/UserMessageItem.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/model/profile/UserProfile.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/model/profile/UserPurchase.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/model/profile/UserResult.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/model/profile/UserSubAccount.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/model/profile/UserSubscription.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/model/shared/Action.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/model/shared/BaseItem.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/model/shared/BaseResultObject.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/not-found.component.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/onboarding/onboarding-routing.module.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/onboarding/onboarding.component.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/onboarding/onboarding.module.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/page/page-routing.module.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/page/page.component.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/page/page.module.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/shared/dialogs/search-dialog.component.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/shared/directives/click-outside.directive.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/shared/directives/last.directive.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/shared/request-object.interface.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/shared/services/connection.service.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/shared/services/dialog.service.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/shared/services/helpers.service.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/shared/services/menu.service.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/shared/shared.module.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/shared/services/onboarding-guard.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/support/support-routing.module.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/support/support.component.ts' is detected to be 'ts' DEBUG: Language of file 'src/app/support/support.module.ts' is detected to be 'ts' DEBUG: Language of file 'src/hmr.ts' is detected to be 'ts' DEBUG: Language of file 'src/main.ts' is detected to be 'ts' DEBUG: Language of file 'src/manual_typings/jasmine.d.ts' is detected to be 'ts' DEBUG: Language of file 'src/polyfills.ts' is detected to be 'ts' DEBUG: Language of file 'src/style.ts' is detected to be 'ts' DEBUG: Language of file 'src/typings.d.ts' is detected to be 'ts' DEBUG: Language of file 'src/vendor.dll.ts' is detected to be 'ts' DEBUG: Language of file 'src/vendor.ts' is detected to be 'ts' INFO: 71 files indexed INFO: Quality profile for ts: tslint INFO: The report file /Users/mobility/jenkins/workspace/TIM-Sonar/TIMVision-Sonar-Web-W12-SCSS/reports/sonar/angular-hint.json doesn't exist INFO: The report file /Users/mobility/jenkins/workspace/TIM-Sonar/TIMVision-Sonar-Web-W12-SCSS/reports/sonar/eslint.json doesn't exist INFO: The report file /Users/mobility/jenkins/workspace/TIM-Sonar/TIMVision-Sonar-Web-W12-SCSS/reports/sonar/js-it.xml doesn't exist INFO: The report file /Users/mobility/jenkins/workspace/TIM-Sonar/TIMVision-Sonar-Web-W12-SCSS/reports/sonar/css-duplication.xml doesn't exist INFO: The report file /Users/mobility/jenkins/workspace/TIM-Sonar/TIMVision-Sonar-Web-W12-SCSS/reports/sonar/js-overall.lcov doesn't exist INFO: The report file /Users/mobility/jenkins/workspace/TIM-Sonar/TIMVision-Sonar-Web-W12-SCSS/reports/sonar/scss-duplication.xml doesn't exist INFO: The report file /Users/mobility/jenkins/workspace/TIM-Sonar/TIMVision-Sonar-Web-W12-SCSS/reports/sonar/ts-duplication.xml doesn't exist INFO: The report file /Users/mobility/jenkins/workspace/TIM-Sonar/TIMVision-Sonar-Web-W12-SCSS/reports/sonar/html-duplication.xml doesn't exist INFO: The report file /Users/mobility/jenkins/workspace/TIM-Sonar/TIMVision-Sonar-Web-W12-SCSS/reports/sonar/scsslint.json doesn't exist INFO: The report file /Users/mobility/jenkins/workspace/TIM-Sonar/TIMVision-Sonar-Web-W12-SCSS/reports/sonar/eslint-angular.json doesn't exist INFO: The report file /Users/mobility/jenkins/workspace/TIM-Sonar/TIMVision-Sonar-Web-W12-SCSS/reports/sonar/js-ut.xml doesn't exist INFO: The report file /Users/mobility/jenkins/workspace/TIM-Sonar/TIMVision-Sonar-Web-W12-SCSS/reports/sonar/ts-ut.xml doesn't exist INFO: The report file /Users/mobility/jenkins/workspace/TIM-Sonar/TIMVision-Sonar-Web-W12-SCSS/reports/sonar/js-it.lcov doesn't exist INFO: The report file /Users/mobility/jenkins/workspace/TIM-Sonar/TIMVision-Sonar-Web-W12-SCSS/reports/sonar/htmlhint.json doesn't exist INFO: The report file /Users/mobility/jenkins/workspace/TIM-Sonar/TIMVision-Sonar-Web-W12-SCSS/reports/sonar/ts-it.lcov doesn't exist INFO: The report file /Users/mobility/jenkins/workspace/TIM-Sonar/TIMVision-Sonar-Web-W12-SCSS/reports/sonar/tslint.json doesn't exist INFO: The report file /Users/mobility/jenkins/workspace/TIM-Sonar/TIMVision-Sonar-Web-W12-SCSS/reports/sonar/js-ut.lcov doesn't exist INFO: The report file /Users/mobility/jenkins/workspace/TIM-Sonar/TIMVision-Sonar-Web-W12-SCSS/reports/sonar/ts-ut.lcov doesn't exist INFO: The report file /Users/mobility/jenkins/workspace/TIM-Sonar/TIMVision-Sonar-Web-W12-SCSS/reports/sonar/js-duplication.xml doesn't exist INFO: The report file /Users/mobility/jenkins/workspace/TIM-Sonar/TIMVision-Sonar-Web-W12-SCSS/reports/sonar/csslint.json doesn't exist INFO: The report file /Users/mobility/jenkins/workspace/TIM-Sonar/TIMVision-Sonar-Web-W12-SCSS/reports/sonar/ts-overall.lcov doesn't exist INFO: The report file /Users/mobility/jenkins/workspace/TIM-Sonar/TIMVision-Sonar-Web-W12-SCSS/reports/sonar/ts-it.xml doesn't exist INFO: The report file /Users/mobility/jenkins/workspace/TIM-Sonar/TIMVision-Sonar-Web-W12-SCSS/reports/sonar/jshint.json doesn't exist DEBUG: Code colorizer, supported languages: jsp,objectivec,swift DEBUG: 'FindBugs Sensor' skipped because there is no related file in current project DEBUG: 'SurefireSensor' skipped because there is no related file in current project DEBUG: 'JaCoCoSensor' skipped because there is no related file in current project DEBUG: 'JaCoCoItSensor' skipped because there is no related file in current project DEBUG: 'JaCoCoOverallSensor' skipped because there is no related file in current project DEBUG: 'JavaSquidSensor' skipped because there is no related file in current project DEBUG: 'PHP sensor' skipped because there is no related file in current project DEBUG: Sensors : Lines Sensor (wrapped) -> NoSonar Sensor (wrapped) -> SCM Sensor (wrapped) -> XmlFileSensor (wrapped) -> Analyzer for "php.ini" files (wrapped) -> Zero Coverage Sensor (wrapped) -> Code Colorizer Sensor (wrapped) -> CPD Block Indexer (wrapped) INFO: Sensor Lines Sensor (wrapped) INFO: Sensor Lines Sensor (wrapped) (done) | time=29ms INFO: Sensor NoSonar Sensor (wrapped) INFO: Sensor NoSonar Sensor (wrapped) (done) | time=0ms INFO: Sensor SCM Sensor (wrapped) INFO: Sensor SCM Sensor (wrapped) (done) | time=33ms INFO: Sensor XmlFileSensor (wrapped) INFO: Sensor XmlFileSensor (wrapped) (done) | time=2ms INFO: Sensor Analyzer for "php.ini" files (wrapped) INFO: Sensor Analyzer for "php.ini" files (wrapped) (done) | time=5ms INFO: Sensor Zero Coverage Sensor (wrapped) INFO: Sensor Zero Coverage Sensor (wrapped) (done) | time=44ms INFO: Sensor Code Colorizer Sensor (wrapped) INFO: Sensor Code Colorizer Sensor (wrapped) (done) | time=6ms INFO: Sensor CPD Block Indexer (wrapped) INFO: DefaultCpdBlockIndexer is used for ts DEBUG: No CpdMapping for language ts INFO: Sensor CPD Block Indexer (wrapped) (done) | time=0ms INFO: Calculating CPD for 0 files INFO: CPD calculation finished INFO: Analysis report generated in 266ms, dir size=97 KB INFO: Analysis reports compressed in 160ms, zip size=81 KB INFO: Analysis report generated in /Users/mobility/jenkins/workspace/TIM-Sonar/TIMVision-Sonar-Web-W12-SCSS/.sonar/batch-report DEBUG: Upload report DEBUG: POST 200 https://dev.accenture.lv/sonar/api/ce/submit?projectKey=TIMVision-Web-W12-TS&projectName=TIMVision-Web-W12-TS | time=54ms INFO: Analysis report uploaded in 57ms INFO: ANALYSIS SUCCESSFUL, you can browse https://dev.accenture.lv/sonar/dashboard/index/TIMVision-Web-W12-TS INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report INFO: More about the report processing at https://dev.accenture.lv/sonar/api/ce/task?id=AVn00y0nPQSwemks1qHT DEBUG: Report metadata written to /Users/mobility/jenkins/workspace/TIM-Sonar/TIMVision-Sonar-Web-W12-SCSS/.sonar/report-task.txt DEBUG: Post-jobs : INFO: ------------------------------------------------------------------------ INFO: EXECUTION SUCCESS INFO: ------------------------------------------------------------------------ INFO: Total time: 6.211s INFO: Final Memory: 44M/223M INFO: ------------------------------------------------------------------------ DEBUG: Execution getVersion DEBUG: Execution stop AMAC07G2R1HDJD0:TIMVision-Sonar-Web-W12-SCSS mobility$

DmitryMihailov commented 7 years ago

Excuse me, figure out that tslint.json was looking for a custom rules, which were in the folder which doesn't exist.