SonarPython

Language: Python
Checks: 50+
Categories: Bug Risk, Clarity, Compatibility, Complexity, Duplication, Performance, Security, Style
SonarLint Version: 2.1
SonarPython Version: 1.8.0

SonarPython and SonarLint are products developed by SonarSource.

SonarLint offers the ability to scan code for issues before checking it in, with minimal configuration.

Enable the Plugin

To enable SonarPython analysis, add the following to your .codeclimate.yml configuration file:

plugins:
  sonar-python:
    enabled: true

More information about the CLI is available in the README here: https://github.com/codeclimate/codeclimate

Configure the Plugin

Tests

Telling where the test classes are, also helps Sonar to use specific rules for those files.

plugins:
  sonar-python:
    enabled: true
    config:
      tests_patterns:
        - src/test/**
        - app/src/test/**

Severity

Setting a minimum severity forces Sonar to not create negligible issues.
Possible values are: info, minor, major (default), critical, blocker

plugins:
  sonar-python:
    enabled: true
    config:
      minimum_severity: critical

Understand the Plugin

For detailed information about SonarPython, please check out the documentation here:
https://www.sonarsource.com/products/codeanalyzers/sonarpython.html