ProtoDef-io / ProtoDef-io/node-protodef-validator
Add protocol mapper sanity check to protodef-validator
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1
- Forks
- 4
- Avg merge
- 2m
- Merged PRs (30d)
- 2
Description
Protocol switches could reference values absent from their preceding mapper, causing undefined dispatch behavior
There should be sanity check to ensure switches happen on enum values that are defined, if the interpreter/compiler knows what the possible enumerated values are (custom datatypes may not make this information available for sanity check)
Related
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the protocol-switch validation logic and the tests for mapper and custom datatype handling. Add a sanity check for switch values when the preceding mapper's possible enum values are known, while preserving validation for custom datatypes where those values are unavailable; done means invalid references are reported and valid or unknowable cases continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100