Skip to content

Commit 5f9f733

Browse files
authored
configure a GHA job that will run Checkstyle (#1407)
* configure a GHA job that will run Checkstyle * fix checkstyle violation
1 parent 715ecca commit 5f9f733

2 files changed

Lines changed: 23 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,23 @@ jobs:
3030
with:
3131
arguments: assemble --scan
3232

33+
checkstyle:
34+
name: Checkstyle
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Checkout code
38+
uses: actions/checkout@v3
39+
- name: Run Checkstyle
40+
uses: gradle/gradle-build-action@v2
41+
with:
42+
arguments: checkstyle --scan
43+
- name: Archive Checkstyle results
44+
if: always()
45+
uses: actions/upload-artifact@v3
46+
with:
47+
name: checkstyle-results
48+
path: "**/build/reports/checkstyle/"
49+
3350
ktlint:
3451
name: ktlint
3552
runs-on: ubuntu-latest
@@ -102,7 +119,7 @@ jobs:
102119
github.event_name == 'schedule' ||
103120
github.event_name == 'pull_request' ||
104121
(github.event_name == 'push' && (github.ref == 'refs/heads/master' || contains(github.ref, 'refs/tags/')))
105-
needs: [build, ktlint, lint, tests]
122+
needs: [build, checkstyle, ktlint, lint, tests]
106123
steps:
107124
- name: Checkout code
108125
uses: actions/checkout@v3

gto-support-okta/src/main/java/com/okta/authfoundation/credential/SharedPreferencesTokenStorageInternals.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414
public class SharedPreferencesTokenStorageInternals {
1515
@RequiresApi(Build.VERSION_CODES.M)
1616
@SuppressWarnings("KotlinInternalInJava")
17-
public static SharedPreferencesTokenStorage create(@NonNull final OidcClient client, @NonNull final Context context, @NonNull KeyGenParameterSpec keyGenParameterSpec) {
17+
public static SharedPreferencesTokenStorage create(
18+
@NonNull final OidcClient client,
19+
@NonNull final Context context,
20+
@NonNull KeyGenParameterSpec keyGenParameterSpec
21+
) {
1822
return new SharedPreferencesTokenStorage(
1923
client.getConfiguration().getJson(),
2024
client.getConfiguration().getIoDispatcher(),

0 commit comments

Comments
 (0)