【问题标题】:How to write messge ids to html file with pylint 1.1如何使用 pylint 1.1 将消息 ID 写入 html 文件
【发布时间】:2014-01-13 18:11:43
【问题描述】:

我们最近从 pylint-0.28 升级到 pylint-1.1,我无法再将消息 ID 写入使用 --output-format=html 生成的 html 文件中。

pylint 1.X 的变化去掉了 --include-ids 选项,以及这些问题:

How do I get Pylint message IDs to show up after pylint-1.0.0?
PyLint 1.0.0 with PyDev + Eclipse: "include-ids" option no longer allowed, breaks Eclipse integration

建议使用 --message-template 选项来恢复它,但这似乎只适用于屏幕输出。因此,目前 html 文件中的“类型”列仅包含五种消息类型之一。我怎样才能将消息名称或消息 ID 获取到 html 文件中?

另外,FWIW 此处的 pylint 文档

https://pypi.python.org/pypi/pylint
http://docs.pylint.org/features.html#options

仍然提到 --include-ids 选项,但没有提到 --message-template。

马克·E·汉密尔顿

【问题讨论】:

    标签: pylint


    【解决方案1】:

    没错,这个选项在 pylint 1.1 中消失了。

    文本记者最好使用message-template,但 HTML 在此过程中会丢失一些可配置性。无论如何,IMO 应该修复 html 报告以系统地包含符号名称,仅此而已。

    请在https://bitbucket.org/logilab/pylint/issues 上提交一个关于此的问题。

    猜你喜欢
    • 1970-01-01
    • 2020-01-02
    • 2015-08-10
    • 2020-11-18
    • 1970-01-01
    • 2015-09-22
    • 1970-01-01
    • 2021-07-14
    • 2021-12-27
    相关资源
    最近更新 更多