Ueb01 Checkstyle
This commit is contained in:
parent
e84d1ad460
commit
5f6312555d
16
boulder-dash/.idea/checkstyle-idea.xml
generated
Normal file
16
boulder-dash/.idea/checkstyle-idea.xml
generated
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CheckStyle-IDEA" serialisationVersion="2">
|
||||
<checkstyleVersion>10.18.2</checkstyleVersion>
|
||||
<scanScope>JavaOnly</scanScope>
|
||||
<option name="thirdPartyClasspath" />
|
||||
<option name="activeLocationIds" />
|
||||
<option name="locations">
|
||||
<list>
|
||||
<ConfigurationLocation id="bundled-sun-checks" type="BUNDLED" scope="All" description="Sun Checks">(bundled)</ConfigurationLocation>
|
||||
<ConfigurationLocation id="bundled-google-checks" type="BUNDLED" scope="All" description="Google Checks">(bundled)</ConfigurationLocation>
|
||||
<ConfigurationLocation id="5232a701-ef57-4b8f-b1df-ed9fcf2cc548" type="LOCAL_FILE" scope="All" description="Ueb 01 Checkstyle">$PROJECT_DIR$/ueb01_checkstyle_config.xml</ConfigurationLocation>
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
@ -327,7 +327,11 @@ public class LevelSaveHelper {
|
||||
groupValue = curGridElement.getGroupName();
|
||||
nameValue = curGridElement.getSpriteName();
|
||||
stateValue = curGridElement.getStateValue();
|
||||
convertibleValue = curGridElement.isConvertible() ? "1" : "0";
|
||||
if (curGridElement.isConvertible()) {
|
||||
convertibleValue = "1";
|
||||
} else {
|
||||
convertibleValue = "0";
|
||||
}
|
||||
|
||||
// Create sprite XML element
|
||||
Element gridLineItemSpriteElement = document.createElement("sprite");
|
||||
@ -337,7 +341,7 @@ public class LevelSaveHelper {
|
||||
gridLineItemSpriteElement.setAttribute("name", nameValue);
|
||||
gridLineItemSpriteElement.setAttribute("state", stateValue);
|
||||
|
||||
if(convertibleValue == "1") {
|
||||
if("1".equals(convertibleValue)) {
|
||||
gridLineItemSpriteElement.setAttribute("convertible", convertibleValue);
|
||||
}
|
||||
|
||||
|
33
boulder-dash/ueb01_checkstyle_config.xml
Normal file
33
boulder-dash/ueb01_checkstyle_config.xml
Normal file
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
|
||||
|
||||
<module name="Checker">
|
||||
<property name="severity" value="error"/>
|
||||
<module name="TreeWalker">
|
||||
<module name="NeedBraces">
|
||||
<property name="tokens" value="LITERAL_DO,LITERAL_ELSE,LITERAL_FOR,LITERAL_IF,LITERAL_WHILE"/>
|
||||
</module>
|
||||
<module name="AvoidInlineConditionals"/>
|
||||
<module name="DeclarationOrder"/>
|
||||
<module name="ReturnCount"/>
|
||||
<module name="NestedTryDepth"/>
|
||||
<module name="SimplifyBooleanExpression"/>
|
||||
<module name="HiddenField">
|
||||
<property name="tokens" value="VARIABLE_DEF"/>
|
||||
</module>
|
||||
<module name="AbbreviationAsWordInName">
|
||||
<property name="ignoreStaticFinal" value="true"/>
|
||||
<property name="ignoreFinal" value="false"/>
|
||||
<property name="allowedAbbreviationLength" value="3"/>
|
||||
<property name="tokens"
|
||||
value="VARIABLE_DEF"/>
|
||||
</module>
|
||||
<module name="VisibilityModifier"/>
|
||||
<module name="StringLiteralEquality">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
<module name="EqualsAvoidNull">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
</module>
|
||||
</module>
|
Loading…
x
Reference in New Issue
Block a user