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 flycheck-crystal in practice #25

Open
hinrik opened this issue Dec 29, 2018 · 1 comment
Open

Using flycheck-crystal in practice #25

hinrik opened this issue Dec 29, 2018 · 1 comment
Labels

Comments

@hinrik
Copy link
Contributor

hinrik commented Dec 29, 2018

How do you generally use flycheck-crystal? I find that it's basically useless for lots of perfectly fine code because compiling the source file you're editing on its own can give errors about missing namespaces or namespaces that are incorrectly loaded as modules when they should be classes.

This is not an issue for real-world compilation as the compilation targets (such as bin/something or spec/something_test.cr) usually follow a pattern of calling a main module/class file (e.g. src/something.cr) which loads everything and does so in the correct order.

I thought about extending the call to flycheck-define-checker to also compile spec/spec_helper.cr if it exists, but that's not so clean since a lot of projects use it to set up mocks and other things.

@yxhuvud
Copy link
Contributor

yxhuvud commented Dec 29, 2018

This is the same problem #18 would fix and also the same issue that #20 report.

Please have a look at the discussion in #18 and if you have any ideas of how to move forward, please add your suggestion (or fix!) in the thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants