File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Static Analysis
2+
3+ on :
4+ push :
5+ branches : [ master, main ]
6+ pull_request :
7+ branches : [ master, main ]
8+
9+ jobs :
10+ static-analysis :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Checkout code
15+ uses : actions/checkout@v4
16+
17+ - name : Set up JDK 22
18+ uses : actions/setup-java@v4
19+ with :
20+ java-version : 22
21+ distribution : ' temurin'
22+
23+ - name : Cache Gradle packages
24+ uses : actions/cache@v4
25+ with :
26+ path : |
27+ ~/.gradle/caches
28+ ~/.gradle/wrapper
29+ key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
30+ restore-keys : |
31+ ${{ runner.os }}-gradle-
32+
33+ - name : Make gradlew executable
34+ run : chmod +x gradlew
35+
36+ - name : Run static analysis
37+ run : |
38+ echo "Running basic static analysis..."
39+ ./gradlew build -x test
40+ echo "✅ Build successful - no compilation errors"
41+
42+ echo "Checking for common issues..."
43+ # Check for TODO/FIXME comments
44+ echo "📋 TODO/FIXME comments found:"
45+ find src -name "*.java" -o -name "*.kt" | xargs grep -n -i "todo\|fixme" || echo "None found"
46+
47+ # Check for System.out.println usage (should use logging)
48+ echo "🖨️ System.out.println usage:"
49+ find src -name "*.java" | xargs grep -n "System\.out\.println" || echo "None found (good!)"
50+
51+ # Check for printStackTrace usage
52+ echo "🐛 printStackTrace usage:"
53+ find src -name "*.java" -o -name "*.kt" | xargs grep -n "printStackTrace" || echo "None found (good!)"
54+
55+ echo "✅ Static analysis completed"
You can’t perform that action at this time.
0 commit comments