diff options
author | Jade Lovelace <lix@jade.fyi> | 2024-08-01 15:02:28 -0700 |
---|---|---|
committer | Jade Lovelace <lix@jade.fyi> | 2024-08-08 14:53:17 -0700 |
commit | f3ef0899c744ff5256414c8539c75e798a058ee0 (patch) | |
tree | faabcb695aaaf4267c8c70022314e399af2feca6 /flake.nix | |
parent | 6fdb47f0b259a9ffbe4bdb349d6aaf03a0144092 (diff) |
build: integrate clang-tidy into CI
This still has utterly unacceptably bad output format design that I
would not inflict on anyone I like, but it *does* now exist, and you
*can* find the errors in the log.
Future work would obviously be to fix that and integrate the actual
errors into Gerrit using codechecker or so.
Followup issue: https://git.lix.systems/lix-project/lix/issues/457
Fixes: https://git.lix.systems/lix-project/lix/issues/147
Change-Id: Ifca22e443d357762125f4ad6bc4f568af3a26c62
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -282,6 +282,10 @@ # cheaper x86_64-linux compute in CI. # It is clangStdenv because clang's sanitizers are nicer. asanBuild = self.packages.x86_64-linux.nix-clangStdenv.override { + # Improve caching of non-code changes by not changing the + # derivation name every single time, since this will never be seen + # by users anyway. + versionSuffix = ""; sanitize = [ "address" "undefined" @@ -310,6 +314,17 @@ touch $out ''; + # clang-tidy run against the Lix codebase using the Lix clang-tidy plugin + clang-tidy = + let + nixpkgs = nixpkgsFor.x86_64-linux.native; + inherit (nixpkgs) pkgs; + in + pkgs.callPackage ./package.nix { + versionSuffix = ""; + lintInsteadOfBuild = true; + }; + # Make sure that nix-env still produces the exact same result # on a particular version of Nixpkgs. evalNixpkgs = |