-
-
Notifications
You must be signed in to change notification settings - Fork 214
Revamp the linter #2234
Copy link
Copy link
Open
Description
conda-smithy includes the linter, but in the past (way back!) it was already discussed whether to break it out to a separate package, merge with conda-verify, etc. That didn't happen and we are still here, with an increasing backlog of bugs and feature requests.
My suggestion here is to:
- Create a separate package, e.g.
conda-forge-linteror something like that. - Architect it in a more modular way so we can enumerate all lint and hint rules, with their own unique identifier. This would allow for:
- Better documentation (e.g. we could have a site like
shellcheck's with all the rules, with each lint linked from the CI logs). - Optional configurability. While lints are required, hints are not. Users could either silence some of them out if noisy, or conversely, we can introduce optional hints that users can opt into. Maybe this is not a goal, but it would be possible if we ever consider that.
- Better documentation (e.g. we could have a site like
- The new architecture should make it easier to contribute new lints/hints. I envision different "hook levels" where we can add new rules. For example:
- Raw recipe lint: takes the whole recipe, unparsed.
- Rendered recipe lint.
- Per section lints (e.g. only requirements).
- Non-recipe lints (e.g. conda_build_config.yaml).
... and in general, seek inspiration in other Python linters like pylint or flake8 (the code in this one is particularly easy to follow, and is well structured).
We have made great advances with the recent refactors for recipe.yaml, so I'm confident this is workable! Let me know your thoughts.
Reactions are currently unavailable