Skip to main content

CodeLint

CodeLint is a lightweight Python module that ensures your code complies with PEP 8 standards. By identifying common issues like long lines, incorrect indentation, inconsistent naming conventions, and unnecessary whitespace, CodeLint helps you write clean, professional, and maintainable Python code.


Table of Contents

Key Features Installation Usage Running Tests How It Works Contributing License


Key Features

  • Line Length Check: Flags lines exceeding a specified maximum length.
  • Indentation Check: Detects incorrect visual indentation (e.g., mixed tabs and spaces).
  • Snake Case Check: Ensures variable and function names follow the snake_case naming convention.
  • Whitespace Check: Identifies trailing whitespace and excessive blank lines.

Installation

Install CodeLint easily using pip:

pip install codelint

Installation Screenshot


Usage

CodeLint can be run directly from the terminal to analyze Python files for PEP 8 violations.

Command:

codelint <file.py>

Example:

>> pip install codelint
>> codelint my_script.py

Usage Example Screenshot


Running Tests with Pytest

CodeLint includes comprehensive tests to ensure functionality and reliability. Follow these steps to run the test suite:

  1. Clone the repository:

    git clone https://github.com/Aditya-1998k/CodeLint.git
    
  2. Navigate to the project directory:

    cd CodeLint
    
  3. Install pytest:

    pip install pytest
    
  4. Run the tests:

    pytest tests/test_checker.py
    

Example:

Test Example Screenshot


How It Works

CodeLint scans your Python files for the following issues:

  • Line Length: Checks for lines that exceed the standard maximum length (default is 79 characters).
  • Indentation: Ensures consistent indentation (e.g., no mixing of tabs and spaces).
  • Snake Case Naming: Verifies that function and variable names adhere to PEP 8's snake_case standard.
  • Trailing Whitespace: Identifies and flags any trailing spaces at the end of lines.
  • Excessive Blank Lines: Warns about more than one consecutive blank line.

Contributing

We welcome contributions from the community! To contribute:

  1. Fork the repository.
  2. Create a new branch for your feature:
    git checkout -b feature-name
    
  3. Commit your changes:
    git commit -m "Add feature-name"
    
  4. Push to your branch:
    git push origin feature-name
    
  5. Submit a pull request.

License

CodeLint is licensed under the MIT License. See the LICENSE file for details.


CodeLint helps you maintain high coding standards effortlessly. Install today and ensure your Python projects adhere to best practices! 🚀

Metadata

Release files for codelint 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for codelint 0.1.7
File Size Uploaded
codelint-0.1.7.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for codelint 0.1.7
File Interpreter ABI Platform
codelint-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 10.9 kB

Release files / codelint-0.1.7.tar.gz

Download URL codelint-0.1.7.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1e9c40db01665696412acabb3f9f62c6ddb942d96286eeb5bf7b8634085e2eea
BLAKE2b-256 checksum
How to use checksums
36c64ac2fd52f16072c8dde5345eab77f49a87f011faf9f84b962a63749c83d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.6

Release files / codelint-0.1.7-py3-none-any.whl

Download URL codelint-0.1.7-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3b25b88ea30f119504d46507adec30aeab3de297aa56790d6c9c75f2457579c1
BLAKE2b-256 checksum
How to use checksums
10564c20b9db633ab0f69e9426d53b59b8f35b072a0ae37eb3168024b8df6a59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.6

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page