mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-19 15:31:28 +00:00
tests/stylecheck: make sure necessary hints are enabled (#21240)
This commit is contained in:
@@ -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.}
|
||||
{.hintAsError[Name]:off.}
|
||||
|
||||
@@ -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()
|
||||
hello()
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user