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

Does not show errors in _test.go files #10

Open
Jacalz opened this issue Aug 1, 2021 · 3 comments
Open

Does not show errors in _test.go files #10

Jacalz opened this issue Aug 1, 2021 · 3 comments

Comments

@Jacalz
Copy link

Jacalz commented Aug 1, 2021

I use this package a lot but it seems to fail to provide errors within test files. This is unfortunate as it makes writing tests take a lot more time than what it necessarily needs to.

@Jacalz Jacalz changed the title Does not work in _test.go files Does not show errors in _test.go files Aug 1, 2021
@zyedidia
Copy link
Member

zyedidia commented Aug 2, 2021

I'm not able to reproduce this issue. When I save in x_test.go the file is reformatted correctly. You could try editing the plugin in ~/.config/micro/plug/go/go.lua and add some micro.Log(...) calls to check what is going wrong (make sure to run micro with -debug to generate the log.txt file).

example log call in lua:

local micro = import("micro")
micro.Log("test")

@Jacalz
Copy link
Author

Jacalz commented Aug 2, 2021

I was initially partially wrong when writing this issue. Formatting seems to work but any code errors are not reported for me (no indication where errors are and no text to show what's wrong).

@bjoerndemeyer
Copy link

bjoerndemeyer commented May 26, 2022

Indeed, this is because tests need to be compiled with go test -c in order to get detailed syntax errors. I am having the same problem.

EDIT although this might be more related to the linter plugin.

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

3 participants