Skip to content

[Question] What to expect when embedded and regular fields are also separated by a block comment #21

@manuelarte

Description

@manuelarte

Hi,

Imagine the following structs:

type BlockComments struct {
	time.Time

	/**
	 * Other important fields
	 */

	// the version
	version int

    // other field
   name string
}

type MoreComments struct {
	time.Time

	// some fields

	// the version
	version int

    // other field
   name string

   // some other fields

   // myfield
   age int
}

Right now the linter is complaining that there is too many empty lines between the embedded and regular fields.

By removing the empty line between the block comment and the 1st regular field, then the linter does not complain:

type BlockComments struct {
	time.Time

	/**
	 * Other important fields
	 */
	// the version
	version int

    // other field
    name string
}

But what do you think the linter should do in this scenario?
@ldez

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions