2022-11-10 02:22:42 +00:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
2024-04-18 14:14:17 +00:00
|
|
|
INVALID_CHANGES=$(grep -E -r '(/atom|re-frame/dispatch|rf/dispatch|re-frame/subscribe|rf/subscribe|rf/sub|<sub|>evt|status-im\.)' --include '*.cljs' --include '*.clj' './src/quo')
|
2022-11-10 02:22:42 +00:00
|
|
|
|
|
|
|
if test -n "$INVALID_CHANGES"; then
|
2024-04-18 14:14:17 +00:00
|
|
|
echo "WARNING: re-frame, status-im, reagent atoms are not allowed in quo components"
|
2022-11-10 02:22:42 +00:00
|
|
|
echo ''
|
|
|
|
echo "$INVALID_CHANGES"
|
|
|
|
exit 1
|
|
|
|
fi
|
2023-12-21 17:16:59 +00:00
|
|
|
|
2024-11-19 10:50:01 +00:00
|
|
|
# Add exception for status-im.config in the utils package check
|
|
|
|
INVALID_CHANGES2=$(grep -E -r '(status-im\.)' --include '*.cljs' --include '*.clj' './src/utils' | grep -v 'status-im.config')
|
2023-12-21 17:16:59 +00:00
|
|
|
|
|
|
|
if test -n "$INVALID_CHANGES2"; then
|
|
|
|
echo "WARNING: status-im are not allowed in utils package"
|
|
|
|
echo ''
|
|
|
|
echo "$INVALID_CHANGES2"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
INVALID_CHANGES3=$(grep -E -r '(status-im\.)' --include '*.cljs' --include '*.clj' './src/react_native')
|
|
|
|
|
|
|
|
if test -n "$INVALID_CHANGES3"; then
|
|
|
|
echo "WARNING: status-im are not allowed in react-native package"
|
|
|
|
echo ''
|
|
|
|
echo "$INVALID_CHANGES3"
|
|
|
|
exit 1
|
|
|
|
fi
|