diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2022-09-22 03:04:33 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-21 15:04:33 -0400 |
commit | 70c25c45d61926beca789fda0e57a10cbeef81e3 (patch) | |
tree | 415eead4b0f5c8cb57b099e7d53e533ba90e261f /compiler | |
parent | 4133698f2de09cd4d1c9ff3ef44dd0bb6e31693a (diff) | |
download | Nim-70c25c45d61926beca789fda0e57a10cbeef81e3.tar.gz |
fixes #20397; fixes stylecheck regression (#20398)
* fixes #20397; fixes stylecheck * add testcase
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/linter.nim | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/linter.nim b/compiler/linter.nim index 2c0ad4d6f..0c2aaef79 100644 --- a/compiler/linter.nim +++ b/compiler/linter.nim @@ -93,6 +93,7 @@ proc nep1CheckDefImpl(conf: ConfigRef; info: TLineInfo; s: PSym; k: TSymKind) = template styleCheckDef*(ctx: PContext; info: TLineInfo; sym: PSym; k: TSymKind) = ## Check symbol definitions adhere to NEP1 style rules. if optStyleCheck in ctx.config.options and # ignore if styleChecks are off + {optStyleHint, optStyleError} * ctx.config.globalOptions != {} and # check only if hint/error is enabled hintName in ctx.config.notes and # ignore if name checks are not requested ctx.config.belongsToProjectPackage(ctx.module) and # ignore foreign packages optStyleUsages notin ctx.config.globalOptions and # ignore if requested to only check name usage |