Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Commit

Permalink
Add Python linters Python version configuration documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Oct 10, 2016
1 parent b271acb commit d7bedbe
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docs/lint.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
项目接入
--------------

请参考 :ref:`构建和测试 <build>` 文档接入项目,对于代码检查,需要配置 `linter` 选项,如:
请参考 :ref:`构建和测试 <build>` 文档接入项目,如不需要构建/测试可忽略相关配置,
对于代码检查,需要配置 `linter` 选项,如:

单个 linter 示例
~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -53,3 +54,12 @@ yamllint YAML https://github.com/adrienverge/yamllint
jsonlint JSON https://github.com/zaach/jsonlint
rstlint RestructuredText https://github.com/twolfson/restructuredtext-lint
=================== =================== =======================================================

指定 Python 代码检查工具使用的 Python 版本
--------------------------------------------------

对于 Python 相关的代码检查工具,支持指定其使用的 Python 版本(默认使用 Python 3):

.. code-block:: yaml
linter: {name: 'pylint', python_version: 2}

0 comments on commit d7bedbe

Please sign in to comment.