-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
C-enhancementCategory - New feature or requestCategory - New feature or request
Description
This is a living document laying out goals for this project and what order they should be completed in. Expect changes as time progresses.
Note
Any checkbox not yet turned into a github issue means I haven't gotten around to
fleshing out the details yet.
Table of Contents
1 Primary Goals
1.1 Make the linter as immediately useful as possible
- Support disable directives #184 (partially implemented: global directives are supported, but line directives aren't)
- Auto-fix lint rule violations #183
- Specify one or more files or directories to lint
- Respect
.gitignoreand.zlintignore#291 - Per-rule configuration (feat: per-rule docs #270)
1.2 Cross-file analysis
- Control flow analysis
- Should happen at bind time
- Add thread-safe arena collection (e.g.
bumpalo-herd)- Stores memory arena + parse/bind results
- Build a module graph
- Split semantic analysis into bind and check phase
- happens in isolation (and thus is embarrassingly parallel) while check is cross-file
- In order to split, reference analysis must move to check phase
- check will eventually perform type checking
- Consider supporting "isolated" check (less informative, but can be done in parallel)
1.3 Editor integrations
- prereq: add a
fsabstraction layer- will allow for easy integration with LSP's
Documentand its related commants
- will allow for easy integration with LSP's
- Implement LSP API layer
- Consider moving this into a separate repository so others may benefit
- Consider using https://github.com/kristoff-it/zig-lsp-kit
1.4 Add a type checker
This is directly dependent on/blocked by goal 2.
- Prototype this to figure out what needs to get done and how it should be structured
1.5 Detect undefined behavior using an SMT solver
Dependent on control flow analysis.
- Integrate with Z3 (or some other SMT solver)
2 Auxilliary Goals
Objectives not in the critical path but are pretty important. Most of these can be done in isolation and are generally good ways for newcomers to contribute.
2.1 Data structures
These data structures are needed by one or more zlint subsystems for performance reasons. They should be made available to the broader Zig community, either as an isolated zlint export or by moving them to another repository.
- Implement a highly performant multi-sender, single-consumer queue
- Currently a major bottleneck for sending lint diagnostics to the reporter. Linter threads and reporter thread all fight over a single mutex lock.
- Implement a string intern pool
- Basically port stern-rs to Zig.
-
Port DashMap to Zigstarted, its called Dora Still a WIP and needs to be consumed in ZLint.
2.2 Stability
- Add benchmarks for semantic analysis
- Add benchmarks for linting
- Lint projects using ZLint in ecosystem CI to check for regressions
2.3 Administrative
- Contact the Codspeed team re. supporting Zig
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-enhancementCategory - New feature or requestCategory - New feature or request