https://github.com/lucaswerkmeister/linkstacktrace
A tool to link file:line info from java stack traces to the code pages on Github.
https://github.com/lucaswerkmeister/linkstacktrace
bug-reporting stacktrace
Last synced: about 2 months ago
JSON representation
A tool to link file:line info from java stack traces to the code pages on Github.
- Host: GitHub
- URL: https://github.com/lucaswerkmeister/linkstacktrace
- Owner: lucaswerkmeister
- License: agpl-3.0
- Created: 2013-11-28T21:00:58.000Z (over 12 years ago)
- Default Branch: gh-pages
- Last Pushed: 2017-07-15T21:25:16.000Z (almost 9 years ago)
- Last Synced: 2025-03-20T18:36:10.528Z (about 1 year ago)
- Topics: bug-reporting, stacktrace
- Language: JavaScript
- Homepage: http://lucaswerkmeister.github.io/linkStackTrace/
- Size: 52.7 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
linkStackTrace
==============
linkStackTrace will go through a Java stack trace, search for files in a Github repository and add Markdown links to the stack trace.
Given the following stack trace
```
java.lang.RuntimeException:
at com.redhat.ceylon.compiler.java.codegen.Assert.fail(Assert.java:37)
at com.redhat.ceylon.compiler.java.codegen.Assert.fail(Assert.java:43)
at com.redhat.ceylon.compiler.java.codegen.AnnotationInvocationVisitor.(AnnotationInvocationVisitor.java:73)
at com.redhat.ceylon.compiler.java.codegen.ExpressionTransformer.transformAnnotation(ExpressionTransformer.java:4354)
at com.redhat.ceylon.compiler.java.codegen.ExpressionTransformer.transform(ExpressionTransformer.java:4319)
at com.redhat.ceylon.compiler.java.codegen.CeylonTransformer.transformPackageDescriptor(CeylonTransformer.java:455)
```
and the repository `ceylon/ceylon-compiler`, it will
* extract the file+line infos (`Assert.java:37`, `Assert.java:43`, `AnnotationInvocationVisitor.java:73`, etc.)
* search for the files (`Assert.java`, `AnnotationInvocationVisitor.java`, etc.) on GitHub in the repository `ceylon/ceylon-compiler`
* and, if a unique match is found, replace the file:line in the stack trace with a Markdown link to the correct line of the found file
resulting in this Markdown:
```
java.lang.RuntimeException:
at com.redhat.ceylon.compiler.java.codegen.Assert.fail(Assert.java:37)
at com.redhat.ceylon.compiler.java.codegen.Assert.fail(Assert.java:43)
at com.redhat.ceylon.compiler.java.codegen.AnnotationInvocationVisitor.([AnnotationInvocationVisitor.java:73](https://github.com/ceylon/ceylon-compiler/blob/5323225dbbe3d87b221e0b64cec0e68d8b09adab/src/com/redhat/ceylon/compiler/java/codegen/AnnotationInvocationVisitor.java#L73))
at com.redhat.ceylon.compiler.java.codegen.ExpressionTransformer.transformAnnotation([ExpressionTransformer.java:4354](https://github.com/ceylon/ceylon-compiler/blob/a57480723c29636dec6ae2d7606b1afc05d6be8b/src/com/redhat/ceylon/compiler/java/codegen/ExpressionTransformer.java#L4354))
at com.redhat.ceylon.compiler.java.codegen.ExpressionTransformer.transform([ExpressionTransformer.java:4319](https://github.com/ceylon/ceylon-compiler/blob/a57480723c29636dec6ae2d7606b1afc05d6be8b/src/com/redhat/ceylon/compiler/java/codegen/ExpressionTransformer.java#L4319))
at com.redhat.ceylon.compiler.java.codegen.CeylonTransformer.transformPackageDescriptor([CeylonTransformer.java:455](https://github.com/ceylon/ceylon-compiler/blob/9b2ed03f6ec738925b7c2d00e8fbd2b55bf89e51/src/com/redhat/ceylon/compiler/java/codegen/CeylonTransformer.java#L455))
Generated by [linkStackTrace](http://lucaswerkmeister.github.io/linkStackTrace/)
```
which, rendered, looks like this¹:
> java.lang.RuntimeException:
at com.redhat.ceylon.compiler.java.codegen.Assert.fail(Assert.java:37)
at com.redhat.ceylon.compiler.java.codegen.Assert.fail(Assert.java:43)
at com.redhat.ceylon.compiler.java.codegen.AnnotationInvocationVisitor.([AnnotationInvocationVisitor.java:73](https://github.com/ceylon/ceylon-compiler/blob/5323225dbbe3d87b221e0b64cec0e68d8b09adab/src/com/redhat/ceylon/compiler/java/codegen/AnnotationInvocationVisitor.java#L73))
at com.redhat.ceylon.compiler.java.codegen.ExpressionTransformer.transformAnnotation([ExpressionTransformer.java:4354](https://github.com/ceylon/ceylon-compiler/blob/a57480723c29636dec6ae2d7606b1afc05d6be8b/src/com/redhat/ceylon/compiler/java/codegen/ExpressionTransformer.java#L4354))
at com.redhat.ceylon.compiler.java.codegen.ExpressionTransformer.transform([ExpressionTransformer.java:4319](https://github.com/ceylon/ceylon-compiler/blob/a57480723c29636dec6ae2d7606b1afc05d6be8b/src/com/redhat/ceylon/compiler/java/codegen/ExpressionTransformer.java#L4319))
at com.redhat.ceylon.compiler.java.codegen.CeylonTransformer.transformPackageDescriptor([CeylonTransformer.java:455](https://github.com/ceylon/ceylon-compiler/blob/9b2ed03f6ec738925b7c2d00e8fbd2b55bf89e51/src/com/redhat/ceylon/compiler/java/codegen/CeylonTransformer.java#L455))
Generated by [linkStackTrace](http://lucaswerkmeister.github.io/linkStackTrace/)
¹: If you use the linked stack trace in GitHub issues, GitHub Flavored Markdown is used, which keeps line breaks.
Search results are cached to minimize the amount of GitHub searches that are necessary;
if it still hits GitHub’s rate limit, you get a message when the rate limit will reset, and can also enter your own API token if you want to.
Legalese
--------
The content of this repository is released under the GNU AGPLv3 as provided in the LICENSE file that accompanied this code.
By submitting a "pull request" or otherwise contributing to this repository, you agree to license your contribution under the license mentioned above.