mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
* test add lint as separate action * nicer logging * only detect changes in dart files * fix printV warnings being displayed when editing printV --------- Co-authored-by: Czarek Nakamoto <cyjan@mrcyjanek.net>
20 lines
812 B
YAML
20 lines
812 B
YAML
name: No print statements in dart files
|
|
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
PR_test_build:
|
|
runs-on: ubuntu-24.04
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Check for print() statements in dart code (use printV() instead)
|
|
if: github.event_name == 'pull_request'
|
|
run: |
|
|
GIT_GREP_OUT="$(git grep ' print(' | (grep .dart: || test $? = 1) | (grep -v print_verbose.dart || test $? = 1) | (grep -v print_verbose_dummy.dart || test $? = 1) | (grep -v '^tool/' || test $? = 1) | (grep -v '^cw_custom_lints/' || test $? = 1) || true)"
|
|
[[ "x$GIT_GREP_OUT" == "x" ]] && exit 0
|
|
echo "$GIT_GREP_OUT"
|
|
echo "There are .dart files which use print() statements"
|
|
echo "Please use printV from package:cw_core/utils/print_verbose.dart"
|
|
exit 1
|