Skip to content

Commit d2f796f

Browse files
committed
Merge pull request #158 from thomasfanell/master
Fixed false positive in redundant type info rule
2 parents 8a7cea0 + 7d07eec commit d2f796f

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
**Table of Contents**
2+
- [0.1.24-alpha](#0124-alpha)
23
- [0.1.23-alpha](#0123-alpha)
34
- [0.1.22-alpha](#0122-alpha)
45
- [0.1.21-alpha](#0121-alpha)
@@ -22,6 +23,9 @@
2223
- [0.1.3-alpha](#013-alpha)
2324
- [0.1.2-alpha](#012-alpha)
2425

26+
# 0.1.24-alpha
27+
* Fixed a false positive in RedundantTypeInfo rule where it would incorrectly trigger on operator `:=`
28+
2529
# 0.1.23-alpha
2630
* Fixed a false positive in RedundantTypeInfo rule
2731

source/Analyzer/Rules/RedundantTypeInfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module Magic.Analyzer.Rules {
1717
var nextIsType = false;
1818
var idents: string[] = [];
1919
var types: string[] = [];
20-
while (tokens[i].kind != Frontend.TokenKind.SeparatorRightParanthesis) {
20+
while (tokens[i].kind != Frontend.TokenKind.SeparatorRightParanthesis && tokens[i].kind != Frontend.TokenKind.OperatorDeclareAssign) {
2121
if (tokens[i].kind == Frontend.TokenKind.Identifier || tokens[i].kind == Frontend.TokenKind.VarArgs) {
2222
if (nextIsType) {
2323
if (tokens[i + 1].kind == Frontend.TokenKind.OperatorMultiply) {

source/magic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var fs = require("fs");
2323

2424
module Magic {
2525
export class MagicEntry {
26-
private static version = "0.1.23-alpha";
26+
private static version = "0.1.24-alpha";
2727
private arguments: string[];
2828
private sortByLineNumber = false
2929
constructor(command: string[]) {

0 commit comments

Comments
 (0)