-
Notifications
You must be signed in to change notification settings - Fork 18
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
Auto formatting #677
Comments
Thanks Mauricio. Very interesting. Which is the repo you took this code from? I guess the best way would be using pythons equivalent to toml and install the package instead of just copying the code. I think this would be nice if it were possible to automate it in a windows or linux script... Or in the CI... I am tagging it as a potential enhancement. |
This is the source: https://github.com/nonnullish/octave-formatter-vscode. This pks is distributed under GPL license, is just a module, not a pkg. We can make this an external Python pkg and install it via pip, but IMHO is an overkill. But we can run the script yes as bash in CI running it recursively. Formatting checks can be addressed as a follow-up using got diff as CI stage. I guess if we are interested in, I can start running it locally and check if ONSAS keep running (syntax error could arise). |
Very interesting. The format update to all files would be a nice thing to do after for instance, all the 0.3.0 issues are solved. I guess that running the python script as stand alone is enough. I wouldn't duplicate that repo code here. I hope that package/script was converted to a package... IMHO it is an interesting package. @nonnullish have you thought about porting https://github.com/nonnullish/octave-formatter-vscode to a package so that it can be installed and executed? |
Hi, I believe this question should be directed towards @affenwiesel, the author of the source formatter (https://github.com/affenwiesel/matlab-formatter-vscode). My fork only has a small change in the VS Code config and I plan to retire it soon. |
great! thanks @nonnullish! let's wait for @affenwiesel |
Hi, I have no experience with python packages. I also don't have a lot of spare time at the moment so I'm not able to work on this project right now. Maybe some time next year. |
thanks @affenwiesel . just to be clear, I am referring to this https://packaging.python.org/en/latest/tutorials/packaging-projects/ when I talk about registering the package. Maybe at some point in the near future, me or @mvanzulli can fork and modify your project to ease the registering. |
thanks to the suggestion from @Remi-Gau we could consider using https://github.com/florianschanda/miss_hit for auto-formatting, since this can be installed as a python package |
short version:
pip install miss_hit
See this part of this blog post for more info: https://remi-gau.github.io/2022/03/31/clean-matlab.html#miss_hit |
Thank you @Remi-Gau !! |
We plan to integrate [Miss Hit](https://misshit.org/tools.html) 🤟🏼 for static code checks. The steps are as follows:
.toml
file to track dependencies and perform various static checks.The text was updated successfully, but these errors were encountered: