Skip to content
This repository has been archived by the owner on Jul 8, 2019. It is now read-only.

Rule violations not appearing basic-setup project changed MyApp.js #162

Open
gvijay4321 opened this issue Jul 13, 2017 · 2 comments
Open

Comments

@gvijay4321
Copy link

export module MyApp {
/*
Contains a couple of methods that our test class will call, and
some awful code that will cause tslint to flag a couple of basic
issues
*/
export class MyStringUtils {
constructor(public dummy1: string, public dummy2: string) {
}

    **public areStringsEqual(s1: string, s2: string) {
        if (s1 == s2) {
            return true;
        }
        else
            return false;
    }**
}

/*
    Contains a method that none of the test code hits, and
    that tslint will flag another couple of issues on
*/
export class MyUncoveredClass {
    public justReturn42(param1:string,param2: number) {
        return 42;
    }

}

}

c:\sonar\SonarTsPlugin-master\samples\basic-setup>c:\sonar\sonar-scanner-3.0.3.7
78-windows\bin\sonar-scanner.bat -X -e
01:10:10.453 INFO: Option -e/--errors is no longer supported and will be ignored

01:10:10.463 INFO: Scanner configuration file: c:\sonar\sonar-scanner-3.0.3.778-
windows\bin..\conf\sonar-scanner.properties
01:10:10.464 INFO: Project root configuration file: c:\sonar\SonarTsPlugin-maste
r\samples\basic-setup\sonar-project.properties
01:10:10.481 INFO: SonarQube Scanner 3.0.3.778
01:10:10.481 INFO: Java 1.8.0_121 Oracle Corporation (64-bit)
01:10:10.481 INFO: Windows 7 6.1 amd64
01:10:10.593 DEBUG: keyStore is :
01:10:10.593 DEBUG: keyStore type is : jks
01:10:10.593 DEBUG: keyStore provider is :
01:10:10.593 DEBUG: init keystore
01:10:10.593 DEBUG: init keymanager of type SunX509
01:10:11.704 INFO: User cache: C:\Users\vgopalakrishnan.sonar\cache
01:10:11.705 DEBUG: Extract sonar-scanner-api-batch in temp...
01:10:11.709 DEBUG: Get bootstrap index...
01:10:11.710 DEBUG: Download: http://localhost:9000/batch/index
01:10:11.752 DEBUG: Get bootstrap completed
01:10:11.752 DEBUG: Create isolated classloader...
01:10:11.760 DEBUG: Start temp cleaning...
01:10:11.771 DEBUG: Temp cleaning done
01:10:11.772 DEBUG: Execution getVersion
01:10:11.777 DEBUG: Execution start
01:10:12.482 DEBUG: Publish global mode
01:10:12.576 INFO: Load global settings
01:10:12.612 DEBUG: GET 200 http://localhost:9000/api/settings/values.protobuf |
time=30ms
01:10:12.626 INFO: Load global settings (done) | time=51ms
01:10:12.634 INFO: User cache: C:\Users\vgopalakrishnan.sonar\cache
01:10:12.834 INFO: Load plugins index
01:10:12.838 DEBUG: GET 200 http://localhost:9000/deploy/plugins/index.txt | tim
e=4ms
01:10:12.842 INFO: Load plugins index (done) | time=8ms
01:10:12.844 DEBUG: Load plugins
01:10:12.852 DEBUG: Load plugins (done) | time=9ms
01:10:12.864 DEBUG: API compatibility mode is enabled on plugin SVN [scmsvn] (bu
ilt with API lower than 5.2)
01:10:12.866 DEBUG: API compatibility mode is enabled on plugin Git [scmgit] (bu
ilt with API lower than 5.2)
01:10:12.946 DEBUG: Plugins:
01:10:12.947 DEBUG: * TypeScript 1.1.0 (typescript)
01:10:12.947 DEBUG: * SVN 1.4.0.522 (scmsvn)
01:10:12.949 DEBUG: * Git 1.2 (scmgit)
01:10:12.966 DEBUG: Execution getVersion
01:10:12.967 INFO: SonarQube server 6.4.0
01:10:12.967 INFO: Default locale: "en_US", source code encoding: "windows-1252"
(analysis is platform dependent)
01:10:12.970 DEBUG: Work directory: c:\sonar\SonarTsPlugin-master\samples\basic-
setup.scannerwork
01:10:12.974 DEBUG: Execution getVersion
01:10:12.975 DEBUG: Execution execute
01:10:13.107 INFO: Process project properties
01:10:13.109 DEBUG: Process project properties (done) | time=2ms
01:10:13.251 INFO: Load project repositories
01:10:13.278 DEBUG: GET 200 http://localhost:9000/batch/project.protobuf?key=vsc
ode | time=26ms
01:10:13.328 INFO: Load project repositories (done) | time=77ms
01:10:13.401 DEBUG: Available languages:
01:10:13.401 DEBUG: * TypeScript => "ts"
01:10:13.406 INFO: Load quality profiles
01:10:13.423 DEBUG: GET 200 http://localhost:9000/api/qualityprofiles/search.pro
tobuf?projectKey=vscode | time=16ms
01:10:13.431 INFO: Load quality profiles (done) | time=25ms
01:10:13.436 INFO: Load active rules
01:10:13.479 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=re
po,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activatio
n=true&qprofile=AV04ZUbzbJJpn5qRp8fC&p=1&ps=500 | time=43ms
01:10:13.516 INFO: Load active rules (done) | time=80ms
01:10:13.517 INFO: Load metrics repository
01:10:13.530 DEBUG: GET 200 http://localhost:9000/api/metrics/search?f=name,desc
ription,direction,qualitative,custom&ps=500&p=1 | time=12ms
01:10:13.571 INFO: Load metrics repository (done) | time=54ms
01:10:13.608 WARN: SCM provider autodetection failed. No SCM provider claims to
support this project. Please use sonar.scm.provider to define SCM of your projec
t.
01:10:13.609 INFO: Publish mode
01:10:13.610 INFO: Project key: vscode
01:10:13.611 DEBUG: Start recursive analysis of project modules
01:10:13.615 INFO: ------------- Scan Microsoft Visual Studio Code
01:10:13.675 INFO: Load server rules
01:10:13.684 DEBUG: GET 200 http://localhost:9000/api/rules/list.protobuf | time
=9ms
01:10:13.688 INFO: Load server rules (done) | time=13ms
01:10:13.704 DEBUG: Declared extensions of language TypeScript were converted to
sonar.lang.patterns.ts : /*.ts,/.tsx
01:10:13.720 DEBUG: Initializers : GenericCoverageSensor
01:10:13.721 INFO: Initializer GenericCoverageSensor
01:10:13.721 INFO: Initializer GenericCoverageSensor (done) | time=0ms
01:10:13.722 INFO: Base dir: C:\sonar\SonarTsPlugin-master\samples\basic-setup
01:10:13.723 INFO: Working dir: c:\sonar\SonarTsPlugin-master\samples\basic-setu
p.scannerwork
01:10:13.727 INFO: Source paths: src
01:10:13.727 INFO: Source encoding: windows-1252, default locale: en_US
01:10:13.729 INFO: Index files
01:10:13.731 INFO: Excluded sources:
01:10:13.732 INFO: /test//

01:10:13.734 INFO: **/*.d.ts
01:10:13.743 DEBUG: 'src/MyApp.ts' indexed with language 'ts'
01:10:13.743 INFO: 1 file indexed
01:10:13.744 INFO: 0 files ignored because of inclusion/exclusion patterns
01:10:13.746 INFO: Quality profile for ts: tslint
01:10:13.750 DEBUG: 'Generic Coverage Report' skipped because one of the require
d properties is missing
01:10:13.750 DEBUG: 'Generic Test Executions Report' skipped because one of the
required properties is missing
01:10:13.759 DEBUG: 'Generic Coverage Report' skipped because one of the require
d properties is missing
01:10:13.761 DEBUG: 'Generic Test Executions Report' skipped because one of the
required properties is missing
01:10:13.768 DEBUG: Sensors : Linting sensor for TypeScript files -> Combined LC
OV and LOC sensor -> Zero Coverage Sensor -> CPD Block Indexer
01:10:13.769 INFO: Sensor Linting sensor for TypeScript files [typescript]
01:10:13.771 DEBUG: Found sonar.ts.tslint.path path to be 'C:\Users\vgopalakrish
nan\AppData\Roaming\npm\node_modules\tslint'
01:10:13.773 DEBUG: Found sonar.ts.tslint.configPath path to be 'tslint.json'
01:10:13.774 DEBUG: Path sonar.ts.tslint.rulesDir not specified, falling back to
null
01:10:13.776 DEBUG: Path sonar.ts.tslint.projectPath not specified, falling back
to null
01:10:13.778 DEBUG: Path sonar.ts.tslint.outputPath not specified, falling back
to null
01:10:13.783 DEBUG: Using a temporary path for TsLint output: c:\sonar\SonarTsPl
ugin-master\samples\basic-setup.scannerwork.sonartmp\949764129277771393.tmp
01:10:13.785 DEBUG: Split 1 files into 1 batches for processing
01:10:13.785 DEBUG: Executing TsLint with command: node C:\Users\vgopalakrishnan
\AppData\Roaming\npm\node_modules\tslint --format json --out c:\sonar\SonarTsPlu
gin-master\samples\basic-setup.scannerwork.sonartmp\949764129277771393.tmp --c
onfig C:\sonar\SonarTsPlugin-master\samples\basic-setup\tslint.json c:/sonar/Son
arTsPlugin-master/samples/basic-setup/src/MyApp.ts
01:10:14.308 INFO: Sensor Linting sensor for TypeScript files [typescript] (done
) | time=539ms
01:10:14.309 INFO: Sensor Combined LCOV and LOC sensor [typescript]
01:10:14.322 INFO: Sensor Combined LCOV and LOC sensor [typescript] (done) | tim
e=12ms
01:10:14.322 INFO: Sensor Zero Coverage Sensor
01:10:14.332 INFO: Sensor Zero Coverage Sensor (done) | time=10ms
01:10:14.332 INFO: Sensor CPD Block Indexer
01:10:14.333 DEBUG: org.sonar.scanner.cpd.deprecated.DefaultCpdBlockIndexer is u
sed for ts
01:10:14.335 DEBUG: No CpdMapping for language ts
01:10:14.336 INFO: Sensor CPD Block Indexer (done) | time=4ms
01:10:14.337 INFO: No SCM system was detected. You can use the 'sonar.scm.provid
er' property to explicitly specify it.
01:10:14.340 INFO: Calculating CPD for 0 files
01:10:14.342 INFO: CPD calculation finished
01:10:14.389 DEBUG: 'src/MyApp.ts' generated metadata with charset 'windows-125
2'
01:10:14.415 INFO: Analysis report generated in 73ms, dir size=13 KB
01:10:14.428 INFO: Analysis reports compressed in 12ms, zip size=5 KB
01:10:14.428 INFO: Analysis report generated in c:\sonar\SonarTsPlugin-master\sa
mples\basic-setup.scannerwork\batch-report
01:10:14.430 DEBUG: Upload report
01:10:14.451 DEBUG: POST 200 http://localhost:9000/api/ce/submit?projectKey=vsco
de&projectName=Microsoft%20Visual%20Studio%20Code | time=17ms
01:10:14.453 INFO: Analysis report uploaded in 22ms
01:10:14.454 INFO: ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/das
hboard/index/vscode
01:10:14.455 INFO: Note that you will be able to access the updated dashboard on
ce the server has processed the submitted analysis report
01:10:14.457 INFO: More about the report processing at http://localhost:9000/api
/ce/task?id=AV09d0rvo4EZC8B5V8RY
01:10:14.462 DEBUG: Report metadata written to c:\sonar\SonarTsPlugin-master\sam
ples\basic-setup.scannerwork\report-task.txt
01:10:14.469 DEBUG: Post-jobs :
01:10:14.474 INFO: Task total time: 1.493 s
01:10:14.474 INFO: -------------------------------------------------------------

01:10:14.476 INFO: EXECUTION SUCCESS
01:10:14.477 INFO: -------------------------------------------------------------

01:10:14.480 INFO: Total time: 4.023s
01:10:14.556 INFO: Final Memory: 44M/216M
01:10:14.557 INFO: -------------------------------------------------------------

01:10:14.559 DEBUG: Execution getVersion
01:10:14.561 DEBUG: Execution stop

c:\sonar\SonarTsPlugin-master\samples\basic-setup>

@Nikhilkapoor20
Copy link

i am getting this error for each ts lint file ,please update
19:25:09.115 INFO: CLI cmd /C call node "C:\Users\nikhil.kapoor.IND-DEL\AppData\Roaming\npm\node_modules\tslint\bin\tslint" --config "D:\intershop\icp_admin_07_21\icp_admin_architecture_refactor\icp_admin.scannerwork\tslint.json" --format json -f "D:\intershop\icp_admin_07_21\icp_admin_architecture_refactor\icp_admin\src\app\theme\services\index.ts"
19:25:09.137 DEBUG: Got
19:25:09.137 INFO: TsLint executing for D:\intershop\icp_admin_07_21\icp_admin_architecture_refactor\icp_admin\src\app\theme\services\userService\user.mock-service.ts
19:25:09.552 ERROR: TsLint Err:
19:25:09.552 ERROR: TsLint Err: error: unknown option `-f'
19:25:09.567 ERROR: TsLint Err:
19:25:09.573 INFO: Exit code 1

@Pablissimo
Copy link
Owner

Pablissimo commented Aug 6, 2017

What version of tslint are you using? Also what version of the plugin?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants