pre-commit/tests
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
..
commands fix migrate-config for purelib yaml 2024-10-08 11:46:48 -04:00
languages Make Dart pre-commit hook compatible with the latest Dart SDKs 2025-08-08 17:14:59 +09:00
meta_hooks drop python 3.6 support 2022-01-18 18:44:20 -05:00
__init__.py Initial commit. 2014-03-12 20:25:19 -07:00
clientlib_test.py add warning for deprecated stages values in default_stages 2024-09-30 19:22:14 -04:00
color_test.py drop python 3.6 support 2022-01-18 18:44:20 -05:00
conftest.py replace log_info_mock with pytest's caplog 2024-09-30 19:58:16 -04:00
envcontext_test.py drop python 3.6 support 2022-01-18 18:44:20 -05:00
error_handler_test.py Remove expected_returncode from CalledProcessError 2022-10-30 15:31:45 -05:00
git_test.py fix: crash on ambiguous ref 'HEAD' 2025-03-15 15:23:15 -04:00
lang_base_test.py Refactor target_concurrency tests 2023-09-10 08:39:19 -04:00
logging_handler_test.py drop python 3.6 support 2022-01-18 18:44:20 -05:00
main_test.py make --hook-type and stages match 2023-03-11 14:26:14 -05:00
output_test.py drop python 3.6 support 2022-01-18 18:44:20 -05:00
parse_shebang_test.py use sys.executable instead of echo.exe in parse_shebang 2023-10-09 16:49:30 -04:00
prefix_test.py drop python 3.6 support 2022-01-18 18:44:20 -05:00
repository_test.py remove deprecated python_venv alias 2024-10-05 13:30:25 -04:00
staged_files_only_test.py staged_files_only can handle a crlf-only diff 2024-02-10 14:01:49 -05:00
store_test.py add warning for deprecates stages for remote repos on init 2024-09-30 20:41:50 -04:00
util_test.py fix trailing whitespace in CalledProcessError output 2023-02-21 12:42:09 -05:00
xargs_test.py Refactor target_concurrency tests 2023-09-10 08:39:19 -04:00
yaml_rewrite_test.py change migrate-config to use yaml parse tree instead 2024-09-16 20:16:16 -04:00