Skip to content

Conversation

@sitano
Copy link

@sitano sitano commented Nov 10, 2025

We use customized formatting for leading lines and can't use whitespace without having disabled leading lines check. This patch adds 2 following options for customization that would be needed to further promoted to golangci-lint:

    -ignore-leading
       Do not check leading newlines

    -ignore-trailing
       Do not check trailing newlines

However, I did probably also have mode that can do:

f() {


     
return 1
}

->

f() {

return 1
}

    -ignore-leading
       Do not check leading newlines
    -ignore-trailing
       Do not check trailing newlines

Signed-off-by: Ivan Prisyazhnyy <[email protected]>
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

Successfully merging this pull request may close these issues.

1 participant