设为首页 收藏本站
查看: 859|回复: 0

[经验分享] pylint & jenkins

[复制链接]

尚未签到

发表于 2018-1-7 08:42:39 | 显示全部楼层 |阅读模式
Usage:  pylint [options] module_or_package  

  Check that a module satisfies a coding standard (and more !).
  

  pylint --help
  

  Display this help message and exit.
  

  pylint --help-msg <msg-id>[,<msg-id>]
  


  Display help messages about given message>  

  

  
Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  显示所有帮助信息。
  --long-help           more verbose help.
  

  Master:
  --rcfile=<file>     Specify a configuration file.
  指定一个配置文件。把使用的配置放在配置文件中,这样不仅规范了自己代码,也可以方便地和别人共享这些规范。
  --init-hook=<code>  Python code to execute, usually for sys.path manipulation such as pygtk.require().
  -E, --errors-only   In error mode, checkers without error messages are
  disabled and for others, only the ERROR messages are
  displayed, and no reports are done by default
  --py3k              In Python 3 porting mode, all checkers will be
  disabled and only messages emitted by the porting
  checker will be displayed
  --ignore=<file>[,<file>...]
  Add files or directories to the blacklist. They should
  be base names, not paths. [current: CVS]
  --ignore-patterns=<pattern>[,<pattern>...]
  Add files or directories matching the regex patterns
  to the blacklist. The regex matches against base
  names, not paths. [current: none]
  --persistent=<y_or_n>
  Pickle collected data for later comparisons. [current:
  yes]
  --load-plugins=<modules>
  List of plugins (as comma separated values of python
  modules names) to load, usually to register additional
  checkers. [current: none]
  -j <n-processes>, --jobs=<n-processes>
  Use multiple processes to speed up Pylint. [current:
  1]
  --extension-pkg-whitelist=<pkg[,pkg]>
  A comma-separated list of package or module names from
  where C extensions may be loaded. Extensions are
  loading into the active Python interpreter and may run
  arbitrary code [current: none]
  --optimize-ast=<yn>
  Allow optimization of some AST trees. This will
  activate a peephole AST optimizer, which will apply
  various small optimizations. For instance, it can be
  used to obtain the result of joining multiple strings
  with the addition operator. Joining a lot of strings
  can lead to a maximum recursion error in Pylint and
  this flag can prevent that. It has one side effect,
  the resulting AST will be different than the one from
  reality. This option is deprecated and it will be
  removed in Pylint 2.0. [current: no]
  

  Commands:
  --help-msg=<msg-id>

  Display a help message for the given message>  exit. The value may be a comma separated list of

  message>  --list-msgs         Generate pylint's messages.
  --list-conf-levels  Generate pylint's messages.
  --full-documentation
  Generate pylint's full documentation.
  --generate-rcfile   Generate a sample configuration file according to the
  current configuration. You can put other options
  before this one to get them in the generated
  configuration.
  可以使用 pylint --generate-rcfile 来生成一个配置文件示例。可以使用重定向把这个配置文件保存下来用做以后使用。也可以在前面加上其它选项,使这些选项的值被包含在这个产生的配置文件里。如:pylint --persistent=n --generate-rcfile > pylint.conf,查看 pylint.conf,可以看到 persistent=no,而不再是其默认值 yes。
  

  Messages control:
  --confidence=<levels>
  Only show warnings with the listed confidence levels.
  Leave empty to show all. Valid levels: HIGH,
  INFERENCE, INFERENCE_FAILURE, UNDEFINED [current:
  none]

  -e <msg>  Enable the message, report, category or checker with

  the given>  identifier separated by comma (,) or put this option
  multiple time (only on the command line, not in the
  configuration file where it should appear only once).
  See also the "--disable" option for examples.

  -d <msg>  Disable the message, report, category or checker with

  the given>  identifiers separated by comma (,) or put this option
  multiple times (only on the command line, not in the
  configuration file where it should appear only
  once).You can also use "--disable=all" to disable
  everything first and then reenable specific checks.
  For example, if you want to run only the similarities
  checker, you can use "--disable=all
  --enable=similarities". If you want to run only the
  classes checker, but have no Warning level messages
  displayed, use"--disable=all --enable=classes
  --disable=W"
  禁止指定>--disable-msg= W0402
  

  Reports:
  -f <format>, --output-format=<format>

  Set the output format. Available formats are text, parseable, colorized, msvs (visual studio) and html. You can also give a reporter>  设置输出格式。可以选择的格式有 text, parseable, colorized, msvs (visual studio) 和 html, 默认的输出格式是 text。
  --files-output=<y_or_n>
  Put messages in a separate file for each module / package specified on the command line instead of printing them on stdout. Reports (if any) will be written in a file name "pylint_global.[txt|html]".
  This option is deprecated and it will be removed in Pylint 2.0. [current: no]
  将每个 module /package 的 message 输出到一个以 pylint_module/package. [txt|html] 命名的文件中,如果有 report 的话,输出到名为 pylint_global.[txt|html] 的文件中。默认是输出到屏幕上不输出到文件里。
  -r <y_or_n>, --reports=<y_or_n>
  Tells whether to display a full report or only the messages [current: yes]
  默认是 y, 表示 Pylint 的输出中除了包含源代码分析部分,也包含报告部分。
  --evaluation=<python_expression>
  Python expression which should return a note less than
  10 (10 is the highest note). You have access to the
  variables errors warning, statement which respectively
  contain the number of errors / warnings messages and
  the total number of statements analyzed. This is used
  by the global evaluation report (RP0004). [current:
  10.0 - ((float(5 * error + warning + refactor +
  convention) / statement) * 10)]
  --msg-template=<template>
  Template used to display messages. This is a python
  new-style format string used to format the message
  information. See doc for all details
  

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-432470-1-1.html 上篇帖子: jenkins git gradle android自动化构建配置 下篇帖子: jenkins使用教程!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表