Created
August 21, 2019 20:05
-
-
Save amadeu01/7d9bf9f0861acc86d0bd42464a5d620b to your computer and use it in GitHub Desktop.
spotless kotlin lint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
src/ConduitAPIServer.kt | |
@@ -1,3 +1,4 @@ | |
+/*·Licensed·under·MIT·*/ | |
package·dev.amadeu | |
import·io.ktor.application.* | |
@@ -10,7 +11,7 @@ | |
/** | |
·*·Conduit·API | |
-·*· | |
+·* | |
·*·Conduit·API | |
·*/ | |
class·ConduitAPIServer(val·myjwt:·MyJWT)·{ | |
@@ -19,7 +20,7 @@ | |
·····*/ | |
····fun·Routing.registerUserAndAuthentication()·{ | |
········post("/users/login")·{ | |
-············val·body·=·call.getBodyParam<LoginUserRequest>("body")· | |
+············val·body·=·call.getBodyParam<LoginUserRequest>("body") | |
············if·(false)·httpException(HttpStatusCode.Unauthorized) | |
············if·(false)·httpException(422,·"Unexpected·error") | |
@@ -41,7 +42,7 @@ | |
········} | |
········post("/users")·{ | |
-············val·body·=·call.getBodyParam<NewUserRequest>("body")· | |
+············val·body·=·call.getBodyParam<NewUserRequest>("body") | |
············if·(false)·httpException(HttpStatusCode.Created) | |
············if·(false)·httpException(422,·"Unexpected·error") | |
@@ -68,7 +69,7 @@ | |
········authenticate("Token")·{ | |
············put("/users")·{ | |
-················val·body·=·call.getBodyParam<UpdateUserRequest>("body")· | |
+················val·body·=·call.getBodyParam<UpdateUserRequest>("body") | |
················if·(false)·httpException(HttpStatusCode.Unauthorized) | |
················if·(false)·httpException(422,·"Unexpected·error") | |
@@ -91,7 +92,7 @@ | |
·····*/ | |
····fun·Routing.registerProfile()·{ | |
········get("/profiles/{username}")·{ | |
-············val·username·=·call.getPath<String>("username")· | |
+············val·username·=·call.getPath<String>("username") | |
············if·(false)·httpException(HttpStatusCode.Unauthorized) | |
... (106 more lines that didn't fit) | |
Violations also present in: | |
src/ConduitAPI.kt | |
src/Application.kt | |
src/ConduitAPIClient.kt | |
src/io/ktor/swagger/experimental/SwaggerUtils.kt | |
test/ConduitAPIServerTest.kt | |
test/ApplicationTest.kt | |
Run 'gradlew spotlessApply' to fix these violations. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment