microsoft / microsoft/react-native-windows
Enable C26819 to catch unintended fallthroughs in switch statements
Open
Nobody has claimed this yet.
Code Cleanup
enhancement
PR Follow-up
Workstream: Developer Experience
- Dominant language
- C++
- Stars
- 17.3k
- Forks
- 1.2k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 33
Description
can you turn on [C26819](https://learn.microsoft.com/en-us/cpp/code-quality/c26819?view=msvc-170) and make it an error? intended fallthroughs should use `[[fallthrough]]`
Originally posted by @asklar in https://github.com/microsoft/react-native-windows/issues/11469#issuecomment-1501053239
Contributor guide
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 C++ compiler-warning configuration in the react-native-windows repository and review the Microsoft documentation for C26819. Verify how warnings are promoted to errors and inspect existing switch statements for intentional fallthroughs. Done means C26819 is enabled as an error and intended fallthroughs use [[fallthrough]].
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100