fixes #20397; fixes stylecheck regression (#20398)

* fixes  #20397; fixes stylecheck

* add testcase
This commit is contained in:
ringabout 2022-09-22 03:04:33 +08:00 • committed by GitHub
commit 70c25c45d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 0 deletions

View file

@ -0,0 +1,4 @@
{.hintAsError[Name]:on.}
var a_b = 1
discard a_b
{.hintAsError[Name]:off.}

View file

@ -0,0 +1,8 @@
discard """
matrix: "--styleCheck:off"
"""
{.hintAsError[Name]:on.}
var a_b = 1
discard a_b
{.hintAsError[Name]:off.}

View file

@ -0,0 +1,7 @@
discard """
errormsg: "'a_b' should be: 'aB'"
matrix: "--styleCheck:error"
"""
var a_b = 1
discard a_b