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

Replace implementation of S4136 with 'consecutive-overloads' rule in sonarts #643

Merged
merged 1 commit into from
May 18, 2018

Conversation

saberduck
Copy link
Contributor

Fixes #469

@ghost ghost assigned saberduck May 16, 2018
@ghost ghost added the in progress label May 16, 2018
@saberduck saberduck force-pushed the issue-469 branch 2 times, most recently from 09d77cf to 979a7e6 Compare May 16, 2018 15:22
Copy link
Contributor

@vilchik-elena vilchik-elena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of minor comments

options: null,
rspecKey: "RSPEC-4136",
type: "functionality",
typescriptOnly: false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@saberduck true

optionsDescription: "",
options: null,
rspecKey: "RSPEC-4136",
type: "functionality",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@saberduck maintanability

@@ -233,3 +233,7 @@ export function isVariableStatement(node: ts.Node): node is ts.VariableStatement
export function isUnionOrIntersectionTypeNode(node: ts.Node): node is ts.UnionOrIntersectionTypeNode {
return is(node, ts.SyntaxKind.UnionType, ts.SyntaxKind.IntersectionType);
}

export function isSignatureDeclaration(node: ts.Node): node is ts.SignatureDeclaration {
return "parameters" in node;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@saberduck hm, is it reliable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the original implementation was something equivalent, they use this https://github.com/ajafff/tsutils/blob/master/typeguard/node.ts#L579

@saberduck saberduck merged commit 1a622bd into master May 18, 2018
@saberduck saberduck deleted the issue-469 branch May 18, 2018 12:24
@ghost ghost removed the review label May 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants