Skip to content

Commit 18ae8c1

Browse files
committed
check field metadata before trying pos based suppression check
1 parent 7c43e7f commit 18ae8c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

checkstyle/checks/Check.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ class Check {
4646

4747
function isCheckSuppressed(f:Field):Bool {
4848
if (f == null) return false;
49+
if (hasSuppressWarningsMeta (f.meta)) return true;
4950
return isPosSuppressed (f.pos);
5051
}
5152

5253
function hasSuppressWarningsMeta(m:Metadata):Bool {
5354
if (m == null) return false;
54-
5555
var search = 'checkstyle:${getModuleName ()}';
5656
for (meta in m) {
5757
if (meta.name != "SuppressWarnings") continue;

0 commit comments

Comments
 (0)