-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SONARJS-599 Update message of ConstructorFunctionsForSideEffectsCheck
- Loading branch information
1 parent
6faec0d
commit a9c8177
Showing
3 changed files
with
12 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
javascript-checks/src/test/resources/checks/constructorFunctionsForSideEffects.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
export default new MyConstructor(); // OK | ||
var something = new MyConstructor(); // OK | ||
something = new MyConstructor(); // OK | ||
new MyConstructor(); // NOK | ||
new MyConstructor(); // Noncompliant {{Either remove this useless object instantiation of "MyConstructor" or use it}} | ||
callMethod(new MyConstructor()); // OK | ||
new MyConstructor().doSomething(); // OK |