File tree Expand file tree Collapse file tree 2 files changed +43
-0
lines changed
core/testing/mstest-analyzers Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ title : " Do not use shadowing inside test class."
3+ description : " Learn about code analysis rule MSTEST0036: Do not use shadowing inside test class."
4+ ms.date : 08/19/2024
5+ f1_keywords :
6+ - MSTEST0036
7+ - DoNotUseShadowingAnalyzer
8+ helpviewer_keywords :
9+ - DoNotUseShadowingAnalyzer
10+ - MSTEST0036
11+ author : engyebrahim
12+ ms.author : enjieid
13+ ---
14+ # MSTEST0036: Do not use shadowing inside test class.
15+
16+ | Property | Value |
17+ | -------------------------------------| ------------------------------------------------------------------------|
18+ | ** Rule ID** | MSTEST0036 |
19+ | ** Title** | Do not use shadowing inside test class. |
20+ | ** Category** | Design |
21+ | ** Fix is breaking or non-breaking** | Non-breaking |
22+ | ** Enabled by default** | Yes |
23+ | ** Default severity** | Warning |
24+ | ** Introduced in version** | 3.6.0 |
25+ | ** There is a code fix** | No |
26+
27+ ## Cause
28+
29+ Shadowing test members could cause testing issues (such as NRE).
30+
31+ ## Rule description
32+
33+ Shadowing test members could cause testing issues (such as NRE).
34+
35+ ## How to fix violations
36+
37+ Delete the shadowing member.
38+
39+ ## When to suppress warnings
40+
41+ Don't suppress warnings from this rule as it could cause testing issues (such as NRE).
Original file line number Diff line number Diff line change @@ -121,6 +121,8 @@ items:
121121 href : ../../core/testing/mstest-analyzers/mstest0025.md
122122 - name : MSTEST0029
123123 href : ../../core/testing/mstest-analyzers/mstest0029.md
124+ - name : MSTEST0036
125+ href : ../../core/testing/mstest-analyzers/mstest0036.md
124126 - name : Performance
125127 items :
126128 - name : Overview
You can’t perform that action at this time.
0 commit comments