Releases: serokell/xrefcheck
v0.3.1
v0.3.0
- #176: Enabled
autolink
extension forcmark-gfm
, so now we're finding strings likewww.google.com
orhttps://google.com
, treating them as links and checking. - #175: Reorganize top-level config keys.
- #178: Rename exclusion-related config options.
- #183: Add support for image links.
- #199: Now annotation
<!-- xrefcheck: ignore all -->
instead of<!-- xrefcheck: ignore file -->
should be used to disable checking for links in file, so it's clearer that file itself is not ignored (and links can target it). - #215: Now we notify user when there are scannable files that were not added to Git yet. Also added CLI option
--include-untracked
to scan such files and treat as existing. - #191: Now we consider slash
/
(and only it) as path separator in local links for all OS, so xrefcheck's report is OS-independent. Use utf-8 compatible codepage on Windows. - #224: Now the program output does not contain unicode characters that are not widely supported.
- #229: Now we call references to anchors in current file (e.g.
[a](#b)
) asfile-local
references instead of calling themcurrent file
(which was ambiguous). - #233: Now xrefxcheck does not follow redirect links by default. It fails for permanent redirect responses (i.e. 301 and 308) and passes for temporary ones (i.e. 302, 303, 307).
- #231: Anchor analysis takes now into account the appropriate case-sensitivity depending on the configured Markdown flavour.
- #254: Now the
dump-config
command does not overwrite a file unless explicitly told with a--force
flag. Also, a--stdout
flag allows to print the config to stdout instead. - #250: Now the redirect behavior for external references can be modified via rules in the configuration file with the
externalRefRedirects
parameter. - #261: Symlinks are now not processed by the scanner.
- #268: Added CLI option
--color
that enables ANSI colors in output. Changed the output coloring defaults to show colors whenCI
env variable istrue
. - #271: Now Xrefcheck is able to follow relative redirects.
- #262: Now Xrefcheck includes a scanner that verifies the repository symlinks.
- #307: The output of Xrefcheck is now more legible. Add the
--print-unix-paths
(-u
) flag to print paths in Unix style (with forward slashes) on all platforms.
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.