Browse Source

SONAR-12198 Update documentation after the deprecation of Pylint execution by SonarPython

tags/7.8
Nicolas Harraudeau 5 years ago
parent
commit
b4265b3fc4

+ 2
- 2
server/sonar-docs/src/pages/analysis/external-issues.md View File

@@ -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

+ 6
- 5
server/sonar-docs/src/pages/analysis/languages/python.md View File

@@ -18,14 +18,15 @@ url: /analysis/languages/python/
Discover and update the Python-specific [properties](/analysis/analysis-parameters/) in: <!-- sonarcloud -->Project <!-- /sonarcloud --> **[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 <module_or_package> -r n --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" > <report_file>
```
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))

Loading…
Cancel
Save