Code Checks - bluecolab/BlueColab_MobileDataViz GitHub Wiki
When a PR is opened, several checks run to check the quality of the code:

See: https://github.com/bluecolab/BlueColab_MobileDataViz/blob/main/.github/workflows/check_build.yml
A failed test will look like this:

Depending on where you navigate from, clicking on the error or click on details will offer the reason for failure and possible fixes.
See: https://github.com/bluecolab/BlueColab_MobileDataViz/actions/runs/16132762583/job/45523127260

Run the follow command in the aquawatch_mobile_app
directory:
npm test
Purpose: The app-build-branch
should never be merged into main
. The check verifies that the name of the branch isn't app-build-branch
.
Local testing: None
Resolution: Please close the PR.
Purpose: Installs dependencies needed for later checks. It does validate to make sure all packages are compatible with each other.
Local testing: Run the follow command in the aquawatch_mobile_app
directory:
npm install
Resolution: Please look into the error logs. The most common error is likely when package versions conflict. There is no one solution but experiment with using different versions of the packages. From time to time npm does have errors on their end, check their status site.
Purpose: Checks the code formatting and also statically checks for potential errors.
Local testing: Run the follow command in the aquawatch_mobile_app
directory:
npm run lint
Resolution: Please look into the error log after running the above command.
Automatically fixable errors can be fixed with:
npm run format
Here, installing the recommended extensions will help. Going to problem files they may offer suggestions on fixes (hover over errors and click on quick fixes).
Additionally this repo has special config files which will auto-format your code, if you have the extensions installed.
Purpose: Checks dependencies for any known vulnerabilities.
Local testing: Run the follow command in the aquawatch_mobile_app
directory:
npm audit
Resolution: Please look into the error log after running the above command. Some errors may be fixed with:
npm audit fix
Purpose: Checks apps for spelling errors.
Local testing: Run the follow command in the aquawatch_mobile_app
directory:
npx cspell .
Resolution: Please look into the error log after running the above command.
Here, installing the recommended extensions will help. A blue underline will appear for miss-spelt words. It will offer potential fixes or offer to add the word to config: aquawatch_mobile_app/.cspell.json
. You can manually add custom words to that file as well.
Purpose: This command performs checks and analyzes the project's codebase for common issues in app config and package.json files, dependency compatibility, configuration files, and the overall health of the project. Learn more: Expo Doctor.
Local testing: Run the follow command in the aquawatch_mobile_app
directory:
npx expo-doctor
Resolution: Please look into the error log after running the above command. They will offer suggestions on fixes.
Most often ✖ Validate packages against React Native Directory package metadata
check may throw errors for new dependencies. To add exceptions modify package.json. Add the package to expo.doctor.reactNativeDirectoryCheck.exclude list.
"expo": {
"doctor": {
"reactNativeDirectoryCheck": {
"exclude": [
"react-native-element-dropdown",
"moment",
"react-native-orientation-locker",
"moment",
"react-native-navigation-bar",
"react-navigation",
"react-navigation-stack",
"tailwindcss",
"luxon",
...more packages here..
]
}
}
},