Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include clippy lints for tests #28

Merged
merged 2 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ rustPlatform.buildRustPackage {
preCheck = initNix;
postCheck = ''
cargo fmt --check
cargo clippy -- -D warnings
# --tests or --all-targets include tests for linting
cargo clippy --all-targets -- -D warnings
'';
postInstall = ''
wrapProgram $out/bin/nixpkgs-check-by-name \
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ mod tests {
let temp_nixpkgs = tempdir()?;
let path = temp_nixpkgs.path();

if is_case_insensitive_fs(&path)? {
if is_case_insensitive_fs(path)? {
eprintln!("We're on a case-insensitive filesystem, skipping case-sensitivity test");
return Ok(());
}
Expand All @@ -223,7 +223,7 @@ mod tests {

test_nixpkgs(
"case_sensitive",
&path,
path,
"pkgs/by-name/fo: Duplicate case-sensitive package directories \"foO\" and \"foo\".\nThis PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break.\n",
)?;

Expand Down