From 7e5fe9f7bbb443d811ab7b186a3c871fc7adf04d Mon Sep 17 00:00:00 2001 From: jk-5 Date: Sun, 4 May 2014 18:16:45 +0200 Subject: [PATCH] Fix checkstyle --- build.gradle | 2 +- .../core/recipes/AssemblyRecipeManager.java | 3 +- guidelines/buildcraft.checkstyle | 156 +++++++++--------- 3 files changed, 85 insertions(+), 76 deletions(-) diff --git a/build.gradle b/build.gradle index be3099e0..8a42eae5 100755 --- a/build.gradle +++ b/build.gradle @@ -115,7 +115,7 @@ jar { from sourceSets.api.output } -tasks.withType(Checkstyle).all { +checkstyle { configFile = file('guidelines/buildcraft.checkstyle') } diff --git a/common/buildcraft/core/recipes/AssemblyRecipeManager.java b/common/buildcraft/core/recipes/AssemblyRecipeManager.java index ae7b88b1..39e1d90b 100644 --- a/common/buildcraft/core/recipes/AssemblyRecipeManager.java +++ b/common/buildcraft/core/recipes/AssemblyRecipeManager.java @@ -121,8 +121,9 @@ public class AssemblyRecipeManager implements IAssemblyRecipeManager { int found = 0; // Amount of ingredient found in inventory // TODO: this i++ is highly dubious here, and against good // programming practises. Investigate and fix or document. + //CHECKSTYLE.OFF: ModifiedControlVariable int expected = (Integer) processedInput[i++ + 1]; - + //CHECKSTYLE.ON: ModifiedControlVariable for (IInvSlot slot : InventoryIterator.getIterable(inv, ForgeDirection.UNKNOWN)) { ItemStack item = slot.getStackInSlot(); if (item == null) { diff --git a/guidelines/buildcraft.checkstyle b/guidelines/buildcraft.checkstyle index d253f077..dd2a1bc8 100755 --- a/guidelines/buildcraft.checkstyle +++ b/guidelines/buildcraft.checkstyle @@ -1,79 +1,87 @@ - - - + + + +--> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +--> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +