From b4265b3fc4235c6d75ee97ec4aac196e737e714b Mon Sep 17 00:00:00 2001 From: Nicolas Harraudeau Date: Thu, 13 Jun 2019 19:12:33 +0200 Subject: [PATCH] SONAR-12198 Update documentation after the deprecation of Pylint execution by SonarPython --- .../sonar-docs/src/pages/analysis/external-issues.md | 4 ++-- .../sonar-docs/src/pages/analysis/languages/python.md | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/server/sonar-docs/src/pages/analysis/external-issues.md b/server/sonar-docs/src/pages/analysis/external-issues.md index 738a161187c..fc522ce0482 100644 --- a/server/sonar-docs/src/pages/analysis/external-issues.md +++ b/server/sonar-docs/src/pages/analysis/external-issues.md @@ -32,8 +32,8 @@ Java|`sonar.java.checkstyle.reportPaths`|Comma-delimited list of paths to report JavaScript|`sonar.eslint.reportPaths`|Comma-delimited list of paths to JSON [ESLint](https://eslint.org/) reports (use `-f json` ESLint option) Kotlin|`sonar.androidLint.reportPaths`|Comma-delimited list of paths to AndroidLint reports Kotlin|`sonar.kotlin.detekt.reportPaths`|Comma-delimited list of paths to [Detekt](https://github.com/arturbosch/detekt) reports -Python|`sonar.python.pylint`|Path to a [Pylint](http://www.pylint.org/) report. Wildcards are supported| -Python|`sonar.python.pylint_config` `sonar.python.pylint`|By default SonarPython will execute the pylint command for you if you haven't specified the path to a PyLint report. Use `sonar.python.pylint` to use a pylint executable in a non-default location. The property **must** be set on windows (even for the default location), using either escaped backslashes, or single forward slashes (e.g. `C:\\Python26\\Scripts\\pylint.bat`, `C:/Python26/Scripts/pylint.bat`). Use `sonar.python.pylint_config` to specify the relative or absolute path to a non-default pylint configuration file. +Python|`sonar.python.pylint.reportPath`|Path to a [Pylint](http://www.pylint.org/) report. Wildcards are supported| +Python|![](/images/cross.svg) **Deprecated** `sonar.python.pylint_config` `sonar.python.pylint`|By default SonarPython will execute the pylint command for you if you haven't specified the path to a PyLint report. Use `sonar.python.pylint` to use a pylint executable in a non-default location. The property **must** be set on windows (even for the default location), using either escaped backslashes, or single forward slashes (e.g. `C:\\Python26\\Scripts\\pylint.bat`, `C:/Python26/Scripts/pylint.bat`). Use `sonar.python.pylint_config` to specify the relative or absolute path to a non-default pylint configuration file. Python|`sonar.python.bandit.reportPaths`|Comma-delimited list of paths to [Bandit](https://github.com/PyCQA/bandit/blob/master/README.rst) reports Ruby|`sonar.ruby.rubocop.reportPaths`|Comma-delimited list of paths to [Rubocop](https://github.com/rubocop-hq/rubocop) reports Scala|`sonar.scala.scalastyle.reportPaths`|Comma-delimited list of paths to [Scalastyle](http://www.scalastyle.org/) reports diff --git a/server/sonar-docs/src/pages/analysis/languages/python.md b/server/sonar-docs/src/pages/analysis/languages/python.md index f6bd20f8bc2..e886030f847 100644 --- a/server/sonar-docs/src/pages/analysis/languages/python.md +++ b/server/sonar-docs/src/pages/analysis/languages/python.md @@ -18,14 +18,15 @@ url: /analysis/languages/python/ Discover and update the Python-specific [properties](/analysis/analysis-parameters/) in: Project **[Administration > General Settings > Python](/#sonarqube-admin#/admin/settings?category=python)**. ## Pylint -[Pylint](http://www.pylint.org/) is an external static source code analyzer used to augment Python analysis. To include Pylint issues, first generate an issues report: +[Pylint](http://www.pylint.org/) is an external static source code analyzer, it can be used in conjunction with SonarPython. + +You can enable Pylint rules directly in your Python Quality Profile. Their rule keys start with "*Pylint:*". + +Once the rules are activated you should run Pylint and import its report: ``` pylint -r n --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" > ``` -Then pass it in to analysis with the `sonar.python.pylint.reportPath` property. - -The analyzer will execute Pylint for you if you haven't specified the path to a Pylint report. The path to your installation of `pylint` can be tuned using the `sonar.python.pylint` property, and non-default a properties file can be specified with `sonar.python.pylint_config`. - +Then pass the generated report path to analysis via the `sonar.python.pylint.reportPath` property. ## Related Pages * [Importing External Issues](/analysis/external-issues/) ([Pylint](http://www.pylint.org/), [Bandit](https://github.com/PyCQA/bandit/blob/master/README.rst)) -- 2.39.5