Releases: serokell/xrefcheck
auto-release
Automatic release on "202411191251"
v0.2.2
Artifacts
New features
- Added support for footnotes.
- Tighter git integration. Xrefcheck now ignores all files not being tracked by git.
References from these files will not be checked; references to these files will fail verification. - Added the
--no-color
option to disable ANSI-colored text.
Bug fixes and improvements
- Xrefcheck will no longer fail when it encountes a local link to a file with a trailing slash.
- Xrefcheck was accidentally verifying links to files matching the
--ignored
CLI option or theignored
config option.
This has been fixed; such links will now be reported as invalid. - Do not print ANSI-colored text when the terminal doesn't support coloring.
- Fail if the config file contains unknown fields / field names with typos.
- Fixed async bug where the output would sometimes look like a mess
- The
--ignored
CLI option and theignored
/notScanned
/virtualFiles
config fields now only accept relative paths/glob patterns. Absolute paths/patterns will be rejected. - Glob patterns are now compiled in "strict" mode. See migration guide below.
- Verification will now fail for local links that "escape" the root directory, e.g.
[invalid-link](./../xrefcheck/README.md)
. - The
scanners.markdown.flavor
config option is now required.
Migrating from 0.2.1
git integration
Xrefcheck now uses git to determine which files it should analyze and which it should ignore.
Please make sure you have git
2.18.0 or later in your PATH.
Furthermore, if you were using --ignored
to ignore a file that may exist locally, but is not tracked by git, you don't need to use --ignore
anymore.
Config file
If you have a .xrefcheck.yaml
/ xrefcheck.yaml
config file in your repo:
- you can now remove
.git/**/*
and.stack-work/**/*
from theignored
list. - make sure the
scanners.markdown.flavor
field is set.
Glob patterns
If you were using glob patterns in any CLI option / config field, beware these are now compiled
in "strict" mode.
For example, xrefcheck --ignored '[abc'
would previously ignore a file literally named [abc
,
but this will now be interpreted as an invalid glob pattern (unclosed character range) and rejected.
To fix it, escape any reserved characters by wrapping them in square brackets: xrefcheck --ignored '[[]abc'
.
ignore link
annotations
If you had an ignore link
annotation that didn't immediately preceed the paragraph with the link to ignore, xrefcheck 0.2.2 will now fail.
<!-- xrefcheck: ignore link -->
foo
bar [link](link)
Expected a LINK after "ignore link" annotation
To fix this, move the annotation closer to the paragraph with the link:
foo
<!-- xrefcheck: ignore link -->
bar [link](link)
v0.2.1
New features
- Add support for FTP / FTPS.
- Handle "429 Too Many Requests" - backoff and retry.
- Ignore localhost links by default.
- This can be disabled by editing the option
ignoreRefs
.
- This can be disabled by editing the option
- Add the option
ignoreAuthFailures
.- When enabled, it assumes links that return "401 Unauthorized" or "403 Forbidden" are valid.
- Enabled by default.
- Add support for the
id
attribute in anchors tags inside headers. - The
ignored
andnotScanned
options now accept glob patterns.
Bug fixes and improvements
- All config options are now optional.
- Handle links with non-encoded
[
and]
in the query string. - Ensure
--root
is a directory and not a file. - Fix bug when prefixing
--ignored
and--root
paths with./
. - Fix bug when suffixing
--root
paths with/
. - Improve parsing of anchor html tags inside headers.
- Cache verification results, avoid verifying the same link twice.
- Instead of stopping when a scanning error is encountered, continue and print all scanning errors to stdout.
Migrating from 0.2
- You can now delete all config fields that you're not using from
.xrefcheck.yaml
/xrefcheck.yaml
. Their default values will be used. - If you were using the
ignored
/notScanned
config options or the--ignored
CLI option, please replace their arguments with glob patterns.- E.g., to ignore a directory, replace
--ignored dir
with--ignored dir/**/*
- E.g., to ignore a directory, replace
v0.2
Take some differences between GitHub and GitLab Markdown flavors into account.
0.1.3
- Make it possible to ignore links, either from config or via in-place Markdown comments.
0.1.2
- Automatically detect whether progress reporting should be enabled by default.
- Removed some dependencies, supported newer dependencies.
0.1.1
- Fixed encoding issues.
- Added
--ignored
option.
0.1.0.0
Initial release.