Skip to content

Commit 0c6de92

Browse files
authored
Merge pull request #21 from reduxkotlin/task/20-ktlint
#20 ktlint
2 parents 9a626d5 + b96475f commit 0c6de92

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

.github/workflows/test.yml renamed to .github/workflows/pull_request.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test
1+
name: PR
22

33
on:
44
pull_request:
@@ -7,6 +7,14 @@ on:
77
- '*.md'
88

99
jobs:
10+
ktlint:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Ktlint
17+
uses: "vroy/gha-kotlin-linter@v1"
1018
test:
1119
runs-on: ${{ matrix.os }}
1220
strategy:

redux-kotlin-thunk/src/commonMain/kotlin/org/reduxkotlin/Thunk.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ fun <State> createThunkMiddleware(extraArgument: Any? = null): ThunkMiddleware<S
2929
if (action is Function<*>) {
3030
@Suppress("UNCHECKED_CAST")
3131
val thunk = try {
32-
(action as Thunk<*>)
33-
} catch (e: ClassCastException) {
34-
throw IllegalArgumentException("Dispatching functions must use type Thunk:", e)
35-
}
32+
(action as Thunk<*>)
33+
} catch (e: ClassCastException) {
34+
throw IllegalArgumentException("Dispatching functions must use type Thunk:", e)
35+
}
3636
thunk(store.dispatch, store.getState, extraArgument)
3737
} else {
3838
next(action)

0 commit comments

Comments
 (0)