mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-17 10:40:33 +03:00
rust-analyzer: enable check by default
This commit is contained in:
parent
b7efa4755c
commit
4b8c79896c
@ -1,8 +1,7 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices, cmake
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices, cmake
|
||||||
, libiconv
|
, libiconv
|
||||||
, useMimalloc ? false
|
, useMimalloc ? false
|
||||||
# FIXME: Test doesn't pass under rustc 1.52.1 due to different escaping of `'` in string.
|
, doCheck ? true
|
||||||
, doCheck ? false
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
@ -17,9 +16,16 @@ rustPlatform.buildRustPackage rec {
|
|||||||
sha256 = "sha256-6Tbgy77Essi3Hyd5kdJ7JJbx7RuFZQWURfRrpScvPPQ=";
|
sha256 = "sha256-6Tbgy77Essi3Hyd5kdJ7JJbx7RuFZQWURfRrpScvPPQ=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Code format and git history check require more dependencies but don't really matter for packaging.
|
||||||
|
# So just ignore them.
|
||||||
|
./ignore-git-and-rustfmt-tests.patch
|
||||||
|
];
|
||||||
|
|
||||||
buildAndTestSubdir = "crates/rust-analyzer";
|
buildAndTestSubdir = "crates/rust-analyzer";
|
||||||
|
|
||||||
cargoBuildFlags = lib.optional useMimalloc "--features=mimalloc";
|
cargoBuildFlags = lib.optional useMimalloc "--features=mimalloc";
|
||||||
|
cargoTestFlags = lib.optional useMimalloc "--features=mimalloc";
|
||||||
|
|
||||||
nativeBuildInputs = lib.optional useMimalloc cmake;
|
nativeBuildInputs = lib.optional useMimalloc cmake;
|
||||||
|
|
||||||
|
@ -0,0 +1,18 @@
|
|||||||
|
--- a/crates/rust-analyzer/tests/slow-tests/tidy.rs
|
||||||
|
+++ b/crates/rust-analyzer/tests/slow-tests/tidy.rs
|
||||||
|
@@ -6,6 +6,7 @@ use std::{
|
||||||
|
use xshell::{cmd, pushd, pushenv, read_file};
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
+#[ignore]
|
||||||
|
fn check_code_formatting() {
|
||||||
|
let _dir = pushd(sourcegen::project_root()).unwrap();
|
||||||
|
let _e = pushenv("RUSTUP_TOOLCHAIN", "stable");
|
||||||
|
@@ -138,6 +139,7 @@ fn check_cargo_toml(path: &Path, text: String) -> () {
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
+#[ignore]
|
||||||
|
fn check_merge_commits() {
|
||||||
|
let stdout = cmd!("git rev-list --merges --invert-grep --author 'bors\\[bot\\]' HEAD~19..")
|
||||||
|
.read()
|
Loading…
Reference in New Issue
Block a user