-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(analysis): using flutter analyze and checking correct formatting (#…
…107) * ci(analysis): using `flutter analyze` and failing on warnings * using `flutter analyze` for analysis and added step for check if formatted properly * [analysis] disable `secure_pubspec_urls` * formatting
- Loading branch information
Showing
4 changed files
with
51 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
if [[ $(git ls-files --modified) ]]; then | ||
echo "" | ||
echo "" | ||
echo "These files are not formatted correctly:" | ||
for f in $(git ls-files --modified); do | ||
echo "" | ||
echo "" | ||
echo "-----------------------------------------------------------------" | ||
echo "$f" | ||
echo "-----------------------------------------------------------------" | ||
echo "" | ||
git --no-pager diff --unified=0 --minimal $f | ||
echo "" | ||
echo "-----------------------------------------------------------------" | ||
echo "" | ||
echo "" | ||
done | ||
if [[ $GITHUB_WORKFLOW ]]; then | ||
git checkout . > /dev/null 2>&1 | ||
fi | ||
echo "" | ||
echo "❌ Some files are incorrectly formatted, see above output." | ||
echo "" | ||
echo "To fix these locally, run: 'flutter format .'." | ||
exit 1 | ||
else | ||
echo "" | ||
echo "✅ All files are formatted correctly." | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters