From 5ca6891e1874a2f78ea8e6efe1ca02cd2a44e56c Mon Sep 17 00:00:00 2001 From: Hayden Gomes Date: Fri, 11 Mar 2016 12:17:34 -0800 Subject: [PATCH] Fixing formatting on enum value names --- .../kotlin/io/aexp/bucketlist/HttpBucketListClient.kt | 8 ++++---- .../src/main/kotlin/io/aexp/bucketlist/WhitespaceMode.kt | 4 ++-- .../main/kotlin/io/aexp/bucketlist/data/CommentMode.kt | 4 ++-- .../java/io/aexp/bucketlist/HttpBucketListClientTest.java | 2 +- .../prfileoccurrences/ExportPrFileOccurrencesData.kt | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bucketlist/src/main/kotlin/io/aexp/bucketlist/HttpBucketListClient.kt b/bucketlist/src/main/kotlin/io/aexp/bucketlist/HttpBucketListClient.kt index de25d01..c6e5cf4 100644 --- a/bucketlist/src/main/kotlin/io/aexp/bucketlist/HttpBucketListClient.kt +++ b/bucketlist/src/main/kotlin/io/aexp/bucketlist/HttpBucketListClient.kt @@ -105,15 +105,15 @@ class HttpBucketListClient(private val baseUrl: URL, private fun getDiffAPICommentModeValue(commentMode: CommentMode): String { when(commentMode) { - CommentMode.WithComments -> return "true" - CommentMode.WithoutComments -> return "false" + CommentMode.WITH_COMMENTS -> return "true" + CommentMode.WITHOUT_COMMENTS -> return "false" } } private fun getDiffAPIWhitespaceModeValue(whitespaceMode: WhitespaceMode): String { when(whitespaceMode) { - WhitespaceMode.Show -> return "show" - WhitespaceMode.IgnoreAll -> return "ignore-all" + WhitespaceMode.SHOW -> return "show" + WhitespaceMode.IGNORE_ALL -> return "ignore-all" } } diff --git a/bucketlist/src/main/kotlin/io/aexp/bucketlist/WhitespaceMode.kt b/bucketlist/src/main/kotlin/io/aexp/bucketlist/WhitespaceMode.kt index e811b6a..4e0e9d2 100644 --- a/bucketlist/src/main/kotlin/io/aexp/bucketlist/WhitespaceMode.kt +++ b/bucketlist/src/main/kotlin/io/aexp/bucketlist/WhitespaceMode.kt @@ -2,8 +2,8 @@ package io.aexp.bucketlist enum class WhitespaceMode { - Show, - IgnoreAll + SHOW, + IGNORE_ALL } diff --git a/bucketlist/src/main/kotlin/io/aexp/bucketlist/data/CommentMode.kt b/bucketlist/src/main/kotlin/io/aexp/bucketlist/data/CommentMode.kt index c63f1e3..f572703 100644 --- a/bucketlist/src/main/kotlin/io/aexp/bucketlist/data/CommentMode.kt +++ b/bucketlist/src/main/kotlin/io/aexp/bucketlist/data/CommentMode.kt @@ -2,6 +2,6 @@ package io.aexp.bucketlist.data enum class CommentMode { - WithComments, - WithoutComments + WITH_COMMENTS, + WITHOUT_COMMENTS } \ No newline at end of file diff --git a/bucketlist/src/test/java/io/aexp/bucketlist/HttpBucketListClientTest.java b/bucketlist/src/test/java/io/aexp/bucketlist/HttpBucketListClientTest.java index 4ff7dee..539da3e 100644 --- a/bucketlist/src/test/java/io/aexp/bucketlist/HttpBucketListClientTest.java +++ b/bucketlist/src/test/java/io/aexp/bucketlist/HttpBucketListClientTest.java @@ -196,7 +196,7 @@ public void testGetPrDiff() throws IOException { giveResponse(Resources.toString(getResource(getClass(), "getPrDiffResp.json"), UTF_8), "application/json")); - PullRequestDiffResponse diffResponse = client.getPrDiff(proj, repo, 2, 0, WhitespaceMode.IgnoreAll, CommentMode.WithoutComments) + PullRequestDiffResponse diffResponse = client.getPrDiff(proj, repo, 2, 0, WhitespaceMode.IGNORE_ALL, CommentMode.WITHOUT_COMMENTS) .toBlocking() .first(); diff --git a/examples/src/main/kotlin/io/aexp/bucketlist/examples/prfileoccurrences/ExportPrFileOccurrencesData.kt b/examples/src/main/kotlin/io/aexp/bucketlist/examples/prfileoccurrences/ExportPrFileOccurrencesData.kt index 9478e31..45af2c3 100644 --- a/examples/src/main/kotlin/io/aexp/bucketlist/examples/prfileoccurrences/ExportPrFileOccurrencesData.kt +++ b/examples/src/main/kotlin/io/aexp/bucketlist/examples/prfileoccurrences/ExportPrFileOccurrencesData.kt @@ -97,7 +97,7 @@ object ExportPrFileOccurrencesData { Observable { logger.debug("Fetching diff for PR " + prId); - return client.getPrDiff(projectKey, repoSlug, prId, 0, WhitespaceMode.IgnoreAll, CommentMode.WithoutComments) + return client.getPrDiff(projectKey, repoSlug, prId, 0, WhitespaceMode.IGNORE_ALL, CommentMode.WITHOUT_COMMENTS) .flatMap { diffResponse -> logger.debug("Parsing PR for files changed"); // Filter diffs with Null sources or destinations as that indicates a new or deleted file. Then