New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes coremod #3038

Merged
merged 1 commit into from Aug 17, 2017

Conversation

Projects
None yet
2 participants
@yueh
Member

yueh commented Aug 17, 2017

From now on every integration must not rely on method stripping through
a coremod or @optional. Notable example for a very good solution is IC2.

As consequence this drops all support for RF and mods must support on of
our supported energy types. At the time of writing, ForgeEnergy and
IC2/EU.

Removes coremod
From now on every integration must not rely on method stripping through
a coremod or @optional. Notable example for a very good solution is IC2.

As consequence this drops all support for RF and mods must support on of
our supported energy types. At the time of writing, ForgeEnergy and
IC2/EU.
this.setInternalCurrentPower( this.getInternalCurrentPower() + amt );
if( this.getInternalCurrentPower() > this.getInternalMaxPower() )
{
amt = this.getInternalCurrentPower() - this.getInternalMaxPower();

This comment has been minimized.

@orod-org

orod-org Aug 17, 2017

MINOR Introduce a new variable instead of reusing the parameter "amt". rule

@orod-org

orod-org Aug 17, 2017

MINOR Introduce a new variable instead of reusing the parameter "amt". rule

}
@TileEvent( TileEventType.WORLD_NBT_WRITE )
public void writeToNBT_AERootPoweredTile( final NBTTagCompound data )

This comment has been minimized.

@orod-org

orod-org Aug 17, 2017

MINOR Rename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'. rule

@orod-org

orod-org Aug 17, 2017

MINOR Rename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'. rule

return PowerUnits.AE.convertTo( externalUnit, Math.max( 0.0, this.getFunnelPowerDemand( externalUnit.convertTo( PowerUnits.AE, maxPowerRequired ) ) ) );
}
protected double getFunnelPowerDemand( final double maxRequired )

This comment has been minimized.

@orod-org

orod-org Aug 17, 2017

MAJOR Remove this unused method parameter "maxRequired". rule

@orod-org

orod-org Aug 17, 2017

MAJOR Remove this unused method parameter "maxRequired". rule

return amt;
}
amt = this.getInternalCurrentPower();

This comment has been minimized.

@orod-org

orod-org Aug 17, 2017

MINOR Introduce a new variable instead of reusing the parameter "amt". rule

@orod-org

orod-org Aug 17, 2017

MINOR Introduce a new variable instead of reusing the parameter "amt". rule

}
else if( capability == Capabilities.TESLA_CONSUMER )
{
if( this.getPowerSides().contains( facing ) )

This comment has been minimized.

@orod-org

orod-org Aug 17, 2017

MAJOR Merge this if statement with the enclosing one. rule

@orod-org

orod-org Aug 17, 2017

MAJOR Merge this if statement with the enclosing one. rule

}
@TileEvent( TileEventType.WORLD_NBT_READ )
public void readFromNBT_AERootPoweredTile( final NBTTagCompound data )

This comment has been minimized.

@orod-org

orod-org Aug 17, 2017

MINOR Rename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'. rule

@orod-org

orod-org Aug 17, 2017

MINOR Rename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'. rule

}
}
protected void PowerEvent( final PowerEventType x )

This comment has been minimized.

@orod-org

orod-org Aug 17, 2017

MINOR Rename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'. rule

@orod-org

orod-org Aug 17, 2017

MINOR Rename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'. rule

}
else if( capability == Capabilities.TESLA_CONSUMER )
{
if( this.getPowerSides().contains( facing ) )

This comment has been minimized.

@orod-org

orod-org Aug 17, 2017

MAJOR Merge this if statement with the enclosing one. rule

@orod-org

orod-org Aug 17, 2017

MAJOR Merge this if statement with the enclosing one. rule

@Override
public boolean hasCapability( Capability<?> capability, EnumFacing facing )
{
if( capability == Capabilities.FORGE_ENERGY )

This comment has been minimized.

@orod-org

orod-org Aug 17, 2017

MAJOR Remove this conditional structure or edit its code blocks so that they're not all the same. rule

@orod-org

orod-org Aug 17, 2017

MAJOR Remove this conditional structure or edit its code blocks so that they're not all the same. rule

this.addNewAttunement( "thermalfoundation", TunnelType.RF_POWER );
this.addNewAttunement( "thermaldynamics", TunnelType.FE_POWER );
this.addNewAttunement( "thermalexpansion", TunnelType.FE_POWER );
this.addNewAttunement( "thermalfoundation", TunnelType.FE_POWER );
// TODO: Remove when confirmed that the official 1.12 version of EnderIO will support FE.

This comment has been minimized.

@orod-org

orod-org Aug 17, 2017

INFO Complete the task associated to this TODO comment. rule

@orod-org

orod-org Aug 17, 2017

INFO Complete the task associated to this TODO comment. rule

// fluxduct
this.addNewAttunement( this.getModItem( "thermaldynamics", "duct_0", 5 ), TunnelType.RF_POWER ); // cryo-stabilized
// fluxduct
this.addNewAttunement( this.getModItem( "thermaldynamics", "duct_0", 0 ), TunnelType.FE_POWER );

This comment has been minimized.

@orod-org

orod-org Aug 17, 2017

CRITICAL Define a constant instead of duplicating this literal "thermaldynamics" 15 times. rule

@orod-org

orod-org Aug 17, 2017

CRITICAL Define a constant instead of duplicating this literal "thermaldynamics" 15 times. rule

// TODO: Remove when confirmed that the official 1.12 version of EnderIO will support FE.
this.addNewAttunement( "enderio", TunnelType.RF_POWER );
this.addNewAttunement( "enderio", TunnelType.FE_POWER );
// TODO: Remove when confirmed that the official 1.12 version of Mekanism will support FE.

This comment has been minimized.

@orod-org

orod-org Aug 17, 2017

INFO Complete the task associated to this TODO comment. rule

@orod-org

orod-org Aug 17, 2017

INFO Complete the task associated to this TODO comment. rule

// TODO: Remove when confirmed that the official 1.12 version of Mekanism will support FE.
this.addNewAttunement( "mekanism", TunnelType.RF_POWER );
this.addNewAttunement( "mekanism", TunnelType.FE_POWER );
// TODO: Remove when support for RFTools' Powercells support is added

This comment has been minimized.

@orod-org

orod-org Aug 17, 2017

INFO Complete the task associated to this TODO comment. rule

@orod-org

orod-org Aug 17, 2017

INFO Complete the task associated to this TODO comment. rule

@orod-org

This comment has been minimized.

Show comment
Hide comment
@orod-org

orod-org Aug 17, 2017

SonarQube analysis reported 35 issues

  • CRITICAL 9 critical
  • MAJOR 14 major
  • MINOR 9 minor
  • INFO 3 info

Watch the comments in this conversation to review them.

Top 10 extra issues

Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

  1. CRITICAL P2PTunnelRegistry.java#L122: Define a constant instead of duplicating this literal "extrautilities" 3 times. rule
  2. CRITICAL P2PTunnelRegistry.java#L123: Define a constant instead of duplicating this literal "mekanism" 4 times. rule
  3. CRITICAL P2PTunnelRegistry.java#L125: Define a constant instead of duplicating this literal "duct_32" 4 times. rule
  4. CRITICAL P2PTunnelRegistry.java#L146: Define a constant instead of duplicating this literal "duct_16" 4 times. rule
  5. CRITICAL P2PTunnelRegistry.java#L201: Remove this "Nullable" annotation to honor the overridden method's contract. rule
  6. CRITICAL P2PTunnelRegistry.java#L203: The Cyclomatic Complexity of this method "getTunnelTypeByItem" is 11 which is greater than 10 authorized. rule
  7. CRITICAL IntegrationType.java#L65: Rename this constant name to match the regular expression '^[A-Z][A-Z0-9](_[A-Z0-9]+)$'. rule
  8. MAJOR Registration.java#L128: Add a constructor to the class. rule
  9. MAJOR Registration.java#L150: This block of commented-out lines of code should be removed. rule
  10. MAJOR Registration.java#L229: Remove this useless assignment to local variable "partHelper". rule

orod-org commented Aug 17, 2017

SonarQube analysis reported 35 issues

  • CRITICAL 9 critical
  • MAJOR 14 major
  • MINOR 9 minor
  • INFO 3 info

Watch the comments in this conversation to review them.

Top 10 extra issues

Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

  1. CRITICAL P2PTunnelRegistry.java#L122: Define a constant instead of duplicating this literal "extrautilities" 3 times. rule
  2. CRITICAL P2PTunnelRegistry.java#L123: Define a constant instead of duplicating this literal "mekanism" 4 times. rule
  3. CRITICAL P2PTunnelRegistry.java#L125: Define a constant instead of duplicating this literal "duct_32" 4 times. rule
  4. CRITICAL P2PTunnelRegistry.java#L146: Define a constant instead of duplicating this literal "duct_16" 4 times. rule
  5. CRITICAL P2PTunnelRegistry.java#L201: Remove this "Nullable" annotation to honor the overridden method's contract. rule
  6. CRITICAL P2PTunnelRegistry.java#L203: The Cyclomatic Complexity of this method "getTunnelTypeByItem" is 11 which is greater than 10 authorized. rule
  7. CRITICAL IntegrationType.java#L65: Rename this constant name to match the regular expression '^[A-Z][A-Z0-9](_[A-Z0-9]+)$'. rule
  8. MAJOR Registration.java#L128: Add a constructor to the class. rule
  9. MAJOR Registration.java#L150: This block of commented-out lines of code should be removed. rule
  10. MAJOR Registration.java#L229: Remove this useless assignment to local variable "partHelper". rule
return new RFModule();
}
},
MFR( IntegrationSide.BOTH, "Mine Factory Reloaded", "minefactoryreloaded" ),
Waila( IntegrationSide.BOTH, "Waila", "waila" )

This comment has been minimized.

@orod-org

orod-org Aug 17, 2017

CRITICAL Rename this constant name to match the regular expression '^[A-Z][A-Z0-9](_[A-Z0-9]+)$'. rule

@orod-org

orod-org Aug 17, 2017

CRITICAL Rename this constant name to match the regular expression '^[A-Z][A-Z0-9](_[A-Z0-9]+)$'. rule

@yueh yueh added this to the rv5.alpha - 1.12 milestone Aug 17, 2017

@yueh yueh merged commit c4fa21c into rv5-1.12 Aug 17, 2017

3 of 4 checks passed

sonarqube SonarQube reported 35 issues, with 9 critical
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
jenkins Success
Details

@yueh yueh deleted the feature-remove-coremod branch Aug 17, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment