Skip to content

Commit

Permalink
hooks: add psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
gaelreyrol committed Aug 26, 2023
1 parent 108539f commit 13cee77
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ use nix
- [phpcbf](https://github.com/squizlabs/PHP_CodeSniffer)
- [phpcs](https://github.com/squizlabs/PHP_CodeSniffer)
- [phpstan](https://github.com/phpstan/phpstan)
- [psalm](https://github.com/vimeo/psalm)

## Rust

Expand Down
22 changes: 22 additions & 0 deletions modules/hooks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,19 @@ in
};
};

psalm =
{
binPath =
mkOption {
type = types.str;
description = lib.mdDoc "Psalm binary path.";
default = "${pkgs.php82Packages.psalm}/bin/psalm";
defaultText = lib.literalExpression ''
"''${pkgs.php81Packages.phpstan}/bin/psalm"
'';
};
};

pylint =
{
binPath =
Expand Down Expand Up @@ -1561,6 +1574,15 @@ in
types = [ "php" ];
};

psalm =
{
name = "psalm";
description = "Static Analysis of PHP files.";
entry = with settings.psalm;
"${binPath}";
types = [ "php" ];
};


pylint =
{
Expand Down

0 comments on commit 13cee77

Please sign in to comment.