Skip to content

Commit 5de57d5

Browse files
committed
test
1 parent 5aa67b8 commit 5de57d5

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/code-analysis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,9 @@ jobs:
128128

129129
# Statically analyze the Dart code for any errors.
130130
- run: flutter analyze .
131+
132+
# Statically analyze Kotlin code (e.g. google_mlkit_commons Android) with ktlint.
133+
- name: Install ktlint
134+
run: brew install ktlint
135+
- name: Run ktlint on Kotlin code
136+
run: ktlint --format

scripts/analyze.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
#!/bin/bash
2+
set -e
23

34
cd "$(dirname "$0")/.."
45

56
dart format --set-exit-if-changed .
67
flutter analyze .
8+
9+
# Lint Kotlin code with ktlint (https://github.com/pinterest/ktlint)
10+
if ! command -v ktlint &>/dev/null; then
11+
echo "ktlint is not installed. Install it with:"
12+
echo " brew install ktlint"
13+
exit 1
14+
else
15+
ktlint --format
16+
fi

0 commit comments

Comments
 (0)