Skip to content

Commit

Permalink
Merge pull request #507 from nix-community/joerg-ci
Browse files Browse the repository at this point in the history
flake.lock: Update
  • Loading branch information
Mic92 authored Jul 14, 2024
2 parents 4fabc9b + ad378cf commit 104a507
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 29 deletions.
18 changes: 9 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 8 additions & 20 deletions treefmt.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
{ lib, inputs, ... }: {
{ inputs, ... }: {
imports = [
inputs.treefmt-nix.flakeModule
];

perSystem = { pkgs, ... }: {
perSystem = {
treefmt = {
# Used to find the project root
projectRootFile = "flake.lock";
projectRootFile = ".git/config";

programs = {
deadnix.enable = true;
deno.enable = true;
mypy.enable = true;
ruff.check = true;
ruff.format = true;
nixpkgs-fmt.enable = true;
shellcheck.enable = true;
shfmt.enable = true;
Expand All @@ -20,25 +22,11 @@

settings.formatter =
let
sh-includes = [ "*.sh" "direnvrc" ];
shellIncludes = [ "*.sh" "direnvrc" ];
in
{
python = {
command = "sh";
options = [
"-eucx"
''
${lib.getExe pkgs.ruff} --fix "$@"
${lib.getExe pkgs.ruff} format "$@"
''
"--" # this argument is ignored by bash
];
includes = [ "*.py" ];
};

shellcheck.includes = sh-includes;

shfmt.includes = sh-includes;
shellcheck.includes = shellIncludes;
shfmt.includes = shellIncludes;
};
};
};
Expand Down

0 comments on commit 104a507

Please sign in to comment.