MyNixOS website logo
Description

Krank checks issue tracker link status in your source code.

Krank checks issue tracker link status in your source code. When you implement a workaround because of an upstream issue, you often put a link in comment in your code. Krank will tell you when the issue associated with your workaround is closed, meaning that you may get ride of your workaround.

Krank

Hackage

Krank checks your code source comments for link to issue trackers, such as gitlab or github.

Krank will then outputs a report of the status of theses issues, if they are closed or still open.

Why

You are blocked on upstream ticket, there you write a nice comment in your code such as:

# blocked on upstream ticket https//github.com/Foo/Bar/issues/1234
# This workaround should be removed once the upstream ticket is closed
if workaround:
  pass

And, this stays in your codebase for the next ten years, even if the upstream issue is closed.

Now you can run krank on your codebase, and it will tells you that issue #1234 in project Foo/Bar has been closed. Time to remove your workaround.

Usage

Just launch the krank command, optionally with a list of files as arguments. It works on any kind of source code file and prints a report of informations found in the comments:

$ krank

default.nix:20:20: info:
  still Open: https://github.com/NixOS/nix/issues/2733

foo.hs:67:11: error:
  now Closed: https://github.com/bazelbuild/bazel/issues/6313

krank will fail (i.e. non-zero exit code) in case of any error.

Here krank is telling us that our source code links to github issues which are now closed. Time to remove some workarounds now that upstream issues are fixed!

You can check krank --help for a list of options, such as configuring your API token for external services, such as github and gitlab.

Specific documentation

IssueTracker is listing Github and Gitlab issue linked in comment. Issues which are still Open will be listed as info and Closed issues are listed as error. Convenient to know when to remove workarounds.

Red herring

If you want to ignore all krank checkers on a given line of code, add krank:ignore-line on this same line. Krank will then skip this line and not report anything on it

Misc

Metadata

Version

0.3.0

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows

Related (1)