Make lint run
Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
parent
6813a9ed43
commit
4e968aaea0
6 changed files with 66 additions and 7 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -215,7 +215,7 @@ dependencies = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dashmap_ref"
|
name = "dashmap-ref"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clippy_utils",
|
"clippy_utils",
|
||||||
|
|
|
||||||
|
|
@ -3,3 +3,9 @@
|
||||||
members = [ "hakari" , "lints/*" ]
|
members = [ "hakari" , "lints/*" ]
|
||||||
|
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
|
[workspace.package]
|
||||||
|
version = "0.1.0"
|
||||||
|
|
||||||
|
[workspace.metadata.crane]
|
||||||
|
name = "dylints-various"
|
||||||
|
|
|
||||||
57
flake.nix
57
flake.nix
|
|
@ -32,6 +32,9 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
inherit (pkgs) lib;
|
||||||
|
|
||||||
|
toolchain = (builtins.fromTOML (builtins.readFile ./rust-toolchain.toml)).toolchain.channel;
|
||||||
rustTarget = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
rustTarget = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
||||||
|
|
||||||
dylintLib = inputs.dylint.mkLib {
|
dylintLib = inputs.dylint.mkLib {
|
||||||
|
|
@ -39,7 +42,57 @@
|
||||||
inherit (inputs) crane;
|
inherit (inputs) crane;
|
||||||
};
|
};
|
||||||
|
|
||||||
lints = [ ];
|
craneLib = (inputs.crane.mkLib pkgs).overrideToolchain rustTarget;
|
||||||
|
|
||||||
|
src = craneLib.cleanCargoSource ./.;
|
||||||
|
|
||||||
|
commonLintArgs = {
|
||||||
|
inherit src;
|
||||||
|
strictDeps = true;
|
||||||
|
|
||||||
|
buildInputs = [ pkgs.openssl ];
|
||||||
|
nativeBuildInputs = [ pkgs.pkg-config ];
|
||||||
|
|
||||||
|
DOCS_RS = "true";
|
||||||
|
RUSTUP_TOOLCHAIN = toolchain;
|
||||||
|
};
|
||||||
|
|
||||||
|
cargoArtifacts = craneLib.buildDepsOnly commonLintArgs;
|
||||||
|
|
||||||
|
individualLintArgs = commonLintArgs // {
|
||||||
|
inherit cargoArtifacts;
|
||||||
|
inherit (craneLib.crateNameFromCargoToml { inherit src; }) version;
|
||||||
|
|
||||||
|
doCheck = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSetForCrate =
|
||||||
|
crate:
|
||||||
|
lib.fileset.toSource {
|
||||||
|
root = ./.;
|
||||||
|
fileset = lib.fileset.unions [
|
||||||
|
./Cargo.lock
|
||||||
|
./Cargo.toml
|
||||||
|
(craneLib.fileset.commonCargoSources ./hakari)
|
||||||
|
(craneLib.fileset.commonCargoSources crate)
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
dashmap-ref = craneLib.buildPackage (
|
||||||
|
individualLintArgs
|
||||||
|
// {
|
||||||
|
pname = "dashmap-ref";
|
||||||
|
cargoExtraArgs = "-p dashmap-ref";
|
||||||
|
src = fileSetForCrate ./lints/dashmap-ref;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
lints = [
|
||||||
|
{
|
||||||
|
inherit toolchain;
|
||||||
|
package = dashmap-ref;
|
||||||
|
}
|
||||||
|
];
|
||||||
dylint = dylintLib.mkDylint { inherit lints; };
|
dylint = dylintLib.mkDylint { inherit lints; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
@ -49,6 +102,8 @@
|
||||||
dylint
|
dylint
|
||||||
|
|
||||||
pkgs.cargo-hakari
|
pkgs.cargo-hakari
|
||||||
|
pkgs.openssl
|
||||||
|
pkgs.pkg-config
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
[package]
|
[package]
|
||||||
name = "dashmap_ref"
|
name = "dashmap-ref"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
[toolchain]
|
|
||||||
channel = "nightly-2025-01-09"
|
|
||||||
components = ["llvm-tools-preview", "rustc-dev"]
|
|
||||||
|
|
@ -1,2 +1,3 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "1.85.0"
|
channel = "nightly-2025-01-09"
|
||||||
|
components = ["llvm-tools-preview", "rustc-dev"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue