Add a script to check stability of State classes
tom script
This commit is contained in:
committed by
Benoit Marty
parent
f9ba0819f2
commit
bc2b77d269
23
tools/compose/check_stability.sh
Executable file
23
tools/compose/check_stability.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright 2025 New Vector Ltd.
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
# Please see LICENSE files in the repository root for full details.
|
||||
|
||||
set -e
|
||||
|
||||
# Build the project with compose report
|
||||
echo "Building the project with compose report..."
|
||||
./gradlew assembleGplayDebug -PcomposeCompilerReports=true -PcomposeCompilerMetrics=true --stacktrace
|
||||
|
||||
echo "Checking stability of State classes..."
|
||||
# Using the find command, list all the files ending with -classes.txt
|
||||
find . -type f -name "*-classes.txt" | while read -r file; do
|
||||
# echo "Processing $file"
|
||||
# Check that there is no line containing "unstable class .*State {"
|
||||
if grep -E 'unstable class .*State \{' "$file"; then
|
||||
echo "Found unstable State class in $file"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user