vertical-blank / sql-formatter

SQL formatter written with only Java Standard Library, without dependencies.
MIT License
227 stars 47 forks source link

Add a FormatConfig parameter to change max column length default #33

Closed ogirardot closed 3 years ago

ogirardot commented 3 years ago

Hi, first of all thank you for your work, it's a great tool ! I wanted to be able to change the default cutoff of 50 char for max column length, here's a pull request keeping the default behavior but adding a FormatConfig parameter to be able to change it if need be.

codecov[bot] commented 3 years ago

Codecov Report

Merging #33 (442e40d) into master (6abfcd1) will decrease coverage by 0.34%. The diff coverage is 80.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #33      +/-   ##
============================================
- Coverage     92.81%   92.46%   -0.35%     
  Complexity      198      198              
============================================
  Files            17       17              
  Lines           473      478       +5     
  Branches         35       35              
============================================
+ Hits            439      442       +3     
- Misses           24       26       +2     
  Partials         10       10              
Impacted Files Coverage Δ Complexity Δ
...vertical_blank/sqlformatter/core/FormatConfig.java 87.50% <66.66%> (-12.50%) 2.00 <1.00> (ø)
...ub/vertical_blank/sqlformatter/core/Formatter.java 98.94% <100.00%> (ø) 49.00 <0.00> (ø)
.../vertical_blank/sqlformatter/core/InlineBlock.java 93.54% <100.00%> (+0.21%) 18.00 <1.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6abfcd1...442e40d. Read the comment docs.

ogirardot commented 3 years ago

anything I can add ?

vertical-blank commented 3 years ago

@ogirardot Hi, thank you for your PR. I think that FormatConfig.FormatConfigBuilder should have maxColumnLength method. Could you please add it?

ogirardot commented 3 years ago

oops, forgot, thanks it's done