microsoft / microsoft/react-native-windows

Enable C26819 to catch unintended fallthroughs in switch statements

Open
#11,477 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.