MarkusAmshove / natls

Language Server implementation for the Natural 4GL programming language
MIT License
12 stars 3 forks source link

Linter: Disallow code between subroutines #464

Closed Claes65 closed 3 weeks ago

Claes65 commented 5 months ago

eg. this should not be allowed: DEFINE SUBROUTINE ABC ... END-SUBROUTINE PRINT 'Hello' DEFINE SUBROUTINE XYZ ... END-SUBROUTINE END whereas this is fine: DEFINE SUBROUTINE ABC ... END-SUBROUTINE DEFINE SUBROUTINE XYZ ... END-SUBROUTINE PRINT 'Hello' END

MarkusAmshove commented 5 months ago

This should be configurable via editorconfig, e.g. natls.style.disallowhangingstatements (couldn't think of a better one yet :D) defaulting to false.

Claes65 commented 5 months ago

Maybe natls.style.disallowburiedstatements?

MarkusAmshove commented 5 months ago

I like that :-)

MarkusAmshove commented 3 weeks ago

resolved by #498