Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/jenkins/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jenkins-PyLint警告工具解析日志文件,但报告';发现0个问题';_Jenkins_Pylint_Pylintrc - Fatal编程技术网

Jenkins-PyLint警告工具解析日志文件,但报告';发现0个问题';

Jenkins-PyLint警告工具解析日志文件,但报告';发现0个问题';,jenkins,pylint,pylintrc,Jenkins,Pylint,Pylintrc,我已将Jenkins设置为在所有python源文件上运行pylint,并将所有日志文件(显然是正确的)生成到一个子目录中,如下所示: Source\pylint_logs\pylint1.log, pylint2.log, ..., pylint75.log ************* Module FigureView myapp\Views\FigureView.py:1: [C0103, ] Module name "FigureView" doesn't conform to snak

我已将Jenkins设置为在所有python源文件上运行pylint,并将所有日志文件(显然是正确的)生成到一个子目录中,如下所示:

Source\pylint_logs\pylint1.log, pylint2.log, ..., pylint75.log
************* Module FigureView
myapp\Views\FigureView.py:1: [C0103, ] Module name "FigureView" doesn't conform to snake_case naming style (invalid-name)
myapp\Views\FigureView.py:30: [C0103, FigureView.__init__] Attribute name "ax" doesn't conform to snake_case naming style (invalid-name)

------------------------------------------------------------------

Your code has been rated at 8.57/10 (previous run: 8.57/10, +0.00)
我根据Jenkins配置页面上的说明包括了一个--msg模板定义:编译后操作->记录编译器警告和静态分析结果->静态分析工具。模板如下所示:

msg-template={path}:{line}: [{msg_id}, {obj}] {msg} ({symbol})
Jenkins/pylint生成的一个日志文件示例如下:

Source\pylint_logs\pylint1.log, pylint2.log, ..., pylint75.log
************* Module FigureView
myapp\Views\FigureView.py:1: [C0103, ] Module name "FigureView" doesn't conform to snake_case naming style (invalid-name)
myapp\Views\FigureView.py:30: [C0103, FigureView.__init__] Attribute name "ax" doesn't conform to snake_case naming style (invalid-name)

------------------------------------------------------------------

Your code has been rated at 8.57/10 (previous run: 8.57/10, +0.00)
对于PyLint报告文件模式,我有:Source/PyLint_logs/PyLint*.log

似乎PyLint Warnings正在解析文件,因为控制台输出如下所示:

[PyLint] Searching for all files in 'D:\Jenkins\workspace\PROJECT' that match the pattern 'Source/pylint_logs/pylint*.log'
[PyLint] -> found 75 files
[PyLint] Successfully parsed file D:\Jenkins\workspace\PROJECT\Source\pylint_logs\pylint1.log
[PyLint] -> found 0 issues (skipped 0 duplicates)
[PyLint] Successfully parsed file D:\Jenkins\workspace\PROJECT\Source\pylint_logs\pylint10.log
[PyLint] -> found 0 issues (skipped 0 duplicates)
这会对所有75个文件重复,即使日志文件中存在大量问题

奇怪的是,当我第一次在这个项目上原型化使用Jenkins时,我将它设置为只在单个文件上运行pylint。我遇到了另一个StackOverflow帖子,它显示了一个msg模板,允许我让它工作()。我甚至得到了PyLint警告趋势的图表。我在每篇文章中使用了以下定义:

msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg}
请注意,此格式与我的Jenkins页面(前面显示)推荐的格式略有不同。即使这对单个文件有效,但现在两个模板似乎都不能用于多个文件,或者是模板以外的其他东西导致了问题。我的图表是平线的,我总是报告0个问题

我很难找到关于Jenkins PyLint警告工具的有用文档。有人对我可以进一步研究的文档有什么想法或建议吗?多谢

确保在pylint命令中通过参数。例如:

pylint --exit-zero --output-format=parseable module1 module2 > pylint.report

我们在经营詹金斯。2.89.4、警告插件5.0.1和警告下一代插件3.0.3