pre-commit/tests/languages
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
..
__init__.py OMG we're running a hook 2014-03-13 22:12:33 -07:00
conda_test.py test conda language directly 2023-01-17 13:05:49 -05:00
coursier_test.py coursier: additional_dependencies support 2023-01-17 09:59:04 -05:00
dart_test.py Make Dart pre-commit hook compatible with the latest Dart SDKs 2025-08-08 17:14:59 +09:00
docker_image_test.py fix docker_image test when ubuntu:22.04 image is not pre-pulled 2024-12-28 15:45:05 -05:00
docker_test.py Fix permission errors for mounts in rootless docker 2025-05-23 17:01:10 -04:00
dotnet_test.py update .net tests to use .net 8 2024-12-28 15:50:58 -05:00
fail_test.py test fail language inline 2023-02-13 17:03:59 -06:00
golang_test.py disable automatic toolchain switching for golang hooks 2024-11-25 18:47:18 -05:00
haskell_test.py Add haskell language support to pre-commit. 2023-07-22 16:28:48 -04:00
julia_test.py Julia language: skip startup.jl file 2025-08-02 14:35:27 -04:00
lua_test.py test lua directly 2023-01-17 23:43:31 -05:00
node_test.py Bump Node.js version to 18.14.0 and Go to 1.21.1 2023-09-25 17:02:13 +08:00
perl_test.py test perl language directly 2023-01-17 17:34:04 -05:00
pygrep_test.py test pygrep inline 2023-02-18 17:54:44 -05:00
python_test.py adjust python default_language_version to prefer versioned exe 2025-03-18 14:55:24 -04:00
r_test.py fix: ensure env patch is applied for vanilla emulation 2025-01-20 13:13:36 -05:00
ruby_test.py use a simpler gem for testing additional_dependencies 2024-04-29 21:28:16 -04:00
rust_test.py determine rust default language version independent of rust-toolchain.toml 2024-05-10 17:06:29 -04:00
script_test.py test things more directly to improve coverage 2023-02-20 18:18:08 -05:00
swift_test.py test swift language directly 2023-01-17 13:51:06 -05:00
system_test.py test things more directly to improve coverage 2023-02-20 18:18:08 -05:00