[READ ONLY MIRROR] Open Source TikTok alternative built on AT Protocol github.com/sprksocial/client
flutter atproto video dart
10
fork

Configure Feed

Select the types of activity you want to include in your feed.

Better lint reporting on github (#39)

authored by

Davi Rodrigues and committed by
GitHub
db458e3b 1cc2bcb9

+60 -4
+60 -4
.github/workflows/flutter_lint.yml
··· 30 30 flutter-version: 3.29.2 31 31 cache: true 32 32 33 - - name: Analyze Changed Files 33 + - name: Run Flutter Analyze # Renamed and modified (was 'Analyze Changed Files') 34 + id: analyze_step 34 35 if: steps.changed_files.outputs.all_changed_files != '' 35 36 run: | 36 - echo "Found changed Dart files:" 37 - echo "${{ steps.changed_files.outputs.all_changed_files }}" # Output the list for debugging 38 - flutter analyze ${{ steps.changed_files.outputs.all_changed_files }} 37 + echo "Analyzing the following Dart files:" 38 + echo "${{ steps.changed_files.outputs.all_changed_files }}" 39 + # Run analyze and save output. Redirect stderr to stdout for capture. 40 + # Continue with '|| true' so the workflow doesn't stop if issues are found, 41 + # as we want to report them as annotations. 42 + flutter analyze ${{ steps.changed_files.outputs.all_changed_files }} > flutter_analyze_output.txt 2>&1 || true 43 + 44 + echo "--- Flutter Analyze Output (raw) ---" 45 + cat flutter_analyze_output.txt 46 + echo "------------------------------------" 47 + 48 + - name: Process Analyze Output, Annotate & Check Errors 49 + if: steps.changed_files.outputs.all_changed_files != '' 50 + run: | 51 + if [ ! -s flutter_analyze_output.txt ]; then 52 + echo "::debug::flutter_analyze_output.txt not found or is empty. No annotations to create or errors to check." 53 + exit 0 54 + fi 55 + 56 + echo "::debug::Starting annotation processing and error checking from flutter_analyze_output.txt" 57 + found_any_issue="false" # Flag to track if any issues (info, warning, error) are found 58 + 59 + while IFS= read -r line; do 60 + if [[ "$line" =~ ^[[:space:]]*(info|warning|error)[[:space:]]+•[[:space:]]+(.+)[[:space:]]+•[[:space:]]+([^:]+):([0-9]+):([0-9]+)[[:space:]]+•[[:space:]]+(.+)$ ]]; then 61 + found_any_issue="true" # Set flag if any issue is found 62 + type="${BASH_REMATCH[1]}" 63 + message_body="${BASH_REMATCH[2]}" 64 + file_path="${BASH_REMATCH[3]}" 65 + line_num="${BASH_REMATCH[4]}" 66 + col_num="${BASH_REMATCH[5]}" 67 + rule_id="${BASH_REMATCH[6]}" 68 + 69 + github_level="notice" # Default for 'info' 70 + if [ "$type" = "warning" ]; then 71 + github_level="warning" 72 + elif [ "$type" = "error" ]; then 73 + github_level="error" 74 + fi 75 + 76 + message_body_escaped="${message_body//'%'/'%25'}" 77 + message_body_escaped="${message_body_escaped//$'\r'/'%0D'}" 78 + message_body_escaped="${message_body_escaped//$'\n'/'%0A'}" 79 + 80 + echo "::$github_level file=$file_path,line=$line_num,col=$col_num,title=$rule_id::$message_body_escaped" 81 + elif [[ "$line" =~ issues\ found\.|\ Analyzing\ |^$|No\ issues\ found!|Looking\ for\ direct\ dependencies\ of|Running\ \"flutter\ pub\ get\"\ in ]]; then 82 + echo "::debug::Skipping known non-issue line: $line" 83 + else 84 + echo "::debug::Skipping unparseable line from flutter_analyze_output.txt: $line" 85 + fi 86 + done < flutter_analyze_output.txt 87 + echo "::debug::Finished annotation processing." 88 + 89 + if [ "$found_any_issue" = "true" ]; then 90 + echo "::error::Flutter analyze reported issues. See annotations for details. Failing workflow." 91 + exit 1 92 + else 93 + echo "::debug::No flutter analyze issues found. Workflow will pass." 94 + fi