1 /* 2 SuppressWithNearbyTextFilter 3 nearbyTextPattern = -@cs\\[(\\w+)\\] (\\w+) 4 checkPattern = $1 5 messagePattern = (default)(null) 6 idPattern = (default)(null) 7 lineRange = (default)0 8 9 com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck 10 ignoreNumbers = (default)-1, 0, 1, 2 11 ignoreHashCodeMethod = (default)false 12 ignoreAnnotation = (default)false 13 ignoreFieldDeclaration = (default)false 14 ignoreAnnotationElementDefaults = (default)true 15 constantWaiverParentToken = (default)TYPECAST, METHOD_CALL, EXPR, ARRAY_INIT, UNARY_MINUS, \ 16 UNARY_PLUS, ELIST, STAR, ASSIGN, PLUS, MINUS, DIV, LITERAL_NEW 17 tokens = (default)NUM_DOUBLE, NUM_FLOAT, NUM_INT, NUM_LONG 18 19 20 */ 21 22 package com.puppycrawl.tools.checkstyle.filters.suppresswithnearbytextfilter; 23 24 public class InputSuppressWithNearbyTextFilterNearbyTextPatternCompactVariableCheckPattern { 25 // filtered violation below ''42' is a magic number.' 26 int a = 42; // -@cs[MagicNumber] We do not consider this number as magic for some reason. 27 int b = 43; // violation ''43' is a magic number.' 28 }