Where to put code for validation checks across multiple lines? #934
Unanswered
SteveBronder
asked this question in
Q&A
Replies: 2 comments 1 reply
-
I think this is already separated via the Warning as opposed to stoping with and error seems safer as I guess there could be cases of false positives? |
Beta Was this translation helpful? Give feedback.
1 reply
-
I agree --warn-uninitialized would be good to have on by default but last time we discussed this Ryan said false alarms should not be considered bugs.
#912 (comment)
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd like to check that a transformed parameter is ever used before it's assigned, but I'm not sure where to put that kind of check?
In #930 I'm working on an optimization that would let us not fill objects with NA values as long as they are fully assigned to before use. @rok-cesnovar found a very good example link where my current schema fails because the program never assigns to the variable. I can fix that, but in general I think it would be nice to fail programs that have variables defined in transformed parameters that are never assigned to as that's most likely a program error. But looking at the semantic checks, particularly
semantic_check_ostatements_in_block
it's not clear to me how to perform multi-line validation statements. What would be the best way to include checks that cover multiple lines like what I'm discussing here? @rok-cesnovar also pointed out that this error is actually caught in pedantic model. Maybe we can import some schemes from pedantic mode to the actual validation checking?Beta Was this translation helpful? Give feedback.
All reactions