Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rulebook-pylint

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rulebook-pylint

Extended lint rules for JVM and Python

  • 0.1
  • PyPI
  • Socket score

Maintainers
1

CircleCI Codecov
Maven Central OpenJDK
Package Index Package Index Test Python

Rulebook

Third-party rules for JVM and Python lint tools, meant to be used in conjunction with official ones. Most of the rules are opinionated personal code styles. However, some already exists in other linters, providing the same experience across multiple languages.

LanguageLinterVariants
KotlinKtlintKtlint Style
JavaCheckstyleSun Style or Google Java Style
GroovyCodeNarcGroovy Style
PythonPylintPylint Style or Google Python Style

View all rules

Download

Maven

repositories {
    mavenCentral()
}

dependencies {
    ktlint "com.hanggrian.rulebook:rulebook-ktlint:$version"
    checkstyle "com.hanggrian.rulebook:rulebook-checkstyle:$version"
    codenarc "com.hanggrian.rulebook:rulebook-codenarc:$version"
}

PyPI

pip install pylint regex rulebook-pylint

Usage

Ktlint

  • Apply Ktlint Integration to Gradle project.
  • Using configuration ktlint, add this project as dependency.
configurations {
    ktlint
}

dependencies {
    ktlint "com.hanggrian.rulebook:rulebook-ktlint:$libraryVersion"
}

// the rest of ktlint tasks' configuration

Checkstyle

  • Apply Checkstyle Gradle Plugin.
  • Using configuration checkstyle, add this project as dependency.
  • Point to local config file or put in /config/checkstyle/codenarc.xml.
plugins {
    checkstyle
}

checkstyle {
    toolVersion "$checkstyleVersion"
    configFile "path/to/rulebook_checkstyle.xml"
}

dependencies {
    checkstyle "com.hanggrian.rulebook:rulebook-checkstyle:$libraryVersion"
}

CodeNarc

  • Apply CodeNarc Gradle Plugin.
  • Using configuration codenarc, add this project as dependency.
  • Point to local config file or put in /config/codenarc/codenarc.xml.
plugins {
    codenarc
}

codenarc {
    toolVersion "$codenarcVersion"
    configFile "path/to/rulebook_codenarc.xml"
}

dependencies {
    codenarc "com.hanggrian.rulebook:rulebook-codenarc:$libraryVersion"
}

Pylint

  • Point config file to local pylintrc.

First time installation

Presuming the IDE is IntelliJ IDEA or PyCharm, consider applying the linter style to it.

Ktlint

Explained in Ktlint IntelliJ IDEA Configuration, using standard Kotlin coding conventions is enough:

  • In File > Settings > Editor > Code Style > Kotlin, set from Kotlin style guide.
  • Append kotlin.code.style=official to root gradle.properties.

Checkstyle

Explained in Google Java Format:

Pylint

Apply few changes in settings:

  • In File > Settings > Editor > Code Style > Python > Blank Lines:
    • Set After local imports and Before the first method to 0.
    • Set the rest to 1.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc