Skip to content

Commit cde846c

Browse files
authored
Merge pull request #39 from filiph/fix/formatting-pubspec-lock
Change validate-formatting.sh so that it ignores pubspec.lock
2 parents 47d9380 + 1952656 commit cde846c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/scripts/validate-formatting.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414
# limitations under the License.
1515
set -e
1616

17-
if [[ $(git ls-files --modified) ]]; then
17+
# Get modified files, excluding pubspec.lock.
18+
# The '|| true' prevents the script from exiting if grep finds no matches.
19+
MODIFIED_FILES=$(git ls-files --modified | grep -v '^pubspec.lock$' || true)
20+
21+
if [[ $MODIFIED_FILES ]]; then
1822
echo ""
1923
echo ""
2024
echo "These files are not formatted correctly:"

0 commit comments

Comments
 (0)