Skip to content

implement framework for linter and one rule - #990

Closed
Marmare314 wants to merge 4 commits into
typst:mainfrom
Marmare314:linter
Closed

Marmare314 wants to merge 4 commits into
typst:mainfrom
Marmare314:linter

Conversation

@Marmare314

@Marmare314 Marmare314 commented Apr 26, 2023 •

Copy link
Copy Markdown
Contributor

The structure of the linter itself is inspired by @astrale-sharp's formatter.

@laurmaedje

Copy link
Copy Markdown
Member

Sorry for not responding. Hints for errors have since been merged through another PR. Regarding the syntactic linting: I'm not yet completely convinced by the Rule trait and how it works. My approach would be to implement a couple of lints without too much framework first and then we can see from there what kind of abstraction works well. In my experience, writing the abstraction before its usage leads to unnecessary complexity.

If linting is non-incremental (which seems sensible), I would also suggest to store all lints into one big Vec instead of returning individual vectors per node.

@Marmare314

Copy link
Copy Markdown
Contributor Author

Superseded by #1731.

@Marmare314 Marmare314 closed this Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants