linkcheck

command module
v1.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2023 License: MIT Imports: 8 Imported by: 0

README

This linter is a golang markdown link verifier. The goal of this linter is to verify links mentioned in markdown documentation are working properly, alive and not stale.

This linter is easily used and envoked with MegaLinter as it contains a MegaLinter descriptor.

NOTE: Originally created and currently running on the CSE playbook.

Process

When running only linkcheck:

  1. By default, the checker will use the configuration linkcheck.json located here.
    • We can pass a new configuration file by using --config PATH
  2. We will be working on the directory the command was running from.
    • We can pass files instead by linkcheck readme.md readme2.md
  3. Scan the directory and search for *.md files.
  4. Open each file and extract links from it.
  5. Divide the links into one of the categories: Email, Folder, URL.
  6. Analyze link.

Installation

By default, the checker will use the configuration linkcheck.json located here.

go install github.com/shiranr/linkcheck@latest

linkcheck
linkcheck README.md
linkcheck --config linkcheck.json README.MD

Configuration

Currently, there are several parameters which can be customized, more to come in the future. :) For more details, see linkcheck.json:

  1. exclude_links - links which we want to skip and the link check to ignore.
  2. only_errors - true by default - print only errors or all the logs including successful links.
  3. project_path - ability to scan an entire folder instead of files one by one as a givne list.
  4. serial - false by default - work parallel (use goroutines) or serializable.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL