Squirrel autoformatter #681
Pinned
GeckoEidechse
started this conversation in
Research
Replies: 1 comment
-
If you want to implement some state-of-the-art thing for that, then I also suggest adding a support for r1-syntax-only mode, as technically it's for the most part a subset of r2 one, so on paper it shouldn't be that much more effort if already doing it all, right.......? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What?
This has been on my mind since like the early days of Northstar but I realise I never wrote it down.
Titanfall2 uses a custom flavour of Squirrel referred to as
squirrel_re
which adds some additional typing functionality among other things.We should develop (or use an existing tool) to format
squirrel_re
code so that we could have consistent formatting. Such a tool would ideally run both on command line (so that we can use it in CI) and inside some IDE/editor (preferably vscode as it's the most common editor) so that formatting can easily be applied by the developer while they are writing their code.Why?
Having an autoformatter for
squirrel_re
could help us tremendously in cleaning up existing code formatting (so many random trailing whitespaces and inconsistent formatting ong) and could also allows us to better compare our changes against vanilla code (by running both vanilla scripts and Northstar modified code through the same formatter and comparing the diff).It would also automate some of the reviewing work done for NorthstarMods as right now we have to do all formatting checks by hand and some whitespace changes can still slip through.
Related projects:
By @cpdt
By @uniboi
By @r-ex
Other
squirrel_re
)https://marketplace.visualstudio.com/items?itemName=marcinbar.vscode-squirrel
squirrel_re
)https://marketplace.visualstudio.com/items?itemName=marcinbar.vscode-squirrel-linter
Bounty:
I'm putting a 50€ on this. To be precise, if someone delivers a Squirrel formatter that can be run in CLI and/or CI or some other automated fashion, they will get the bounty payout. I'm happy to increase the payout for additional functionality like e.g. a formatter and parser in one single tool (bonus points for LSP).
For the payout it does not matter whether your tool is written from scratch or forked from one of the existing tools. You'll get the full payout in either case. What counts is the working end result.
Beta Was this translation helpful? Give feedback.
All reactions