How can we help you today? How can we help you today?

Command Line (batch) formatting

We would like to make a Jenkins task to format our SQL before committing. Is there a way to specify a "command line" command to format :?:
Chillier
0

Comments

6 comments

  • Aaron L
    Hi Chiller,
    Unfortunately there's no way to get prompt to run from the command line at the moment.

    Could I ask how you'd want this to work? A command line exe that'd take in a .sql file and an exported .sqlpromptstyle file that then writes out a new formatted .sql file?

    Thanks,
    Aaron.
    Aaron L
    0
  • Chillier
    Hei -

    Thanks, but not sure. We just want to automate the action of applying a standard formatting before committing.

    When we commit, we want the diff to show our actual changes, not programmer-specific formatting changes.... so we want to automagically apply the same formatting template to all SQL code.

    mvh Charles
    Chillier
    0
  • Aaron L
    Are you using SQL Source Control to commit your changes?

    We've had a request to automatically add prompt formatting in the commit tab on UserVoice here which sounds like it'd be exactly what you need?
    Aaron L
    0
  • Chillier
    Sounds right to me - I'll have to ask if they had other motives for using Jenkins ... but sounds right to me. I'll check.
    Chillier
    0
  • Chillier
    Should be OK to add formatting in the commit tab - preferably if we could specify the (standard) format template to be used. The objective would be compromised if everyone uses their own personal formatting before committing, even if automagically.
    Chillier
    0
  • Aaron L
    Hi Charles,

    I've let our SQL Source Control team know that you'd like this feature. It sounds like a really good idea, please do vote on the UserVoice request as it helps them to prioritise which features to work on next.

    Thanks,
    Aaron.
    Aaron L
    0

Add comment

Please sign in to leave a comment.