haxe-formatter icon indicating copy to clipboard operation
haxe-formatter copied to clipboard

Empty line added between license and package statement

Open Gama11 opened this issue 7 years ago • 4 comments

/*
 * Copyright (C)2005-2018 Haxe Foundation
 *
 * etc
 */
package haxe;

turns into:

/*
 * Copyright (C)2005-2018 Haxe Foundation
 *
 * etc
 */

package haxe;

I don't think you normally want an empty line there.

Gama11 avatar Feb 04 '19 00:02 Gama11

that's not a bug, that's a feature :smiley: see #292

though, one might argue whether emptylines.afterFileHeaderComment should default to 1 or 0

AlexHaxe avatar Feb 04 '19 00:02 AlexHaxe

I agree that there should be an empty line in that case, but not here.

Gama11 avatar Feb 04 '19 00:02 Gama11

@azrafe7 Out of curiosity, how would you format this case?

Gama11 avatar Feb 05 '19 12:02 Gama11

@Gama11, well, I actually like that empty line between header and package. But also wouldn't bother much if it defaulted to no empty line in this case. :)

azrafe7 avatar Feb 05 '19 17:02 azrafe7