Skip to content

Python : Pylint Intensity & Configuration Test Suite #350

Description

@kimpro82

1. Objective

The goal of this project is to build a lightweight, self-contained test environment designed to evaluate, compare, and fine-tuning Pylint’s linting intensity levels. By utilizing a purposely flawed sample script riddled with humorous errors and stylistic violations alongside configurable setting files and automation scripts, developers and AI assistants can measure the signal-to-noise ratio of Pylint output under different strictness configurations (e.g., full checks vs. errors-only vs. customized rule suppression).

2. Project Architecture & Components

The repository will be structured with the following core components. (Note: Only the structural framework, configuration templates, and sample code placeholders are required for this phase; production implementation code is excluded.)

A. Sample Python Code (sample_code.py)

A quirky, deliberately over-engineered script that triggers a wide range of Pylint messages across all five categories (Error, Warning, Refactor, Convention, and Fatal).

Characteristics to include in the script:

  • Fatal/Error: Undefined variable references or incorrect imports disguised as mystical prophecies.
  • Warning: Dangerous default mutable arguments (e.g., feeding a dragon a list of snacks that accumulates over time).
  • Refactor: Excessively long functions, deep nesting, or redundant boolean expressions explaining why humans shouldn't trust artificial intelligence too much.
  • Convention: Missing module/function docstrings, bizarre variable naming conventions (x_The_Chosen_One, magicNumber), and chaotic spacing.

B. Automation Script (setup_linter.sh)

A Bash script designed to automate the environment initialization and configuration generation process.

Responsibilities:

  • Checks for Pylint installation.
  • Generates a default configuration file (pyproject.toml or .pylintrc) using Pylint's native generator commands.
  • Provides interactive or preset command-line flags to test different intensity profiles (e.g., --errors-only, custom --disable profiles for Conventions and Refactors).

C. Configuration Files (pyproject.toml / .pylintrc)

Pre-configured profiles demonstrating tiered linting thresholds:

  1. Strict Profile (Default): All checkers enabled.
  2. Pragmatic AI/Developer Profile: Errors (E) and Warnings (W) enabled, with Conventions (C) and Refactors (R) suppressed or filtered to reduce noise.
  3. Custom Suppressions: Targeted exclusions for frequent stylistic annoyances (e.g., missing-docstring, invalid-name).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions