Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using --apply-fixes with _pragma results in weird code #138

Open
sebastiaanspeck opened this issue Nov 16, 2024 · 0 comments
Open

Using --apply-fixes with _pragma results in weird code #138

sebastiaanspeck opened this issue Nov 16, 2024 · 0 comments

Comments

@sebastiaanspeck
Copy link
Contributor

sebastiaanspeck commented Nov 16, 2024

When having this snippet, there is an issue that between $ and _pragma..., there should be a newline.

_package user

def_slotted_exemplar(:a, {})
$
_pragma(classify_level=restricted, topic={magik_lint})
_method a.b
	## Do something that returns :b
	##
	>> :b
_endmethod
$

When running the magik-lint with --apply-fixes, it becomes:

_package user

def_slotted_exemplar(:a, {})
$_pragma(classify_level=restricted, topic={magik_lint})
_method a.b
	## Do something that returns :b
	##
	>> :b
_endmethod
$

If I remove the _pragma and have _method on the next line, it won't format anyway.

Even if I run it with --apply-fixes on the next snippet, it will result in the weird code:

_package user

def_slotted_exemplar(:a, {})
$

_pragma(classify_level=restricted, topic={magik_lint})
_method a.b
	## Do something that returns :b
	##
	>> :b
_endmethod
$
@sebastiaanspeck sebastiaanspeck changed the title Using --apply-fixes with _pragma results in broken code Using --apply-fixes with _pragma results in weird code Nov 16, 2024
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

No branches or pull requests

1 participant