You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It mostly matches the current KiCADv8 s-expression styling but diverges from KiCADv8's output style in that the 'xy' element inside 'pts' is also indented on a new line. This is because KiCADv8's styling rule is not consistent specifically regarding the 'pts' element.
But aside from that, it matches close enough to be useful as a 'output' cleaner for your utility, so you may want to consider piping your output though this at least.
This also provides an additional opportunity for testing your function. If you get a valid KiCADv8 document and you then lint it and also formatter the output of your kiutils then you will be able to do an automated diff to make sure there is no regression introduced.
This is because if I do not make any changes to a document then opening/saving the document should emit the same output.
The text was updated successfully, but these errors were encountered:
mofosyne
changed the title
You may want to put your output through an s-expression linter
You may want to put your output through an s-expression formatter
Sep 20, 2024
While debugging a bug in kiutils. I've written up a https://gist.github.com/mofosyne/93ad8d64fb40ef80f6af3b09dc755414 s-expression formatter for it.
It mostly matches the current KiCADv8 s-expression styling but diverges from KiCADv8's output style in that the 'xy' element inside 'pts' is also indented on a new line. This is because KiCADv8's styling rule is not consistent specifically regarding the 'pts' element.
But aside from that, it matches close enough to be useful as a 'output' cleaner for your utility, so you may want to consider piping your output though this at least.
This also provides an additional opportunity for testing your function. If you get a valid KiCADv8 document and you then lint it and also formatter the output of your kiutils then you will be able to do an automated diff to make sure there is no regression introduced.
This is because if I do not make any changes to a document then opening/saving the document should emit the same output.
The text was updated successfully, but these errors were encountered: