Skip to content
This repository has been archived by the owner on Apr 27, 2021. It is now read-only.

FP no-commented-code: "tslint:disable" comments #821

Open
xxluke opened this issue Jan 22, 2019 · 3 comments
Open

FP no-commented-code: "tslint:disable" comments #821

xxluke opened this issue Jan 22, 2019 · 3 comments

Comments

@xxluke
Copy link

xxluke commented Jan 22, 2019

I want to report a bug.

grafik

TSLint version: 5.12.1
TSLint-SonarTS version: 1.9.0

Reproducer

// tslint:disable:no-identical-functions
// tslint:disable:no-duplicate-string

The no-commented-code TSLint rule thinks this is commented code.

This seems to be an issue of the TSLint rule only and not the normal Sonar rule.

@vilchik-elena
Copy link
Contributor

@xxluke thanks for reporting that! Good catch

@vilchik-elena vilchik-elena changed the title TSLint "no-commented-code" when multiple "tslint:disable" FP no-commented-code: "tslint:disable" comments Feb 1, 2019
@gabsprates
Copy link

Same problem here. Any news?

@xxluke
Copy link
Author

xxluke commented Aug 19, 2019

Workarounds are to add an empty line between the comments

// tslint:disable:no-identical-functions

// tslint:disable:no-duplicate-string

or to disable both rules in one line

// tslint:disable:no-identical-functions no-duplicate-string

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

No branches or pull requests

3 participants