Skip to content

Commit

Permalink
check clang-tidy-fix in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Dec 11, 2024
1 parent 0af2bb9 commit 1ddc620
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,33 @@

checks = builtins.removeAttrs self'.packages [ "default" ] // {
shell = self'.devShells.default;
clang-tidy-fix = self'.packages.nix-eval-jobs.overrideAttrs (old: {
nativeBuildInputs = old.nativeBuildInputs ++ [
pkgs.git
(lib.hiPrio pkgs.llvmPackages_latest.clang-tools)
];
buildPhase = ''
export HOME=$TMPDIR
cat > $HOME/.gitconfig <<EOF
[user]
name = Nix
email = nix@localhost
[init]
defaultBranch = main
EOF
pushd ..
git init
git add .
git commit -m init --quiet
popd
ninja clang-tidy-fix
git status
git --no-pager diff --exit-code
'';
installPhase = ''
touch $out
'';
});
};
};
};
Expand Down

0 comments on commit 1ddc620

Please sign in to comment.