Skip to content

Commit f3361e9

Browse files
committed
Fix pana analyze packages
1 parent 8e9624c commit f3361e9

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

.github/workflows/scripts/run-pana.sh

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
set -e
3+
4+
# Get the root directory of your project
5+
ROOT_DIR=$(pwd)
6+
7+
# Specify the path to the packages folder
8+
PACKAGES_DIR="$ROOT_DIR/packages"
9+
10+
# Iterate over each package folder
11+
for PACKAGE in "$PACKAGES_DIR"/*; do
12+
# Check if it's a directory
13+
if [ -d "$PACKAGE" ]; then
14+
echo "Analyzing package in: $PACKAGE"
15+
16+
# Change into the package directory
17+
cd "$PACKAGE" || exit
18+
19+
# Run the pana command
20+
dart pub global run pana --no-warning --exit-code-threshold 0
21+
22+
# Return to the root directory
23+
cd "$ROOT_DIR" || exit
24+
fi
25+
done

melos.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ scripts:
2828

2929
analyze:packages:pana:
3030
description: Analyze Dart packages with Pana
31-
exec: dart pub global run pana --no-warning --exit-code-threshold 0
31+
run: |
32+
./.github/workflows/scripts/run-pana.sh
3233
packageFilters:
3334
noPrivate: true
3435

0 commit comments

Comments
 (0)