Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API for linting/analyzing the Klipper config #973

Open
chexxor opened this issue Mar 3, 2025 · 0 comments
Open

API for linting/analyzing the Klipper config #973

chexxor opened this issue Mar 3, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@chexxor
Copy link

chexxor commented Mar 3, 2025

Is your feature request related to a problem? Please describe

The Klipper config I have is spread across several files, and I'd like to have better tools to understand issues.

Describe the solution you'd like

I would like to have a linter/static analysis tool I can run against the current state of the config resulting from the parsed printer.cfg. I'd like to make those linter results available in the web front-end, as that is where I commonly do my Klipper config edits.

I'm not sure whether I'd need to add the linter to the Klippy project itself and simply use Moonraker to provide API access to it.

Describe alternatives you've considered

No response

Additional information

I've looked into updating the file editor of the Mailsail project first, but it only has access to a single file at a time in its file editor. To accomplish this feature request, the linter would need access to the parsed/compiled result of the printer.cfg file, and Moonraker is in a better position for that. If we have an API endpoint in Mailsail, we could return the linter results in a structured format to Mailsail, which can translate it into a format suitable for the Codemirror editor.

@chexxor chexxor added the enhancement New feature or request label Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant