Closed chrisdp closed 3 months ago
Hello @chrisdp and @TwitchBronBron I might need a little help getting started on this one ... also I have a new computer now so I may need a refresh of the instructions to download all the repositories and get started; I have them all on my Windows machine but I have a new MAC as well and would like to use that as my main machine so if you do have those setup instructions that would be handy. Thanks.
Here are the setup instructions: https://rokucommunity.github.io/vscode-brightscript-language/contributing.html#the-easy-way
However, for this issue, you should only need to work in BrighterScript-formatter repo. It has a full suite of unit tests, so you can add a new unit test with the thing you're trying to fix, and then dig around in this file. https://github.com/rokucommunity/brighterscript-formatter/blob/master/src/formatters/InteriorWhitespaceFormatter.ts
@TwitchBronBron lovely, thanks
getting
(node:25352) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
during install ... although not sure if it's just a warning or an error ... seems like a warning ... so ignoring for now ...
To do the tests, you can cd into the brighterscript-formatter
folder and then run npm run test
or run the "test" command from vscode.
basic install has worked
so that's a good start
really interesting ... seems like MAC uses 'zsh' now by default and this was not playing ball; after trying for a while and manually I gave up on this.
switched to 'bash' as default shell.
also in VSCode switched shell to 'bash'
then the installs did seem to run although I had to add 'sudo'
sudo npm run install-local
also for the watcher as well it was not working without sudo
sudo npm run watch-all --loglevel silent
sudo npm run watch-webviews
odd, anyway I think this is a MAC/npm permissions error rather than a problem with the scripts, not sure.
but after a lot of work , got the VSCode development host to run
also got the npm run tests
to work
197 passing (103ms)
=============================== Coverage summary ===============================
Statements : 100% ( 595/595 )
Branches : 100% ( 488/488 )
Functions : 100% ( 58/58 )
Lines : 100% ( 580/580 )
================================================================================
@TwitchBronBron
seems like a quick
sudo chmod -R 777 RokuCommunity
fixed the permissions issues
got a fix - will tidy it up and push for your observation @TwitchBronBron @chrisdp
@chrisdp @TwitchBronBron please have a look at proposed changes
I know you have code which actually removes the next token if it is blank; I just set the easier option of setting current text to '
https://github.com/rokucommunity/brighterscript-formatter/pull/78
Fixed by #83
notice the space between
m.
andflyoutItemHeight
should format to: