【脚本语言系列】关于Python测试工具Pylint, 你需要知道的事
来源:互联网 发布:三国杀 银两武将 知乎 编辑:程序博客网 时间:2024/05/16 17:48
如何使用Pylint
- 安装Pylint
- 使用pip命令安装
pip install pylint - 使用easy_install命令安装
easy_install pylint
对NumPy源代码进行分析- 签出代码
git clone https://github.com/numpy/numpy.git numpy - 对代码进行分析
pylint ./numpy/numpy
- 签出代码
- 使用pip命令安装
Pylint默认输出纯文本的分析结果,但如有需要,可以指定其输出HTML格式的信息。
分析结果是一系列的消息,消息的格式如下:
MESSAGE_TYPE: LINE_NUM:[OBJECT:] MESSAGE
- [R] 重构类型:建议进行重构
- [C] 惯例类型:违反了代码风格
- [W] 警告类型:针对小问题的警告消息
- [E] 错误类型:错误或潜在的bug
- [F] 致命错误类型, 发生了致命错误,因此不能进行进一步的分析
什么是Pylint
Pylint是另一个开源的静态代码分析器,最初由Logilab开发。Pylint比Pyflakes复杂,且允许用户做更多的定制,但分析速度比Pyflakes慢。
0 0
- 【脚本语言系列】关于Python测试工具Pylint, 你需要知道的事
- 【脚本语言系列】关于Python测试工具lettuce, 你需要知道的事
- 【脚本语言系列】关于Python测试工具mock, 你需要知道的事
- 【脚本语言系列】关于Python测试工具unittest, 你需要知道的事
- 【脚本语言系列】关于Python测试工具docstrings, 你需要知道的事
- 【脚本语言系列】关于Python测试工具Pyflakes, 你需要知道的事
- 【脚本语言系列】关于Python系统管理,你需要知道的事
- 【脚本语言系列】关于Python容器,你需要知道的事
- 【脚本语言系列】关于Python性能分析工具timeit, 你需要知道的事
- 【脚本语言系列】关于Python代码分析工具line_profiler,你需要知道的事
- 【脚本语言系列】关于Python游戏工具Pygame,你需要知道的事
- 【脚本语言系列】关于Python调试报错,你需要知道的事
- 【脚本语言系列】关于Python开发环境搭建,你需要知道的事
- 【脚本语言系列】关于Python数值计算NumPy, 你需要知道的事
- 【脚本语言系列】关于Python机器学习scikits-learn,你需要知道的事
- 【脚本语言系列】关于Python数值计算Pandas,你需要知道的事
- 【脚本语言系列】关于Python统计分析statsmodel,你需要知道的事
- 【脚本语言系列】关于Python邮件服务smtplib,你需要知道的事
- List集合之LinkedList
- ava 对象序列化和反序列化
- 联动菜单极其注意事项
- NYOJ--95--multiset--众数问题
- Library not loaded:Reason: image not found 解决
- 【脚本语言系列】关于Python测试工具Pylint, 你需要知道的事
- SpringBoot整合jersey
- POJ 1083 Moving Tables 题解
- 推荐系统中基于深度学习的混合协同过滤模型
- 布局篇
- python绘图入门
- ITK 基于特征的血管提取01
- 工作安排
- 【Tensorflow】实现简单的卷积神经网络CNN实际代码