Improve documentation

This commit is contained in:
Taylor Fausak 2020-05-24 08:22:13 -04:00
parent affa4bf4dd
commit d4fb87de45
2 changed files with 10 additions and 18 deletions

View File

@ -4,9 +4,9 @@
[![Hackage](https://img.shields.io/hackage/v/splint)](https://hackage.haskell.org/package/splint)
[![Stackage](https://www.stackage.org/package/splint/badge/nightly?label=stackage)](https://www.stackage.org/package/splint)
Splint is a proof of concept, showing how to use [HLint 3][] as a [GHC source
plugin][]. It is similar to [hlint-source-plugin][] by Ollie Charles, except
that it doesn't have to re-parse the module in order to lint it.
Splint makes [HLint 3][] available as a [GHC source plugin][]. It is similar to
[hlint-source-plugin][] by Ollie Charles, except that it doesn't have to
re-parse the module in order to lint it.
To use Splint, pass `-fplugin=Splint` to GHC. Any ideas suggested by HLint will
be reported as warnings by GHC. For example, if you define `Main.hs` as:
@ -84,19 +84,6 @@ However it's also got some downsides:
- Using plugins marks every module as unsafe.
## To do
As stated, Splint is basically a tech demo. Although it's usable in its current
form, there is some low hanging fruit to fix before it should be considered
ready for production:
- [ ] Work with versions of GHC older than 8.10.
- [x] Accept command-line options using `-fplugin-opt=Splint:something`.
- [x] Reliably read HLint configuration.
- [x] Avoid re-reading HLint config for each source file.
- [x] Figure out a good output format for the warnings.
- [x] Publish to Hackage.
[HLint 3]: https://neilmitchell.blogspot.com/2020/05/hlint-30.html
[GHC source plugin]: https://downloads.haskell.org/~ghc/8.10.1/docs/html/users_guide/extending_ghc.html#source-plugins
[hlint-source-plugin]: https://github.com/ocharles/hlint-source-plugin

View File

@ -1,15 +1,20 @@
name: splint
version: 1.0.0.0
synopsis: HLint as a GHC source plugin.
description:
Splint makes HLint 3 available as a GHC source plugin. To use it, pass
@-fplugin=Splint@ to GHC. Any options passed to Splint are passed through to
HLint. For example you can use @-fplugin-opt=Splint:'--ignore=Use concatMap'@
to ignore the "Use @concatMap@" suggestion.
build-type: Simple
cabal-version: >= 1.10
category: Development
description: Splint is HLint as a GHC source plugin.
extra-source-files: README.markdown
license-file: LICENSE.markdown
license: ISC
maintainer: Taylor Fausak
synopsis: HLint as a GHC source plugin.
source-repository head
location: https://github.com/tfausak/splint