-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
add: zig check [source] #5208
Comments
Currently, this can be done using test "" {
meta.refAllDecls(@This());
} Example: https://github.com/ziglang/zig/blob/master/lib/std/std.zig |
What sort of errors? Many code paths are intentionally errors on various combinations of architecture/OS. The long term plan here is #3028 |
Here's a more concrete proposal for how this could be done:
This sort of check would catch problems like this, which are not caught by refAllDecls because the function is generic: pub fn foo(x: anytype) u32 {
x.bar();
return "foo";
} |
Closing as Too Complicated. I also want to note that since this proposal was filed, zig has gained the |
The issue is that the compiler won't give any error messages if the code/function isn't called.
This check mode should deactivate the lazy compilation so that the whole code will be analyzed/checked for errors.
Similar to Rust "cargo check"
The text was updated successfully, but these errors were encountered: