Skip to content

Commit 42f8885

Browse files
committed
test(lint): yarn lint:android will now exit correctly every time
so workaround to exit during CI workflow not needed, also added prescriptive messages to the output of running it
1 parent 77af6b2 commit 42f8885

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/linting.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
timeout_minutes: 3
5151
retry_wait_seconds: 10
5252
max_attempts: 3
53-
command: yarn lint && git diff --exit-code
53+
command: yarn lint
5454
- uses: actions/cache/save@v4
5555
name: Yarn Cache Save
5656
if: "${{ github.ref == 'refs/heads/main' }}"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"build:all:build": "lerna run build",
1111
"lint": "yarn lint:js && yarn lint:android && yarn lint:ios:check",
1212
"lint:js": "eslint packages/* --max-warnings=0",
13-
"lint:android": "google-java-format --set-exit-if-changed --replace --glob=\"packages/*/android/src/**/*.java\"",
13+
"lint:android": "(google-java-format --set-exit-if-changed --replace --glob=\"packages/*/android/src/**/*.java\" || (echo \"\n\nandroid formatting error - please re-run\n\n\" && exit 1)) && (git diff --exit-code packages/*/android/src || (echo \"\n\nandroid files changed from linting, please examine and commit result\n\n\" && exit 1))",
1414
"lint:ios:check": "clang-format --glob=\"packages/*/ios/**/*.{h,cpp,m,mm}\" --style=Google -n -Werror",
1515
"lint:ios:fix": "clang-format -i --glob=\"packages/*/ios/**/*.{h,cpp,m,mm}\" --style=Google",
1616
"lint:markdown": "prettier --check \"docs/**/*.md\"",

0 commit comments

Comments
 (0)