-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Problem: when the repository contains a symlink to a markdown file, it is processed by xrefcheck as if it was the same markdown file but in the symlink's location. This leads to broken references and can be avoided because neither GitHub nor GitLab try to render symlinks as the file they point to. Solution: consider symlinks as no scannable files. In the future, we will consider to include a new dedicated scanner for symlinks if it works.
- Loading branch information
Showing
7 changed files
with
58 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bats | ||
|
||
# SPDX-FileCopyrightText: 2022 Serokell <https://serokell.io> | ||
# | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
load '../helpers/bats-support/load' | ||
load '../helpers/bats-assert/load' | ||
load '../helpers/bats-file/load' | ||
load '../helpers' | ||
|
||
|
||
@test "Checking that symlinks are not processed" { | ||
to_temp xrefcheck -v | ||
|
||
assert_diff expected.gold | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- | ||
- SPDX-FileCopyrightText: 2022 Serokell <https://serokell.io> | ||
- | ||
- SPDX-License-Identifier: MPL-2.0 | ||
--> | ||
|
||
[Empty file](a) | ||
|
||
[Symlink ref](../s.md) | ||
|
||
[Symlink ref with anchor](../s.md#a) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
=== Repository data === | ||
|
||
dir/b.md: | ||
- references: | ||
- reference (relative) at src:7:1-15: | ||
- text: "Empty file" | ||
- link: a | ||
- anchor: - | ||
- reference (relative) at src:9:1-22: | ||
- text: "Symlink ref" | ||
- link: ../s.md | ||
- anchor: - | ||
- reference (relative) at src:11:1-36: | ||
- text: "Symlink ref with anchor" | ||
- link: ../s.md | ||
- anchor: a | ||
- anchors: | ||
none | ||
|
||
All repository links are valid. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dir/b.md |