Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dannypsnl/reporter
A util toolbox for compiler error reporting
https://github.com/dannypsnl/reporter
compiler-plugin error-reporting programming-languages racket source-engine
Last synced: 27 days ago
JSON representation
A util toolbox for compiler error reporting
- Host: GitHub
- URL: https://github.com/dannypsnl/reporter
- Owner: dannypsnl
- License: mit
- Created: 2020-05-24T14:44:40.000Z (over 4 years ago)
- Default Branch: develop
- Last Pushed: 2023-03-11T10:25:18.000Z (almost 2 years ago)
- Last Synced: 2024-10-24T23:48:38.270Z (2 months ago)
- Topics: compiler-plugin, error-reporting, programming-languages, racket, source-engine
- Language: Racket
- Homepage: https://pkgd.racket-lang.org/pkgn/package/reporter
- Size: 101 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# reporter
[![Racket](https://github.com/racket-tw/reporter/actions/workflows/racket.yml/badge.svg)](https://github.com/racket-tw/reporter/actions/workflows/racket.yml)
Reporter is inspired from [codespan](https://github.com/brendanzab/codespan). The purpose of this project is to create a util toolbox for compiler error reporting.
### Installation
```racket
raco pkg install --auto reporter
```### Usage
#### Example
Take a look at [example](https://github.com/racket-tw/reporter/tree/develop/example).
#### Current API
```racket
#lang racket(require reporter)
(displayln
(report
#:error-code "E0001"
#:message "type mismatching"
#:target srcloc?
#:labels (list
(label srcloc? "cannot assign a `string` to `int` variable"
#:color 'red)
(label srcloc? "`x` is a `int` variable"
#:color 'blue))
#:hint "expected type `int`, found type `string`"))(displayln (warning #:message "shadow the variable"
#:target srcloc?
#:labels (list
(label srcloc? "previous definition" #:color 'green)
(label srcloc? "shadow definition" #:color 'blue))
#:hint "rename the shadow variable"))
```