Skip to content

Commit f92e2d9

Browse files
authored
sync: update 2 files from source repository (#44)
1 parent bb4d034 commit f92e2d9

File tree

2 files changed

+25
-9
lines changed

2 files changed

+25
-9
lines changed

.devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
],
3131
"name": "go-subtree dev container",
3232
"postCreateCommand": "magex lint && magex vet && magex test",
33-
"postStartCommand": "go install github.com/magefile/mage/cmd/magex@latest",
33+
"postStartCommand": "go install github.com/mrz1836/mage-x/cmd/magex@latest",
3434
"remoteUser": "vscode",
3535
"runArgs": [
3636
"--cap-drop=ALL",

.github/workflows/fortress-code-quality.yml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,21 +111,37 @@ jobs:
111111
runner-os: ${{ inputs.primary-runner }}
112112

113113
# --------------------------------------------------------------------
114-
# Run go vet with parallel execution
114+
# Run go vet with sequential execution to avoid memory issues
115115
# --------------------------------------------------------------------
116-
- name: 🔍 Go vet (parallel)
116+
- name: 🔍 Go vet (sequential)
117117
run: |
118-
echo "🚀 Running static analysis with go vet (parallel mode)..."
118+
echo "🚀 Running static analysis with go vet (sequential mode)..."
119119
GO_MODULE_DIR="${{ env.GO_MODULE_DIR }}"
120120
121+
# Run go vet on packages sequentially to reduce memory usage
121122
if [ -n "$GO_MODULE_DIR" ]; then
122-
echo "🔧 Running magex vet from directory: $GO_MODULE_DIR"
123-
(cd "$GO_MODULE_DIR" && magex vet)
123+
echo "🔧 Running go vet from directory: $GO_MODULE_DIR"
124+
cd "$GO_MODULE_DIR"
124125
else
125-
echo "🔧 Running magex vet from repository root"
126-
magex vet
126+
echo "🔧 Running go vet from repository root"
127127
fi
128128
129+
# Get all packages and vet them one at a time
130+
PACKAGES=$(go list ./... 2>/dev/null | grep -v /vendor/)
131+
TOTAL=$(echo "$PACKAGES" | wc -l | xargs)
132+
CURRENT=0
133+
134+
echo "📦 Found $TOTAL packages to vet"
135+
136+
for pkg in $PACKAGES; do
137+
CURRENT=$((CURRENT + 1))
138+
echo "[$CURRENT/$TOTAL] Vetting $pkg..."
139+
if ! go vet "$pkg"; then
140+
echo "❌ go vet failed on package: $pkg"
141+
exit 1
142+
fi
143+
done
144+
129145
echo "✅ Static analysis completed successfully"
130146
131147
# --------------------------------------------------------------------
@@ -138,7 +154,7 @@ jobs:
138154
echo "| Analysis Details | Status |" >> $GITHUB_STEP_SUMMARY
139155
echo "|---|---|" >> $GITHUB_STEP_SUMMARY
140156
echo "| **Tool** | go vet (Official Go Static Analyzer) |" >> $GITHUB_STEP_SUMMARY
141-
echo "| **Execution** | Project packages only |" >> $GITHUB_STEP_SUMMARY
157+
echo "| **Execution** | Sequential (memory-optimized) |" >> $GITHUB_STEP_SUMMARY
142158
echo "| **Scope** | ./... (excludes dependencies) |" >> $GITHUB_STEP_SUMMARY
143159
echo "| **Result** | ✅ No issues found |" >> $GITHUB_STEP_SUMMARY
144160
echo "" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)