Skip to content

Commit 3714692

Browse files
committed
Merge bitcoin/bitcoin#30380: lint: Ignore files ignored by git in the Markdown Link Checker
dea7afd lint: remove unneeded trailing line fix (willcl-ark) 4d94254 lint: ignore files ignored by git in mlc (willcl-ark) Pull request description: Updating to MLC v0.18.0 includes a new feature which will ignore all files ignored by git: `mlc --gitignore`. This helps avoid false-positives flagged by this linter in non-project files, such as a developer might expect to have in their working directory (e.g. guix-builds, python venvs, etc.) Top commit has no ACKs. Tree-SHA512: 1752448e0c85abd3c73570a17cc69294de2248d7773c6499833ae33806f6c03f3f345261aa7b855a557b45982fbdcb8190e758d087c43b4fb0254fbb39173432
2 parents 173ab0c + dea7afd commit 3714692

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

ci/lint/04_install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ curl -sL "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_
5858
tar --xz -xf - --directory /tmp/
5959
mv "/tmp/shellcheck-${SHELLCHECK_VERSION}/shellcheck" /usr/bin/
6060

61-
MLC_VERSION=v0.16.3
61+
MLC_VERSION=v0.18.0
6262
MLC_BIN=mlc-x86_64-linux
6363
curl -sL "https://github.com/becheran/mlc/releases/download/${MLC_VERSION}/${MLC_BIN}" -o "/usr/bin/mlc"
6464
chmod +x /usr/bin/mlc

test/lint/test_runner/src/main.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,7 @@ fn lint_markdown() -> LintResult {
410410
"--offline",
411411
"--ignore-path",
412412
md_ignore_path_str.as_str(),
413+
"--gitignore",
413414
"--root-dir",
414415
".",
415416
])
@@ -419,11 +420,6 @@ fn lint_markdown() -> LintResult {
419420
Ok(output) if output.status.success() => Ok(()),
420421
Ok(output) => {
421422
let stderr = String::from_utf8_lossy(&output.stderr);
422-
let filtered_stderr: String = stderr // Filter out this annoying trailing line
423-
.lines()
424-
.filter(|&line| line != "The following links could not be resolved:")
425-
.collect::<Vec<&str>>()
426-
.join("\n");
427423
Err(format!(
428424
r#"
429425
One or more markdown links are broken.
@@ -433,7 +429,7 @@ Relative links are preferred (but not required) as jumping to file works nativel
433429
Markdown link errors found:
434430
{}
435431
"#,
436-
filtered_stderr
432+
stderr
437433
))
438434
}
439435
Err(e) if e.kind() == ErrorKind::NotFound => {

0 commit comments

Comments
 (0)