Published on October 17, 2015
Author Lars Kruse
Notice: This post is more than a year old. Some of the content might be outdated.

LinkChecker - Jekyll flavor

UPDATE: Updated alongside the parser, now picks up warnings with newlines in their messages.

This parser is designed to parse the CSV output from LinkChecker. It assumes that the source of the website that is being parsed is available in the _site directory of the workspace. _site is the Jekyll default, but it can be overridden.

Example: Say that you’re hosting from the master branch Set up a job that:

pull master
jekyll build
linkchecker -o text -Fcsv/report/

Let the Warnings plugin scan the generated report/ using this parser.

Settings for the Warnings plugin


LinkChecker CSV (Jekyll flavor)

Jekyll LinkChecker

Trend report Name

Jekyll LinkChecker Trend

Regular expression

The following regex is pretty daunting, but it allows for greater customization of the warnings later on.


Mapping script

The import of hudson.plugins.analysis.util.model.Priority is necessary if you want to get access to the Warning constructor that takes five arguments - the last being the priority.

import hudson.plugins.analysis.util.model.Priority
import hudson.plugins.warnings.parser.Warning

def obj = [
        url          :,
        parentUrl    :,
        baseRef      :,
        result       :,
        infoString   :,
        valid        :,
        fullUrl      :,
        line         :,
        column       :,
        name         :,
        dlTime       :,
        dlSize       :,
        checkTime    :,
        cached       :,
        level        :,
        modified     :

String jekyllTarget = "_site"
String defaultIndex = "index.html"
String source = obj.parentUrl
if (source ==~ /https?:\/\/[^\s\.].[^\s\/]*$/)
    source = $ { source } $ { "/" }
if (source ==~ /.*\/$/)
    source = $ { source } $ { defaultIndex }
source = source.replaceAll(/https?:\/\/[^\s\.].[^\s\/]*/, jekyllTarget)

def line = obj.line.toInteger()
def type = obj.level
def category = obj.result

message = "$obj.fullUrl: ($obj.result) $obj.warningString - $obj.infoString"

def priority = Priority.NORMAL
if (obj.valid.equalsIgnoreCase("true"))
    priority = Priority.LOW
if (obj.valid.equalsIgnoreCase("false"))
    priority = Priority.HIGH

return new Warning(source, line, type, category, message, priority)

Author: Lars Kruse

Read more about Lars

Related Stories

Related Stories


Pipeline - The Game that Delivers!

Pipeline - The Game that Delivers!

A new card game to design Continuous Delivery pipelines

Praqma joins the RADON project

Praqma joins the RADON project

Unlocking the Benefits of Serverless FaaS for the European Software Industry

Winning with DevOps and Reducing Your Risk of a Heart Attack

Winning with DevOps and Reducing Your Risk of a Heart Attack

Clinical Trials and Software Process