Files -> App Files. Cleanup pubspec. #7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Lint Checks | |
| on: | |
| push: | |
| pull_request: | |
| types: [opened, reopened, synchronize] | |
| env: | |
| FLUTTER_VERSION: '3.38.9' | |
| jobs: | |
| analyze: | |
| runs-on: ubuntu-latest | |
| if: github.event.repository.private == false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| channel: 'stable' | |
| flutter-version: ${{env.FLUTTER_VERSION}} | |
| - run: flutter pub get | |
| - run: flutter analyze --fatal-infos | |
| format: | |
| runs-on: ubuntu-latest | |
| if: github.event.repository.private == false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| channel: 'stable' | |
| flutter-version: ${{env.FLUTTER_VERSION}} | |
| - run: flutter pub get | |
| - run: dart format --set-exit-if-changed . | |
| unused_code: | |
| runs-on: ubuntu-latest | |
| if: github.event.repository.private == false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| channel: 'stable' | |
| flutter-version: ${{env.FLUTTER_VERSION}} | |
| - run: flutter pub get | |
| - run: dart pub global activate dart_code_metrics | |
| - run: metrics check-unused-code --disable-sunset-warning lib | |
| unused_files: | |
| runs-on: ubuntu-latest | |
| if: github.event.repository.private == false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| channel: 'stable' | |
| flutter-version: ${{env.FLUTTER_VERSION}} | |
| - run: flutter pub get | |
| - run: dart pub global activate dart_code_metrics | |
| - run: metrics check-unused-files --disable-sunset-warning lib | |
| import_order: | |
| runs-on: ubuntu-latest | |
| if: github.event.repository.private == false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| channel: 'stable' | |
| flutter-version: ${{env.FLUTTER_VERSION}} | |
| - run: flutter pub get | |
| - run: dart pub global activate import_order_lint | |
| - run: import_order --check | |
| markdown: | |
| runs-on: ubuntu-latest | |
| if: github.event.repository.private == false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| - run: npm install -g markdownlint-cli | |
| - run: markdownlint *.md lib assets | |
| link_checker: | |
| runs-on: ubuntu-latest | |
| if: github.event.repository.private == false | |
| permissions: | |
| issues: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Link Checker | |
| id: lychee | |
| uses: lycheeverse/lychee-action@v2 | |
| with: | |
| args: | |
| --no-progress | |
| '*.md' | |
| './**/*.dart' | |
| fail: true | |
| locmax: | |
| runs-on: ubuntu-latest | |
| if: github.event.repository.private == false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: make locmax | |
| copyright: | |
| runs-on: ubuntu-latest | |
| if: github.event.repository.private == false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check copyright headers | |
| run: | | |
| missing_copyright=$(find lib -type f -name '*.dart' \ | |
| ! -name '*.g.dart' \ | |
| ! -name '*.gr.dart' \ | |
| ! -name '*.freezed.dart' \ | |
| ! -name '*.chopper.dart' \ | |
| ! -name '*.part.dart' \ | |
| ! -name '*.config.dart' \ | |
| -exec grep -L "Copyright" {} \;) | |
| if [ -n "$missing_copyright" ]; then | |
| echo "Files missing copyright headers:" | |
| echo "$missing_copyright" | |
| exit 1 | |
| else | |
| echo "All non-generated Dart files have copyright headers" | |
| fi |