Skip to content

Using flycheck-crystal in practice #25

@hinrik

Description

@hinrik

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions