lintian-brush: Split detection from fixers
Currently, lintian-brush fixers combine both detection (finding issues) and fixing (resolving them) in a single pass. This project aims to split these concerns: detectors would yield issues, each with zero or more associated actions that can resolve the issue. This architecture is essential for building Language Server Protocol (LSP) support, where issues need to be detected and presented to users with quick-fix actions they can choose from.
Confirmed Mentor: JelmerVernooij
How to contact the mentor: mail, IRC/Matrix
Confirmed co-mentors: Otto Kekalainen
Difficulty level: Medium to Hard
Project size: 350 hour (large)
Deliverables of the project:
- A new trait-based architecture separating Detector and Action responsibilities
- Issue representation structure containing location information, severity, descriptions, and associated quick-fix actions
- Refactored implementation of 15-20 existing fixers to use the new detection/action architecture
- LSP-compatible diagnostic output format with associated code actions
- Command-line interface updates to support both traditional "auto-fix" mode and new "detect-only" mode
- Integration with debian-analyzer to provide LSP-ready diagnostics for debian-lsp
- Documentation for writing detectors and actions separately, updating the fixer-writing-guide
- Test suite ensuring refactored fixers maintain identical behavior to originals
Desirable skills: Knowledge of Debian packaging, Rust programming (particularly traits and ownership patterns), experience with parser design and AST manipulation
What the intern will learn:
- Advanced Rust programming including trait design, lifetime management, and performance optimization
- Deep understanding of Debian package formats and control files
- Parser design patterns and AST manipulation techniques
- How Language Server Protocols (LSP) work and how to design APIs suitable for LSP integration
Application tasks:
- Write a simple Rust program that parses debian/control using the debian-control crate and prints out all binary package names
Profile lintian-brush on a sample Debian package and identify how many times the same files are parsed (hint: use cargo build --release and tools like perf or strace)
- Review the existing fixer code in lintian-brush/src/fixers/ and identify 2-3 fixers that operate on the same files
Related projects:
?https://salsa.debian.org/jelmer/lintian-brush, debian-analyzer, deb822-lossless, debian-changelog, debian-copyright
AI usage Policy: AI code assistance is acceptable for exploration and learning, but the intern is expected to make all the code changes.
