Subject: [Cbor] 0.8.16: ENV["CDDL_FEATURE_OK"]: comma-separated list to suppress feature warnings

From: Carsten Bormann <[email-masked]>
Date: Fri, 26 Feb 2021 00:28:38 +0100

One other thing that I had put into the cddl tool for the SDF work is support for “accepted” features.  The CDDL tool can be run with an environment variable CDDL_FEATURE_OK that is set to a comma-separated list of feature names; the CDDL tool will not warn about the use of this feature in its validation mechanism (all other features being used are warned about).

So this is how I check the OneDM playground now:

CDDL_FEATURE_OK=1.1
export CDDL_FEATURE_OK

for i in */*.sdf.json
do echo "$i"
   cddl ../sdf/sdf-feature.cddl v "$I"
done

Do a
grep -B1 "Features potentially used:"
on the output to get just the relevant lines.

This warns me of the extant 1.0 syntax, but is quiet about the 1.1 one.
I believe this example really validates the usefulness of the .feature control.

Grüße, Carsten