Skip to content

Commit

Permalink
nix: added formatting.all (#1287)
Browse files Browse the repository at this point in the history
One can run:
```
nix build .\#hydraJobs.x86_64-linux.native.formatting.all
```
to check all formatters.
  • Loading branch information
coot authored Oct 21, 2024
2 parents 3b8f972 + 875be67 commit b0884a3
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions nix/formatting.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,17 @@ let
echo $EXIT_CODE > $out
fi
'';
formatting = {
stylish = checkFormatting pkgs.stylish-haskell ../scripts/ci/run-stylish.sh;
cabal-gild = checkFormatting pkgs.cabal-gild ../scripts/ci/run-cabal-gild.sh;
nixpkgs-fmt = checkFormatting pkgs.nixpkgs-fmt ../scripts/ci/run-nixpkgs-fmt.sh;
dos2unix = checkFormatting pkgs.dos2unix ../scripts/ci/run-dos2unix.sh;
};
in
{
stylish = checkFormatting pkgs.stylish-haskell ../scripts/ci/run-stylish.sh;
cabal-gild = checkFormatting pkgs.cabal-gild ../scripts/ci/run-cabal-gild.sh;
nixpkgs-fmt = checkFormatting pkgs.nixpkgs-fmt ../scripts/ci/run-nixpkgs-fmt.sh;
dos2unix = checkFormatting pkgs.dos2unix ../scripts/ci/run-dos2unix.sh;
formatting // {
all = pkgs.releaseTools.aggregate {
name = "consensus-formatting";
meta.description = "Run all formatters";
constituents = lib.collect lib.isDerivation formatting;
};
}

0 comments on commit b0884a3

Please sign in to comment.