nix-direnv/lint.nix
2023-05-23 16:02:08 +02:00

24 lines
388 B
Nix

{ shellcheck
, mypy
, python3
, lib
, ruff
, runCommand
}:
runCommand "lint" {} ''
set -e
mkdir source
cp -r ${./.}/* source
chmod +w source
cd source
echo run shellcheck
${shellcheck}/bin/shellcheck direnvrc
echo run black
${lib.getExe python3.pkgs.black} --check .
echo run ruff
${lib.getExe ruff} tests
echo run mypy
${lib.getExe mypy} tests
touch $out
''