Skip to content

[Feature] Add linting with Ruff #24

@AmanatAliPanhwer

Description

@AmanatAliPanhwer

🌟 Summary

Integrate Ruff into the development workflow to enforce code style and catch common errors.

🧩 Problem or Motivation

The codebase currently lacks an automated tool for ensuring code quality and consistency. This can lead to stylistic inconsistencies and potential bugs.

🧰 Proposed Solution

  • Add Ruff to the project's development dependencies in pyproject.toml.
  • Create a ruff.toml or pyproject.toml configuration file with sensible defaults, based on PEP 8.
  • Add a script to pyproject.toml to run the linter (e.g., uv run lint).
  • Integrate the linter into the CI/CD pipeline (.github/workflows/python-app.yml) to run on every push and pull request.
  • Run an initial pass of the linter over the existing codebase and fix any reported issues.

📦 Technical Considerations

  • Frontend changes (HTML/JS/CSS)
  • Backend changes (Flask, Supabase)
  • Database changes
  • Authentication/Authorization
  • UI/UX improvements

🧠 Alternatives

We could use other linters like flake8 or pylint, but Ruff is known for its speed and ease of configuration.

🧾 Additional Context

This will improve code quality and make the project easier to maintain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions