Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding lint of the Android code to be built on developers machine #6790

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/pr-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 20
# Java is needed to run the "./gradlew lint" command in the test app
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Install root package dependencies
run: npm ci
- name: Check types
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
"build:android": "react-native bundle --entry-file index.js --platform android --dev true --bundle-output dist/main.android.jsbundle --assets-dest dist/res",
"build:ios": "react-native bundle --entry-file index.js --platform ios --dev true --bundle-output dist/main.ios.jsbundle --assets-dest dist",
"ios": "react-native run-ios",
"lint": "eslint .",
"lint": "eslint . && npm run realm:lint-android",
"start": "react-native start",
"test:android": "wireit",
"test:ios": "wireit",
"pod-install": "wireit",
"realm:build-android:debug": "wireit",
"realm:build-android:release": "wireit",
"realm:lint-android": "wireit",
"metro": "react-native start --reset-cache",
"runner": "node harness/runner.js",
"logcat": "adb logcat -v color --pid=$(adb shell pidof -s com.microsoft.reacttestapp)"
Expand Down Expand Up @@ -127,6 +128,12 @@
"dependencies": [
"../../../packages/realm/:bindgen:jsi"
]
},
"realm:lint-android": {
"command": "cd android && ./gradlew realm:lint",
"dependencies": [
"../../../packages/realm/:bindgen:jsi"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to double-check that this dependency is actually needed as it slows down the execution quite significantly 🤔

]
}
},
"dependencies": {
Expand Down
Loading