A framework for managing and maintaining multi-language pre-commit hooks.
Find a file
Byoungchan Lee f1cc7a445f Make Dart pre-commit hook compatible with the latest Dart SDKs
Dart introduced sound null safety in version 2.12.0, and as of Dart 3,
null safety is mandatory. Older Dart SDKs allowed both pre-null safety
and null-safe packages, but modern Dart SDKs, where most source code is
null-safe, now reject pre-null safety packages.

The current `pubspec.yaml` template with `sdk: '>=2.10.0'` is
incompatible with recent Dart SDKs, leading to the following error:

An unexpected error has occurred: CalledProcessError: command: ('/path/to/dart-sdk/bin/dart', 'pub', 'get')
return code: 65
stdout:
    Resolving dependencies...
stderr:
    The lower bound of "sdk: '>=2.10.0'" must be 2.12.0'
    or higher to enable null safety.

    The current Dart SDK (3.8.3) only supports null safety.

    For details, see https://dart.dev/null-safety

To ensure compatibility with the modern Dart ecosystem, this commit
updates the minimum Dart SDK version to 2.12.0 or higher,
which implicitly supports null safety.
Additionally, `testing/get-dart.sh` has been updated to verify that
the pre-commit hook functions correctly with the latest Dart versions.
2025-08-08 17:14:59 +09:00
.github upgrade asottile/workflows 2025-01-30 14:58:50 -05:00
pre_commit Make Dart pre-commit hook compatible with the latest Dart SDKs 2025-08-08 17:14:59 +09:00
testing Make Dart pre-commit hook compatible with the latest Dart SDKs 2025-08-08 17:14:59 +09:00
tests Make Dart pre-commit hook compatible with the latest Dart SDKs 2025-08-08 17:14:59 +09:00
.gitignore remove unneeded gitignore lines 2022-03-13 19:55:30 -04:00
.pre-commit-config.yaml [pre-commit.ci] pre-commit autoupdate 2025-08-04 20:31:31 +00:00
.pre-commit-hooks.yaml deprecate pre-commit-validate-{config,manifest} 2022-04-24 19:08:47 -04:00
CHANGELOG.md v4.2.0 2025-03-18 17:34:49 -04:00
CONTRIBUTING.md fix typo in CONTRIBUTING.md 2023-08-14 11:00:17 +01:00
LICENSE MIT 2014-06-05 08:57:40 -07:00
README.md azure pipelines -> github actions 2022-12-29 22:18:31 -05:00
requirements-dev.txt always use #!/bin/sh on windows 2022-01-05 13:22:49 -05:00
setup.cfg [pre-commit.ci] auto fixes from pre-commit.com hooks 2025-03-31 19:44:12 +00:00
setup.py drop python 3.6 support 2022-01-18 18:44:20 -05:00
tox.ini show 20 slowest durations in CI 2023-03-09 11:00:31 -05:00

build status pre-commit.ci status

pre-commit

A framework for managing and maintaining multi-language pre-commit hooks.

For more information see: https://pre-commit.com/