Git Product home page Git Product logo

Comments (7)

markushohloch avatar markushohloch commented on May 28, 2024 1

Ok, thank you very much for your quick response. I can ask the SQL Developer Team if they can take a look at it.

from plsql-formatter-settings.

PhilippSalvisberg avatar PhilippSalvisberg commented on May 28, 2024

Thanks @markushohloch for reporting this issue. Could you please provide a little example? Thank you.

from plsql-formatter-settings.

PhilippSalvisberg avatar PhilippSalvisberg commented on May 28, 2024

Ok, I can reproduce it.

select * from dual;

-- test comment
select * from dual;

First format result under macOS. I can repeat formatting it. Result stays the same.

SELECT *
  FROM dual;

-- test comment
SELECT *
  FROM dual;

First format result under Windows:

SELECT *
  FROM dual;


-- test comment
SELECT *
  FROM dual;

Second format result under Windows:

SELECT *
  FROM dual;




-- test comment
SELECT *
  FROM dual;

I guess the problem is the preference Line breaks -> After statements -> Preserve original.

Obviously Preserve original does not work on any platform. I tried to change it to Single break. This seams to work.

However, the behavior is still strange. This time on macOS where the number of lines is reduced by every formatter call until it's just one empty line. I consider this a bug of the formatter Java class and not of the Arbori program. So we have to inform the SQL Developer team to fix that.

from plsql-formatter-settings.

PhilippSalvisberg avatar PhilippSalvisberg commented on May 28, 2024

I checked with default settings. For Line breaks -> After statements -> Double break. This works differently under Windows and macOS as well.

Adding "spaces" on empty lines changes the behavior as well. Really strange.

Using Single break or Double break seems to be the only feasible workaround for the time being.

from plsql-formatter-settings.

PhilippSalvisberg avatar PhilippSalvisberg commented on May 28, 2024

Yes, please. Could you also post the link here? Thanks a lot.

from plsql-formatter-settings.

markushohloch avatar markushohloch commented on May 28, 2024

You're welcome. https://twitter.com/MarkusHohloch/status/1250110284032806919

from plsql-formatter-settings.

markushohloch avatar markushohloch commented on May 28, 2024

https://community.oracle.com/message/15597056#15597056

from plsql-formatter-settings.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.