Skip to content

v0.2.2

Latest
Compare
Choose a tag to compare
@serokell-bot serokell-bot released this 25 Oct 12:27
· 124 commits to master since this release
887803d

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 the ignored 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 the ignored/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 the ignored 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)