git-hooks.nix icon indicating copy to clipboard operation
git-hooks.nix copied to clipboard

`dart-analyze`: fails when dependencies from pubspec.yaml need to be used

Open MrSom3body opened this issue 5 months ago • 0 comments

I'm currently working on a project of mine which makes use of ansix, which was added to the pubspec.yaml file. Running the dart analyze works, but enabling dart-analyze and running nix flake check fails.

Here are the checks:

{
  inputs,
  pkgs,
  ...
}: {
  pre-commit-check = inputs.git-hooks-nix.lib.${pkgs.system}.run {
    src = ../.;
    hooks = {
      # nix
      alejandra.enable = true;
      deadnix.enable = true;
      nil.enable = true;
      statix.enable = true;

      # dart
      dart-analyze.enable = true;
      dart-format.enable = true;

      # markdown
      markdownlint = {
        enable = true;
        settings.configuration = {
          line-length.tables = false;
          no-inline-html = false;
        };
      };
    };
  };
}

MrSom3body avatar May 06 '25 20:05 MrSom3body