Skip to content

Commit

Permalink
Merge branch 'master' into mc-1.14.x
Browse files Browse the repository at this point in the history
  • Loading branch information
SquidDev committed Nov 25, 2019
2 parents 2d4a87a + 121802a commit 642351a
Show file tree
Hide file tree
Showing 80 changed files with 577 additions and 328 deletions.
7 changes: 5 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ configurations {
}

dependencies {
checkstyle "com.puppycrawl.tools:checkstyle:8.21"
checkstyle "com.puppycrawl.tools:checkstyle:8.25"

minecraft "net.minecraftforge:forge:${mc_version}-${forge_version}"

Expand Down Expand Up @@ -365,6 +365,7 @@ task checkRelease {
if (!ok) throw new IllegalStateException("Could not check release")
}
}
check.dependsOn checkRelease

curseforge {
apiKey = project.hasProperty('curseForgeApiKey') ? project.curseForgeApiKey : ''
Expand Down Expand Up @@ -436,7 +437,9 @@ githubRelease {
token project.hasProperty('githubApiKey') ? project.githubApiKey : ''
owner 'SquidDev-CC'
repo 'CC-Tweaked'
targetCommitish { Grgit.open(dir: '.').branch.current().name }
try {
targetCommitish = Grgit.open(dir: '.').branch.current().name
} catch(Exception ignored) { }

tagName "v${mc_version}-${mod_version}"
releaseName "[${mc_version}] ${mod_version}"
Expand Down
20 changes: 15 additions & 5 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
<!-- Annotations -->
<module name="AnnotationLocation" />
<module name="AnnotationUseStyle" />
<module name="MissingDeprecated">
<property name="skipNoJavadoc" value="true" />
</module>
<module name="MissingDeprecated" />
<module name="MissingOverride" />

<!-- Blocks -->
Expand Down Expand Up @@ -57,6 +55,9 @@
<module name="SimplifyBooleanReturn" />
<module name="StringLiteralEquality" />
<module name="UnnecessaryParentheses" />
<module name="UnnecessarySemicolonAfterTypeMemberDeclaration" />
<module name="UnnecessarySemicolonInTryWithResources" />
<module name="UnnecessarySemicolonInEnumeration" />

<!-- Imports -->
<module name="CustomImportOrder" />
Expand All @@ -65,10 +66,16 @@
<module name="UnusedImports" />

<!-- Javadoc -->
<!-- TODO: Missing* checks for the dan200.computercraft.api package? -->
<module name="AtclauseOrder" />
<!-- TODO: Cleanup our documentation before enabling JavadocMethod, JavadocStyle, JavadocType and SummaryJavadoc. -->
<module name="InvalidJavadocPosition" />
<module name="JavadocBlockTagLocation" />
<module name="JavadocMethod"/>
<module name="JavadocType"/>
<module name="JavadocStyle" />
<module name="NonEmptyAtclauseDescription" />
<module name="SingleLineJavadoc" />
<module name="SummaryJavadocCheck"/>

<!-- Misc -->
<module name="ArrayTypeStyle" />
Expand Down Expand Up @@ -155,5 +162,8 @@

<module name="FileTabCharacter" />
<module name="NewlineAtEndOfFile" />
<module name="RegexpSingleline">
<property name="format" value="\s+$"/>
<property name="message" value="Trailing whitespace"/>
</module>
</module>

3 changes: 3 additions & 0 deletions config/checkstyle/suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@
<!-- All the config options and method fields. -->
<suppress checks="StaticVariableName" files=".*[\\/]ComputerCraft.java" />
<suppress checks="StaticVariableName" files=".*[\\/]ComputerCraftAPI.java" />

<!-- Do not check for missing package Javadoc. -->
<suppress checks="JavadocStyle" files=".*[\\/]package-info.java" />
</suppressions>
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Mod properties
mod_version=1.85.0
mod_version=1.85.1

# Minecraft properties (update mods.toml when changing)
mc_version=1.14.4
Expand Down
11 changes: 6 additions & 5 deletions src/main/java/dan200/computercraft/api/ComputerCraftAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@

/**
* The static entry point to the ComputerCraft API.
* Members in this class must be called after mod_ComputerCraft has been initialised,
* but may be called before it is fully loaded.
*
* Members in this class must be called after mod_ComputerCraft has been initialised, but may be called before it is
* fully loaded.
*/
public final class ComputerCraftAPI
{
Expand Down Expand Up @@ -189,7 +190,7 @@ public static int getBundledRedstoneOutput( @Nonnull World world, @Nonnull Block
}

/**
* Registers a media provider to provide {@link IMedia} implementations for Items
* Registers a media provider to provide {@link IMedia} implementations for Items.
*
* @param provider The media provider to register.
* @see IMediaProvider
Expand Down Expand Up @@ -220,7 +221,7 @@ public static void registerAPIFactory( @Nonnull ILuaAPIFactory factory )
}

/**
* Construct a new wired node for a given wired element
* Construct a new wired node for a given wired element.
*
* @param element The element to construct it for
* @return The element's node
Expand All @@ -233,7 +234,7 @@ public static IWiredNode createWiredNodeForElement( @Nonnull IWiredElement eleme
}

/**
* Get the wired network element for a block in world
* Get the wired network element for a block in world.
*
* @param world The world the block exists in
* @param pos The position the block exists in
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/dan200/computercraft/api/filesystem/IMount.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

/**
* Represents a read only part of a virtual filesystem that can be mounted onto a computer using
* {@link IComputerAccess#mount(String, IMount)}
* {@link IComputerAccess#mount(String, IMount)}.
*
* Ready made implementations of this interface can be created using
* {@link ComputerCraftAPI#createSaveDirMount(World, String, long)} or
Expand Down Expand Up @@ -60,7 +60,7 @@ public interface IMount
void list( @Nonnull String path, @Nonnull List<String> contents ) throws IOException;

/**
* Returns the size of a file with a given path, in bytes
* Returns the size of a file with a given path, in bytes.
*
* @param path A file path in normalised format, relative to the mount location. ie: "programs/myprogram".
* @return The size of the file, in bytes.
Expand Down
Loading

0 comments on commit 642351a

Please sign in to comment.