Some questions on Beautifier capabilities

Hello,

My company is considering applying formatting via Beautifier to a whole 20+ y.o. git repository holding code for a large homegrown system.
From what I've seen it's possible to just script out a batch style file with "beaut <filepath>" instructions and run that from the command window inside the IDE.
If there is btw a better way to go about it, any advice is welcome.
So:

1) I test ran this and across a couple hundred files, saw some errors, altho when randomly opening one of the files the process seems to have crashed on, I am seeing the file itself have formatting applied properly (I have beautifier configured to apply upon open/close/compile/save atm) - any way to see what the errors are?
the error count is below 1% of the files so not a problem to revisit these few exceptions manually, just curious what happened

2) We're using version 15 of the IDE atm, and are considering upgrading to 16 - have there (hopefully) been any feature extensions in scope of Beautifier itself (more options to custom format the code etc) ?
Mostly we'd be hoping for a more configurable indenting system for scope (for example there are methods holding other method declarations in them at times - it would thus boil down to quite a significant indenting here/there, while we do want to maintain the generic "2 spaces" rule in most cases)
Alternatively, as this was hinted by someone here but I am unsure if true - is it possible to achieve a bit more in this scope via editing the ruleset .br file manually rather than just picking options via UI?

Regards,
DT
 
Last edited:
1. If you let me know what the errors are, we can look into this.

2. Version 16 did not add any features to the formatting options of the PL/SQL Beautifier, but it did fix some bugs.
 
Hello,

My company is considering applying formatting via Beautifier to a whole 20+ y.o. git repository holding code for a large homegrown system.
From what I've seen it's possible to just script out a batch style file with "beaut <filepath>" instructions and run that from the command window inside the IDE.
If there is btw a better way to go about it, any advice is welcome.
So:

1) I test ran this and across a couple hundred files, saw some errors, altho when randomly opening one of the files the process seems to have crashed on, I am seeing the file itself have formatting applied properly (I have beautifier configured to apply upon open/close/compile/save atm) - any way to see what the errors are?
the error count is below 1% of the files so not a problem to revisit these few exceptions manually, just curious what happened

2) We're using version 15 of the IDE atm, and are considering upgrading to 16 - have there (hopefully) been any feature extensions in scope of Beautifier itself (more options to custom format the code etc) ?
Mostly we'd be hoping for a more configurable indenting system for scope (for example there are methods holding other method declarations in them at times - it would thus boil down to quite a significant indenting here/there, while we do want to maintain the generic "2 spaces" rule in most cases)
Alternatively, as this was hinted by someone here but I am unsure if true - is it possible to achieve a bit more in this scope via editing the ruleset .br file manually rather than just picking options via UI?

Regards,
DT

Two spaces never seemed enough for PL/SQL in my opinion, as SQL itself has a lot of indents which are more than two spaces, so you often don't get a clear visual block with less than four.

I find formatters in general always end up being frustrating, as there will be rules that don't quite work in some cases, e.g. I generally want stacked lists for select lists but not for function parameters, I want a space before opening brackets for subqueries but not for functions, I want a space after commas all the time, dammit PL/SQL Developer. I find ChatGPT makes a better job of it, but of course you can't really use that in a bulk editing script. I did wonder if I could use AI vibe coding to write a PL/Developer plugin with all of this kind of thing taken care of, but in my experience the kind of corporate IT sites that use Oracle don't let you download plugins either. Maybe I could try it with Python or PowerShell one of these days.

On the other hand, developers are always hopeless at layout, and almost anything is better than the typical randomly indented, randomly uppercase spaghetti code hell that you typically find. Good luck!
 
Back
Top