Skip to content

Instantly share code, notes, and snippets.

@romani
Created December 30, 2024 23:32
Show Gist options
  • Select an option

  • Save romani/392a7b70cf56a0513d2a82295a5196bf to your computer and use it in GitHub Desktop.

Select an option

Save romani/392a7b70cf56a0513d2a82295a5196bf to your computer and use it in GitHub Desktop.
Issue 15950 config and java file
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<module name="Checker">
<property name="severity" value="error"/>
<property name="fileExtensions" value="java, properties, xml"/>
<module name="TreeWalker">
<module name="MagicNumber">
<property name="ignoreNumbers" value="-2,-1,0,1,2,100"/>
<property name="ignoreHashCodeMethod" value="true"/>
<property name="ignoreFieldDeclaration" value="true"/>
<property name="severity" value="warning"/>
<property name="id" value="checkstyle:magicnumber"/>
</module>
</module>
</module>
public class Test {
public static final int BIT0 = 1;
public static final int BIT1 = 1 << 1;
public static final int BIT2 = 1 << 2;
public static final int BIT3 = 1 << 3;
public static final int BIT4 = 1 << 4;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment