1 /*xml 2 <module name="Checker"> 3 <module name="SuppressWithNearbyTextFilter"> 4 <property name="nearbyTextPattern" 5 value="@cs-: (\w+) for ([+-]\d+) lines"/> 6 <property name="checkPattern" value="$1"/> 7 <property name="lineRange" value="$2"/> 8 </module> 9 <module name="TreeWalker"> 10 <module name="MagicNumber"/> 11 </module> 12 </module> 13 */ 14 package com.puppycrawl.tools.checkstyle.filters.suppresswithnearbytextfilter; 15 // xdoc section -- start 16 public class Example8 { 17 int a = 42; // @cs-: MagicNumber for +3 lines 18 int b = 43; 19 int c = 44; 20 int d = 45; 21 int e = 46; // violation "'46' is a magic number." 22 } 23 // xdoc section -- end