8

I'm using the MultiWayIf language extension. While I love HLint (I'm using version v1.8.61), unfortunately it appears that HLint is not aware of this extension, and it reports multi-way ifs as parse errors: Warning: Parse error: |

The HLint Manual (http://community.haskell.org/~ndm/darcs/hlint/hlint.htm) describes how you can use pragmas to indicate suggestions to ignore; however, this doesn't seem to work for warnings due to parse errors.

Is there any way to tell HLint to ignore the parse error warnings? Thank you!

4

1 回答 1

7

你可以运行:

hlint "--ignore=Parse error" MyFile.hs

有一个测试表明此调用在HLint 测试套件中有效。

请注意,一旦出现解析错误,您将不会从文件中获得任何其他提示,因为 HLint 在文件被解析之前无法对文件进行操作。

但是,如果您升级到 haskell-src-exts-1.15 或更高版本,然后重新安装 HLint,它应该可以解析多路 - 如果没问题。如果没有,请报告错误

于 2014-05-19T05:41:29.787 回答