-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from dataheld/factor-out-format
add formatting and linting
- Loading branch information
Showing
10 changed files
with
191 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# copied from https://github.com/numtide/treefmt-nix | ||
{ | ||
description = "treefmt-nix"; | ||
inputs.treefmt-nix.url = "github:numtide/treefmt-nix"; | ||
|
||
outputs = { | ||
self, | ||
nixpkgs, | ||
systems, | ||
treefmt-nix, | ||
}: let | ||
eachSystem = f: | ||
nixpkgs.lib.genAttrs (import systems) ( | ||
system: let | ||
pkgs = import nixpkgs { | ||
inherit system; | ||
config.allowUnfree = true; # Allows unfree packages | ||
}; | ||
in | ||
f pkgs | ||
); | ||
treefmtEval = eachSystem (pkgs: treefmt-nix.lib.evalModule pkgs ./treefmt.nix); | ||
in { | ||
formatter = eachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper); | ||
checks = eachSystem (pkgs: { | ||
formatting = treefmtEval.${pkgs.system}.config.build.check self; | ||
}); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# treefmt.nix | ||
{...}: { | ||
# Used to find the project root | ||
projectRootFile = ".git/config"; | ||
# keep-sorted start | ||
programs.actionlint.enable = true; | ||
programs.alejandra.enable = true; | ||
programs.beautysh.enable = true; | ||
programs.black.enable = true; | ||
programs.cmake-format.enable = true; | ||
programs.deadnix.enable = true; | ||
programs.hclfmt.enable = true; | ||
programs.isort.enable = true; | ||
programs.jsonfmt.enable = true; | ||
programs.keep-sorted.enable = true; | ||
programs.mdformat.enable = true; | ||
programs.prettier.enable = true; | ||
programs.shellcheck.enable = true; | ||
programs.shfmt.enable = true; | ||
programs.sqlfluff.enable = true; | ||
programs.terraform.enable = true; | ||
programs.toml-sort.enable = true; | ||
programs.yamlfmt.enable = true; | ||
# keep-sorted end | ||
} |
This file was deleted.
Oops, something went wrong.