Nlreturn
Checks for a new line before return and branch statements.
Install / Use
/learn @ssgreg/NlreturnREADME
nlreturn
Linter requires a new line before return and branch statements except when the return is alone inside a statement group (such as an if statement) to increase code clarity.
Example
Examples of incorrect code:
func foo() int {
a := 0
_ = a
return a
}
func bar() int {
a := 0
if a == 0 {
_ = a
return
}
return a
}
Examples of correct code:
func foo() int {
a := 0
_ = a
return a
}
func bar() int {
a := 0
if a == 0 {
_ = a
return
}
return a
}
Args
-block-size nsize of the block (including return statement that is still "OK") so no return split required.
Related Skills
node-connect
341.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.6kCommit, push, and open a PR
