-
Notifications
You must be signed in to change notification settings - Fork 34
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
undefined references #321
Comments
Thanks, yeah I need to use some linting.Also be nice to have 100% test coverage one day... |
Ok these seem to be in a few categories: obscure edge cases I never tested like reversing affine transformed dims, 3d polygons which are rare but really need testing, and actually bad bugs like If you are ever interested in helping improve test coverage it would be good to do some kind of drive push this up into the high 90s at some stage. I also wonder if its possible to run this JET.jl in the tests so this cant happen again. |
I just ran the entire package through JET, which creates a wall of text. I'm quite impressed, it not only found the bugs listed above, but also bugs in HDF5 and DiskArrays. Some of them could have been prevented by using a linter, but not all; it also traced generated code, which a linter is probably not able to do. The errors are mostly: undefined variables, "may throw xy" errors (mostly through undefined keywords / used kwargs without default), invalid builtin function calls, no method matching, trying to iterate over nothing, and some more. Maybe it's possible to filter / focus on one error type after the other, e.g. addressing undefined references first. The code I ran is super simple: # in Rasters environment
]add Jet
using JET
report_package() Including JET into the tests should also be possible, but requires some more effort. |
I've been running that too! Got quite excited by how reliable everything will be once we have it set up. But it would be good to be able to turn off "may throw" reports and other junk, because we know, those errors are intentionally there...
There is also this: https://github.com/julia-vscode/StaticLint.jl Which is I guess what you are getting in VSCode. But I havent tried it standalone. |
The vscode linter tells me that there are some undefined references in /src, a hopefully complete list:
Rasters.jl/src/lookup.jl
Line 196 in 89b4aab
Rasters.jl/src/openstack.jl
Line 26 in 89b4aab
Rasters.jl/src/polygon_ops.jl
Line 135 in 89b4aab
Rasters.jl/src/polygon_ops.jl
Line 373 in 89b4aab
Rasters.jl/src/polygon_ops.jl
Lines 408 to 411 in 89b4aab
Rasters.jl/src/methods/extract.jl
Line 91 in 89b4aab
Rasters.jl/src/methods/rasterize.jl
Line 252 in 89b4aab
Maybe you want to take a second look.
The text was updated successfully, but these errors were encountered: