diff --git a/test/chplcheck/ControlFlowParentheses.chpl b/test/chplcheck/ControlFlowParentheses.chpl index 58466a9d782e..db9ee25dcb93 100644 --- a/test/chplcheck/ControlFlowParentheses.chpl +++ b/test/chplcheck/ControlFlowParentheses.chpl @@ -51,7 +51,7 @@ while(a && do {} while(a && b); -// Not valid syntax, but just in case; should not warn, tuples need their parens. +// Not valid syntax, but just in case; should not warn, tuples need their parens if (1, 2) {} if (1, 2) then writeln("Hello"); while (1, 2) {} diff --git a/test/chplcheck/ControlFlowParentheses.good-fixit b/test/chplcheck/ControlFlowParentheses.good-fixit index 72ad70ea23d6..6689e4ada746 100644 --- a/test/chplcheck/ControlFlowParentheses.good-fixit +++ b/test/chplcheck/ControlFlowParentheses.good-fixit @@ -51,7 +51,7 @@ while(a && do {} while(a && b); -// Not valid syntax, but just in case; should not warn, tuples need their parens. +// Not valid syntax, but just in case; should not warn, tuples need their parens if (1, 2) {} if (1, 2) then writeln("Hello"); while (1, 2) {} diff --git a/test/chplcheck/IncorrectIndentation.chpl b/test/chplcheck/IncorrectIndentation.chpl index 3d16ece7d065..d3390aea3994 100644 --- a/test/chplcheck/IncorrectIndentation.chpl +++ b/test/chplcheck/IncorrectIndentation.chpl @@ -182,8 +182,8 @@ module IncorrectIndentation { writeln("hi"); } - // Note: 'cobegins' with one statement throw warning, so all tests here include - // at least two statements. + // Note: 'cobegins' with one statement throw warning, so all tests here + // include at least two statements. cobegin { @@ -305,7 +305,8 @@ module IncorrectIndentation { proc firstProc() {} proc secondProc() {} } - enum color { red, green, blue }; // semicolon warning does not issue bad indentation + // semicolon warning does not issue bad indentation + enum color { red, green, blue }; // Since locations are incorrectly reported with 'public' and 'private', // these shouldn't warn. @@ -367,7 +368,8 @@ if 1 < 2 { writeln("??"); } } - // since else statements aren't reported correctly only the misaligned child statements should warn + // since else statements aren't reported correctly only the misaligned child + // statements should warn if 1 < 2 { writeln("hi"); writeln("??"); diff --git a/test/chplcheck/IncorrectIndentation.good b/test/chplcheck/IncorrectIndentation.good index 8adc50490e8f..557bb9589079 100644 --- a/test/chplcheck/IncorrectIndentation.good +++ b/test/chplcheck/IncorrectIndentation.good @@ -68,16 +68,16 @@ IncorrectIndentation.chpl:286: node violates rule IncorrectIndentation IncorrectIndentation.chpl:292: node violates rule IncorrectIndentation IncorrectIndentation.chpl:299: node violates rule IncorrectIndentation IncorrectIndentation.chpl:305: node violates rule IncorrectIndentation -IncorrectIndentation.chpl:308: node violates rule EmptyStmts -IncorrectIndentation.chpl:314: node violates rule IncorrectIndentation -IncorrectIndentation.chpl:321: node violates rule IncorrectIndentation -IncorrectIndentation.chpl:339: node violates rule IncorrectIndentation -IncorrectIndentation.chpl:349: node violates rule IncorrectIndentation -IncorrectIndentation.chpl:353: node violates rule IncorrectIndentation -IncorrectIndentation.chpl:358: node violates rule IncorrectIndentation -IncorrectIndentation.chpl:363: node violates rule IncorrectIndentation -IncorrectIndentation.chpl:373: node violates rule IncorrectIndentation -IncorrectIndentation.chpl:376: node violates rule IncorrectIndentation -IncorrectIndentation.chpl:379: node violates rule IncorrectIndentation -IncorrectIndentation.chpl:382: node violates rule IncorrectIndentation +IncorrectIndentation.chpl:309: node violates rule EmptyStmts +IncorrectIndentation.chpl:315: node violates rule IncorrectIndentation +IncorrectIndentation.chpl:322: node violates rule IncorrectIndentation +IncorrectIndentation.chpl:340: node violates rule IncorrectIndentation +IncorrectIndentation.chpl:350: node violates rule IncorrectIndentation +IncorrectIndentation.chpl:354: node violates rule IncorrectIndentation +IncorrectIndentation.chpl:359: node violates rule IncorrectIndentation +IncorrectIndentation.chpl:364: node violates rule IncorrectIndentation +IncorrectIndentation.chpl:375: node violates rule IncorrectIndentation +IncorrectIndentation.chpl:378: node violates rule IncorrectIndentation +IncorrectIndentation.chpl:381: node violates rule IncorrectIndentation +IncorrectIndentation.chpl:384: node violates rule IncorrectIndentation [Success matching fixit for IncorrectIndentation] diff --git a/test/chplcheck/IncorrectIndentation.good-fixit b/test/chplcheck/IncorrectIndentation.good-fixit index a15ca2d590da..7839865dd569 100644 --- a/test/chplcheck/IncorrectIndentation.good-fixit +++ b/test/chplcheck/IncorrectIndentation.good-fixit @@ -193,8 +193,8 @@ module IncorrectIndentation { writeln("hi"); } - // Note: 'cobegins' with one statement throw warning, so all tests here include - // at least two statements. + // Note: 'cobegins' with one statement throw warning, so all tests here + // include at least two statements. cobegin { @@ -322,7 +322,8 @@ module IncorrectIndentation { proc firstProc() {} proc secondProc() {} } - enum color { red, green, blue } // semicolon warning does not issue bad indentation + // semicolon warning does not issue bad indentation + enum color { red, green, blue } // Since locations are incorrectly reported with 'public' and 'private', // these shouldn't warn. @@ -386,7 +387,8 @@ if 1 < 2 { writeln("??"); } } - // since else statements aren't reported correctly only the misaligned child statements should warn + // since else statements aren't reported correctly only the misaligned child + // statements should warn if 1 < 2 { writeln("hi"); writeln("??"); diff --git a/test/chplcheck/Unused.chpl b/test/chplcheck/Unused.chpl index c399432cfa29..fb5bcc915783 100644 --- a/test/chplcheck/Unused.chpl +++ b/test/chplcheck/Unused.chpl @@ -15,7 +15,7 @@ module Unused { } } - // test with unrelated attribute; previously this (wrongly) silenced warnigns + // test with unrelated attribute; should do nothing @chplcheck.ignore("UnusedFormal") for i in 1..10 {} diff --git a/test/chplcheck/UnusedTupleUnpack.chpl b/test/chplcheck/UnusedTupleUnpack.chpl index ad7e2b5e7d69..315a79a6a180 100644 --- a/test/chplcheck/UnusedTupleUnpack.chpl +++ b/test/chplcheck/UnusedTupleUnpack.chpl @@ -1,6 +1,12 @@ foreach (i, _) in zip(1..10, 1..10) { i; } foreach (_, j) in zip(1..10, 1..10) { j; } foreach (_, _) in zip(1..10, 1..10) {} -foreach (i, (_, _)) in zip(1..10, foreach pair in zip(1..10, 1..10) do pair) { i; } -foreach (_, (_, _)) in zip(1..10, foreach pair in zip(1..10, 1..10) do pair) { i; } -foreach ((_, _), _) in zip(foreach pair in zip(1..10, 1..10) do pair, 1..10) { i; } +foreach (i, (_, _)) in zip(1..10, foreach pair in zip(1..10, 1..10) do pair) { + i; +} +foreach (_, (_, _)) in zip(1..10, foreach pair in zip(1..10, 1..10) do pair) { + i; +} +foreach ((_, _), _) in zip(foreach pair in zip(1..10, 1..10) do pair, 1..10) { + i; +} diff --git a/test/chplcheck/UnusedTupleUnpack.good b/test/chplcheck/UnusedTupleUnpack.good index 64d6ca78d559..5e024ca19eac 100644 --- a/test/chplcheck/UnusedTupleUnpack.good +++ b/test/chplcheck/UnusedTupleUnpack.good @@ -1,8 +1,8 @@ UnusedTupleUnpack.chpl:1: node violates rule UseExplicitModules UnusedTupleUnpack.chpl:3: node violates rule UnusedTupleUnpack UnusedTupleUnpack.chpl:4: node violates rule UnusedTupleUnpack -UnusedTupleUnpack.chpl:5: node violates rule UnusedTupleUnpack -UnusedTupleUnpack.chpl:5: node violates rule UnusedTupleUnpack -UnusedTupleUnpack.chpl:6: node violates rule UnusedTupleUnpack -UnusedTupleUnpack.chpl:6: node violates rule UnusedTupleUnpack +UnusedTupleUnpack.chpl:7: node violates rule UnusedTupleUnpack +UnusedTupleUnpack.chpl:7: node violates rule UnusedTupleUnpack +UnusedTupleUnpack.chpl:10: node violates rule UnusedTupleUnpack +UnusedTupleUnpack.chpl:10: node violates rule UnusedTupleUnpack [Success matching fixit for UnusedTupleUnpack] diff --git a/test/chplcheck/UnusedTupleUnpack.good-fixit b/test/chplcheck/UnusedTupleUnpack.good-fixit index 7c07cafa03a6..28a496db668e 100644 --- a/test/chplcheck/UnusedTupleUnpack.good-fixit +++ b/test/chplcheck/UnusedTupleUnpack.good-fixit @@ -1,6 +1,12 @@ foreach (i, _) in zip(1..10, 1..10) { i; } foreach (_, j) in zip(1..10, 1..10) { j; } foreach zip(1..10, 1..10) {} -foreach (i, _) in zip(1..10, foreach pair in zip(1..10, 1..10) do pair) { i; } -foreach (_, _) in zip(1..10, foreach pair in zip(1..10, 1..10) do pair) { i; } -foreach (_, _) in zip(foreach pair in zip(1..10, 1..10) do pair, 1..10) { i; } +foreach (i, _) in zip(1..10, foreach pair in zip(1..10, 1..10) do pair) { + i; +} +foreach (_, _) in zip(1..10, foreach pair in zip(1..10, 1..10) do pair) { + i; +} +foreach (_, _) in zip(foreach pair in zip(1..10, 1..10) do pair, 1..10) { + i; +}