Skip to content

lightweight Python linter that helps keep your code clean and error-free with minimal configuration.

License

Notifications You must be signed in to change notification settings

jerankda/splint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Splint

A fast, simple, and easy-to-use Python linter.

Build Status License Version

##Splint is a Python linter designed to help you catch common issues, enforce coding standards, and improve your Python code.

⚠️ Note: Splint is currently in early development


Installation

pip install splint

Usage

splint <path-to-your-python-file>

Features

Working Features:

  • Syntax Checking: Validates Python code syntax using ast.parse.
  • Indentation Checking: Ensures correct indentation levels and alignment.
  • Line Length Checking: Verifies that lines do not exceed a specified length.
  • Naming Conventions Checking: Enforces snake_case for functions and classes, camelCase for variables, and CONSTANT_CASE for constants.
  • Unused Imports Checking: Identifies and reports unused imports.
  • Docstrings Checking: Ensures all functions, classes, and modules have docstrings.
  • Magic Numbers Checking: Detects and flags "magic numbers" that are outside a specified range.
  • Code Complexity Checking: Estimates complexity based on decision points within functions.
  • Deprecated Functions Checking: Flags usage of deprecated functions.

Not Yet Implemented:

  • Single Responsibility Principle Checking: Analysis to ensure that each function or class adheres to the Single Responsibility Principle.
  • Formatting Checking: Comprehensive checks for adherence to PEP8 formatting standards, including code style and formatting rules.
  • Cyclomatic Complexity Checking: Analysis of cyclomatic complexity to measure the number of linearly independent paths through the code.
  • Magic Methods Checking: Verification for the presence and proper implementation of common Python magic methods.
  • PEP8 Compliance: Full compliance with PEP8 style guide for Python code.
  • Code Smells Detection: Identification of common code smells that may indicate potential issues or areas for improvement.
  • Documentation Coverage Checking: Verification to ensure that code is adequately documented.
  • Refactoring Opportunities Checking: Detection of potential areas in the code that may benefit from refactoring.
  • Performance Checking: Analysis to identify potential performance bottlenecks and optimizations.
  • Security Vulnerabilities Checking: Identification of potential security vulnerabilities in the code.

About

lightweight Python linter that helps keep your code clean and error-free with minimal configuration.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages