This post is a tease. It’s also a request.
Send me your ugly code.
In version v4.2 of SQL Developer – to be released in calendar year 2016 – we’ll be offering a new formatter for your SQL and PL/SQL. It’s got a completely new engine under the hood. It’s faster. It’s more efficient. And it sounds really cool too – which is what most gearheads care about most.
I’ve taken many, many, many requests for a ‘better’ formatter as product manager for SQL Developer. Now it’s time for some explicit requests. Like, I need your ugly code, and I need to know how you want to make it look, or where our current formatter ‘breaks’ your code.
As an example, we have this request on the Exchange:
--SQL Formatter API --Description: I can't even cover all the issues I have with the SQL formatter, so I'm just going to request a formatting API. --Here is just 1 scenario where the SQL formatter does not meet our needs: --Desired: CREATE OR REPLACE PACKAGE BODY "PKGX" AS FUNCTION FX(P1 IN INTEGER, P2 IN INTEGER) RETURN INTEGER IS VX INTEGER := 0; Vy INTEGER := 1; BEGIN FOR i = 1..5 LOOP DBMS_OUTPUT.PUT_LINE(i); END LOOP; RETURN 0; END FX; END "PKGX";
Here’s what it formats to in version 4.2 with the default settings:
Yes, we will have an Early Adopter/Beta process for version 4.2. So you’ll be able to have a go at the new formatter before it’s final. Send me your code and your comments, and I’ll give it a whirl and see how much closer we are to your code nirvana in 4.2.
There are 18 requests on the Exchange for the formatter. I’m reviewing all of them now. Make sure you get yours into the system while the oven is hot and ready for them 🙂