feat: add warnings and specifically unused variable warnings#246
feat: add warnings and specifically unused variable warnings#246stringhandler wants to merge 1 commit intoBlockstreamResearch:masterfrom
Conversation
|
utACK 7f35d30 -- but CI needs fixing. This looks great! In a followup we will want to abstract out the color formatting stuff but it's fine for shell codes to be hardcoded for now. I also suspect that we could find a nicer way to thread warnings through the whole codebase than to have these tuples everywhere, but let's not let the perfect be the enemy of the good. |
|
@stringhandler just needs fmt and clippy |
6a9fed2 to
d3ac8fa
Compare
|
sorry for rebasing so much, but I realised that I was breaking the public interface of TemplateProgram and wanted to change it to a non-breaking version. |
|
I've put it in draft for now while I clean up some stuff. An AI code review also picked up that I had missed the unused variables in functions and matches. |
* changed api so that it's not breaking * cut down unused warning to just the variable * add unused warnings for match and functions * add warning category deny and allow * move warning to own file * add json for warnings
e82086d to
ab40206
Compare
|
ok think it's ready for review again. I also fixed some code on the every-simplicity and it's now picking up many unused variable warnings |
|
ah interesting. I will see what I can do. I think the problem is actually related to scope, it would need a new scope once the second carry, sum is created |
|
I don't know if we need to cover all the cases for this to be useful though, perhaps we can merge this and add an issue for new cases we find? |
I am fine with that |

This PR adds warnings, taken originally from #232, by themselves, without the extra clutter of
infixoperators.However, I did want to add an unused variable warning.
A particularly dangerous case is where the developer uses an
add_Njet, but doesn't do anything with thecarry, allowing silent overflows.With this PR the warning is added:
I also added scripts to run all the examples to see if they still compile. If this bugs anyone, I'm happy to remove it.