jcberquist / commandbox-cfformat

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

Curious case of space additions on properties #85

Open lmajano opened 4 years ago

lmajano commented 4 years ago

I have a curious case, where every time I run the formmater on the code, my properties get spaced out further and further, instead of aligning.

{
    "array.empty_padding": false,
    "array.padding": true,
    "array.multiline.min_length": 50,
    "array.multiline.element_count": 2,
    "array.multiline.leading_comma.padding": true,
    "array.multiline.leading_comma": false,
    "alignment.consecutive.assignments": true,
    "alignment.consecutive.properties": true,
    "alignment.consecutive.params": true,
    "brackets.padding": true,
    "comment.asterisks": "align",
    "binary_operators.padding": true,
    "for_loop_semicolons.padding": true,
    "function_call.empty_padding": false,
    "function_call.padding": true,
    "function_call.multiline.leading_comma.padding": true,
    "function_call.casing.builtin": "cfdocs",
    "function_call.casing.userdefined": "camel",
    "function_call.multiline.element_count": 3,
    "function_call.multiline.leading_comma": false,
    "function_call.multiline.min_length": 50,
    "function_declaration.padding": true,
    "function_declaration.empty_padding": false,
    "function_declaration.multiline.leading_comma": false,
    "function_declaration.multiline.leading_comma.padding": true,
    "function_declaration.multiline.element_count": 3,
    "function_declaration.multiline.min_length": 50,
    "function_declaration.group_to_block_spacing": "compact",
    "function_anonymous.empty_padding": false,
    "function_anonymous.group_to_block_spacing": "compact",
    "function_anonymous.multiline.element_count": 3,
    "function_anonymous.multiline.leading_comma": false,
    "function_anonymous.multiline.leading_comma.padding": true,
    "function_anonymous.multiline.min_length": 50,
    "function_anonymous.padding": true,
    "indent_size": 4,
    "keywords.block_to_keyword_spacing": "spaced",
    "keywords.group_to_block_spacing": "spaced",
    "keywords.padding_inside_group": true,
    "keywords.spacing_to_block": "spaced",
    "keywords.spacing_to_group": true,
    "keywords.empty_group_spacing": false,
    "max_columns": 100,
    "metadata.multiline.element_count": 3,
    "metadata.multiline.min_length": 50,
    "method_call.chain.multiline" : 3,
    "newline":"\n",
    "property.multiline.element_count": 3,
    "property.multiline.min_length": 30,
    "parentheses.padding": true,
    "strings.quote": "double",
    "strings.attributes.quote": "double",
    "struct.separator": " : ",
    "struct.padding": true,
    "struct.empty_padding": false,
    "struct.multiline.leading_comma": false,
    "struct.multiline.leading_comma.padding": true,
    "struct.multiline.element_count": 2,
    "struct.multiline.min_length": 60,
    "tab_indent": true
}

image image image

lmajano commented 4 years ago

Any thoughts on why it would keep adding spaces?

jcberquist commented 4 years ago

Have you checked what version of cfformat you are using? I think this was an issue, but has been fixed in the latest versions. At any rate, I can't reproduce it now with the settings you provided.

lmajano commented 4 years ago

I am using the latest. It happens when using the watcher only.

jcberquist commented 4 years ago

I am sorry, I can't reproduce this. I tried using the watcher, but it too seems to be behaving properly for me.

If you are on the latest version, I am not sure what is going on. Like I said, this sort of behavior was an issue in the past, but I believe it was fixed in v0.15.2. Do you have a file I could test where it is happening for you?