mirror of
https://github.com/kuhyx/utils.git
synced 2026-11-10 18:07:24 +01:00
Android AccountManager ID token for Firebase signInWithIdp, extracted from todo so the sync apps stop copying the Kotlin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WzxdWY1k4muZfdVJfb7YGJ
62 lines
2.3 KiB
YAML
62 lines
2.3 KiB
YAML
# Pre-commit Configuration for google_account_token
|
|
# Install: pre-commit install && pre-commit install --hook-type pre-push
|
|
# Run: pre-commit run --all-files
|
|
|
|
# NOTE: this subproject lives inside the ~/src/utils monorepo, whose git root is
|
|
# one level up. pre-commit always runs hooks from the git root, so every path
|
|
# below is written relative to THAT, not to this directory, and the top-level
|
|
# `files` key keeps these hooks off the sibling subprojects. CI invokes this
|
|
# config exactly the same way:
|
|
# pre-commit run --config google_account_token/.pre-commit-config.yaml --all-files
|
|
files: ^google_account_token/
|
|
|
|
default_stages: [pre-commit]
|
|
fail_fast: false
|
|
|
|
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v4.6.0
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
args: [--markdown-linebreak-ext=md]
|
|
- id: end-of-file-fixer
|
|
- id: check-yaml
|
|
- id: check-merge-conflict
|
|
- id: mixed-line-ending
|
|
args: [--fix=lf]
|
|
|
|
- repo: local
|
|
hooks:
|
|
- id: file-length-cap
|
|
name: file length <= 250 lines
|
|
entry: bash scripts/check_file_length.sh
|
|
language: system
|
|
pass_filenames: true
|
|
- id: subproject-scope
|
|
name: subproject scope regex still matches
|
|
entry: scripts/check_subproject_scope.sh google_account_token
|
|
language: script
|
|
# always_run so the top-level `files` filter cannot skip the one hook
|
|
# whose job is to notice that filter has stopped matching anything.
|
|
always_run: true
|
|
pass_filenames: false
|
|
- id: dart-format
|
|
name: dart format --set-exit-if-changed
|
|
entry: bash -c 'cd google_account_token && dart format --set-exit-if-changed lib test'
|
|
language: system
|
|
pass_filenames: false
|
|
- id: flutter-analyze
|
|
name: flutter analyze
|
|
entry: bash -c 'cd google_account_token && flutter analyze'
|
|
language: system
|
|
pass_filenames: false
|
|
- id: flutter-test-coverage
|
|
name: flutter test --coverage with 100% line-coverage gate
|
|
entry: >-
|
|
bash -c 'cd google_account_token && flutter test --coverage &&
|
|
scripts/check_coverage.sh coverage/lcov.info 100'
|
|
language: system
|
|
pass_filenames: false
|
|
require_serial: true
|
|
stages: [pre-push]
|