Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function return type breaks #26

Closed
lmajano opened this issue Jun 19, 2019 · 4 comments
Closed

Function return type breaks #26

lmajano opened this issue Jun 19, 2019 · 4 comments

Comments

@lmajano
Copy link

lmajano commented Jun 19, 2019

These are my settings:

{
    "brackets.padding": true,
	"strings.quote": "double",
	"strings.attributes.quote": "double",
	"function_call.empty_padding": false,
    "function_call.padding": true,
	"function_declaration.padding": true,
	"function_call.multiline.leading_comma.padding": true,
	"function_declaration.multiline.leading_comma.padding" : true,
	"function_declaration.empty_padding": false,
	"function_declaration.group_to_block_spacing": "compact",
	"struct.padding": true,
	"struct.empty_padding": false,
	"struct.multiline.leading_comma.padding" : true,
	"array.empty_padding":false,
    "array.padding":true,
    "array.multiline.leading_comma.padding":true,
    "binary_operators.padding":true,
    "for_loop_semicolons.padding":true,
    "indent_size":4,
    "parentheses.padding":true,
    "struct.separator":" : ",
	"tab_indent":true,
	"keywords.block_to_keyword_spacing" : "spaced",
	"keywords.group_to_block_spacing" : "spaced",
	"keywords.padding_inside_group" : true,
	"keywords.spacing_to_block" : "compact",
	"keywords.spacing_to_group" : true
}

This is current code

/**
* Set form params
* @name The name of the key in the form params
* @value The value
*/
OrtusPDF function setFormParam( required string name, required string value ){
	variables.formparams[ arguments.name ] = arguments.value;
	return this;
}

This is the formated code:

/**
* Set form params
* @name The name of the key in the form params
* @value The value
*/
OrtusPDF
function setFormParam( required string name, required string value ){
	variables.formparams[ arguments.name ] = arguments.value;
	return this;
}

As you can see it puts the return type of functions in a new line

@lmajano
Copy link
Author

lmajano commented Jun 19, 2019

Ok, the setting in question that alters this is function_declaration.padding. If you trun it false, then it leaves the return type but does not pad as needed. So it seems its a bug

@jcberquist
Copy link
Owner

@lmajano Thanks for the detailed example - I can't reproduce this currently, however, using just the code in the example. Maybe there is an issue in the surrounding context?

@elpete
Copy link
Contributor

elpete commented Apr 8, 2020

I can't reproduce this either. @lmajano?

@jcberquist
Copy link
Owner

I am closing this issue as I couldn't reproduce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants