Giter Site home page Giter Site logo

Comments (3)

TaoK avatar TaoK commented on September 4, 2024

Hi,

Thanks for the bug report, nice catch on the trailing comma issue - I don't know how that issue managed to remain undetected for more than 6 months!

Your sample does also illustrate some Comment Positioning bugs, for example "libraryprod.column5" should appear on its own line after the block comment, because in the original source there is a line break after the block comment before the SQL - in general, we try to respect user-supplied line breaks before and after comments.

You mention one other issue, that of alignment of content in lines in a block comment. I would not consider this a bug, but rather standard behaviour: The formatter never does anything to the contents of Comments. One example why it behaves this way can be demonstrated with the following sample:

SELECT Something
/* 
That select was completely useless, in so many ways:
 - It was too short
 - There were problems with the identifiers:
   - There was no table, view or other "FROM" object specified
   - The "Something" name doesn't seem to reference anything
 - It was just a sample
*/

Basically, whitespace in a comment can be meaningful - not everyone uses an asterisk-bounded style.

If you're saying you'd like to see an optional flag in the formatting options somewhere for automatically lining block comment content lines up with the SQL context, that's something I can definitely do!

I expect to have the trailing comma issue addressed this weekend, and if you're still interested in optional multiline comment content alignment that's probably something I can slip in too.

hth,
Tao

from poormanstsqlformatter.

TaoK avatar TaoK commented on September 4, 2024

Comment positioning issue and comma commenting issue corrected in v1.3.1; pending feedback on block comments.

from poormanstsqlformatter.

andywuest avatar andywuest commented on September 4, 2024

works now :-) thanks.

from poormanstsqlformatter.

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.