jcberquist / commandbox-cfformat

A CommandBox module for formatting CFML component files.
MIT License
22 stars 10 forks source link

Struct-related formatting issues introduced in 0.15.7 #82

Closed TheRealAgentK closed 4 years ago

TheRealAgentK commented 4 years ago

The SQL improvements in 0.15.7 via #81 have introduced some other changes as a side-effect.

        variables.dgfsfsdfsd = {
            "28" : {
                "fghfgh"           : 28,
                "fghfgh"           : "fghfghfgh",
                "fghfghfgh"        : false,
                "fghfghffdsfdsjgh" : false
            },
            "26" : {
                "fghfgh"           : 26,
                "fghfgh"           : "fghfghfgh",
                "fghfghfgh"        : false,
                "fghfghffdsfdsjgh" : false
            }
        };

loses the existing :alignment along the :

        variables.dgfsfsdfsd = {
            "28" : {
                "fghfgh" : 28,
                "fghfgh" : "fghfghfgh",
                "fghfghfgh" :  false,
                "fghfghffdsfdsjgh" : false
            },
            "26" : {
                "fghfgh" : 26,
                "fghfgh" : "fghfghfgh",
                "fghfghfgh" : false,
                "fghfghffdsfdsjgh" : false
            }
        };

I'm not even sure how that is controlled, I can't find any rule/setting for it :-)

This behaviour also seems to structs in arguments. In this example, the items field and code would not be align anymore along the :

                validationMessages[ "validation" ].append( {
                    "field" : item[ "field" ],
                    "code"  : item[ "message" ]
                } );
jcberquist commented 4 years ago

This should be fixed in v0.15.8

TheRealAgentK commented 4 years ago

Fixed, yes!