Scanning source code for issue links and printing there statuses

Aleksandr Vinokurov
2 min readJan 21, 2016

--

When you write code, you use other’s packages and libs. When you use them you normally find some bugs in. When you find bugs, you report issues or discover them already been reported. You get the issue number. Then you make a workaround in your project and add a comment by the code, something like this:

// This is a workaround to https://github.com/evecon/issuechk/issues/1

As for me, I like to hack into the code of these modules and discover how they work. It leads me to cloning their repositories, browsing tests, studying how to build them and tracing to the point where it fails for my issue… I end up with pull-requests for the project. And that’s cool, especially if it is an interesting project, like go-swagger for example. But as much as it’s a challenge, it is a time-spending challenge, and it can take your time from your startup — and this is not good.

So let’s imagine that you stood still and not gone into hacking these modules.

You continue developing your project. And some time later you get your code filled (I hope not too much filled, but) with workarounds to external modules’ issues or so.

Maybe some of these issues were already closed (but you forget that email notification from Github you put aside for later check) or maybe not.

This is a work for issuechk — a small tool that will scan your source file for issue links and check their statuses. That’s all. You call it:

issuechk program.c

And it prints a grep-able line for each issue link found in your file:

program.c:42: github.com/evecon/issuechk issue #1 is closed
program.c:314: github.com/evecon/issuechk issue #2 is open

One thing left to note: it plays nice with automation — add it to your CI build server and you will never forget it :)

--

--