Chore: Add tracking for total number of scss files (#87259)

* add tracking for total number of scss files

* need this comma :o
This commit is contained in:
Ashley Harrison 2024-05-02 17:10:31 +01:00 committed by GitHub
parent 64d5440c5a
commit 84c59e1134
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,6 +15,7 @@ BARREL_IMPORTS="$(grep -r -oP '@todo: replace barrel import path' public/app | w
CLASSNAME_PROP="$(grep -r -o -E --include="*.ts*" "\.*.className=\W.*\W.*" public/app | wc -l)" CLASSNAME_PROP="$(grep -r -o -E --include="*.ts*" "\.*.className=\W.*\W.*" public/app | wc -l)"
EMOTION_IMPORTS="$(grep -r -o -E --include="*.ts*" --exclude="*.test*" "\{.*css.*\} from '@emotion/css'" public/app | wc -l)" EMOTION_IMPORTS="$(grep -r -o -E --include="*.ts*" --exclude="*.test*" "\{.*css.*\} from '@emotion/css'" public/app | wc -l)"
TS_FILES="$(find public/app -type f -name "*.ts*" -not -name "*.test*" | wc -l)" TS_FILES="$(find public/app -type f -name "*.ts*" -not -name "*.test*" | wc -l)"
SCSS_FILES="$(find public packages -name '*.scss' | wc -l)"
TOTAL_BUNDLE="$(du -sk "$BUILD_FOLDER" | cut -f1)" TOTAL_BUNDLE="$(du -sk "$BUILD_FOLDER" | cut -f1)"
OUTDATED_DEPENDENCIES="$(yarn outdated --all | grep -oP '[[:digit:]]+ *(?= dependencies are out of date)')" OUTDATED_DEPENDENCIES="$(yarn outdated --all | grep -oP '[[:digit:]]+ *(?= dependencies are out of date)')"
@ -40,6 +41,7 @@ echo -e "Critical vulnerabilities: $CRITICAL_VULNERABILITIES"
echo -e "ClassName in props: $CLASSNAME_PROP" echo -e "ClassName in props: $CLASSNAME_PROP"
echo -e "@emotion/css imports: $EMOTION_IMPORTS" echo -e "@emotion/css imports: $EMOTION_IMPORTS"
echo -e "Total TS files: $TS_FILES" echo -e "Total TS files: $TS_FILES"
echo -e "Total SCSS files: $SCSS_FILES"
BETTERER_STATS="" BETTERER_STATS=""
while read -r name value while read -r name value
@ -75,5 +77,6 @@ echo "Metrics: {
\"grafana.ci-code.dependencies.outdated\": \"${OUTDATED_DEPENDENCIES}\", \"grafana.ci-code.dependencies.outdated\": \"${OUTDATED_DEPENDENCIES}\",
\"grafana.ci-code.props.className\": \"${CLASSNAME_PROP}\", \"grafana.ci-code.props.className\": \"${CLASSNAME_PROP}\",
\"grafana.ci-code.imports.emotion\": \"${EMOTION_IMPORTS}\", \"grafana.ci-code.imports.emotion\": \"${EMOTION_IMPORTS}\",
\"grafana.ci-code.tsFiles\": \"${TS_FILES}\" \"grafana.ci-code.tsFiles\": \"${TS_FILES}\",
\"grafana.ci-code.scssFiles\": \"${SCSS_FILES}\"
}" }"