diff options
author | Anna <cyber@sysrq.in> | 2023-03-01 22:00:58 +0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-01 18:00:58 +0100 |
commit | 89d8c0b24678a0b65820692069adffc7bec38ae7 (patch) | |
tree | d61da05c1fbdefa84ae82f4a82527207ae4702d1 | |
parent | 1b1412f3d148b02fb553f37d84505745cf3fb435 (diff) | |
download | Nim-89d8c0b24678a0b65820692069adffc7bec38ae7.tar.gz |
tests/stylecheck: make sure necessary hints are enabled (#21240)
-rw-r--r-- | tests/stylecheck/t20397_1.nim | 4 | ||||
-rw-r--r-- | tests/stylecheck/treject.nim | 4 | ||||
-rw-r--r-- | tests/stylecheck/tusages.nim | 6 |
3 files changed, 6 insertions, 8 deletions
diff --git a/tests/stylecheck/t20397_1.nim b/tests/stylecheck/t20397_1.nim index 24f5791f8..76c03dca1 100644 --- a/tests/stylecheck/t20397_1.nim +++ b/tests/stylecheck/t20397_1.nim @@ -1,8 +1,8 @@ discard """ - matrix: "--styleCheck:off" + matrix: "--styleCheck:off --hint:Name:on" """ {.hintAsError[Name]:on.} var a_b = 1 discard a_b -{.hintAsError[Name]:off.} \ No newline at end of file +{.hintAsError[Name]:off.} diff --git a/tests/stylecheck/treject.nim b/tests/stylecheck/treject.nim index b9d97a58d..458a2d039 100644 --- a/tests/stylecheck/treject.nim +++ b/tests/stylecheck/treject.nim @@ -1,7 +1,7 @@ discard """ action: reject nimout: '''treject.nim(14, 13) Error: 'iD' should be: 'id' [field declared in treject.nim(9, 5)]''' - matrix: "--styleCheck:error --styleCheck:usages" + matrix: "--styleCheck:error --styleCheck:usages --hint:Name:on" """ type @@ -14,4 +14,4 @@ template hello = echo name.iD echo iD -hello() \ No newline at end of file +hello() diff --git a/tests/stylecheck/tusages.nim b/tests/stylecheck/tusages.nim index 2f99c70c5..b689dabb3 100644 --- a/tests/stylecheck/tusages.nim +++ b/tests/stylecheck/tusages.nim @@ -1,11 +1,9 @@ discard """ action: reject - nimout: '''tusages.nim(22, 5) Error: 'BAD_STYLE' should be: 'BADSTYLE' [proc declared in tusages.nim(11, 6)]''' - matrix: "--styleCheck:error --styleCheck:usages" + nimout: '''tusages.nim(20, 5) Error: 'BAD_STYLE' should be: 'BADSTYLE' [proc declared in tusages.nim(9, 6)]''' + matrix: "--styleCheck:error --styleCheck:usages --hint:all:off --hint:Name:on" """ - - import strutils proc BADSTYLE(c: char) = discard |