|
28 | 28 | </errorLevel> |
29 | 29 | </UndefinedGlobalVariable> |
30 | 30 |
|
31 | | - <!-- Views use $this from controller context when included --> |
32 | | - <InvalidScope> |
33 | | - <errorLevel type="suppress"> |
34 | | - <directory name="src/backend/Views" /> |
35 | | - </errorLevel> |
36 | | - </InvalidScope> |
37 | | - |
38 | 31 | <!-- Controllers pass variables to views, services have template vars --> |
39 | 32 | <UnusedVariable> |
40 | 33 | <errorLevel type="suppress"> |
|
50 | 43 | <directory name="src/backend/Controllers" /> |
51 | 44 | <directory name="src/backend/Services" /> |
52 | 45 | <directory name="src/backend/View" /> |
53 | | - <directory name="src/backend/Core" /> |
54 | 46 | </errorLevel> |
55 | 47 | </PossiblyUnusedParam> |
56 | 48 |
|
57 | | - <UnusedParam> |
58 | | - <errorLevel type="suppress"> |
59 | | - <directory name="src/backend/Controllers" /> |
60 | | - </errorLevel> |
61 | | - </UnusedParam> |
62 | | - |
63 | 49 | <!-- Public methods called via routing or kept for API completeness --> |
64 | 50 | <PossiblyUnusedMethod> |
65 | 51 | <errorLevel type="suppress"> |
|
71 | 57 | </errorLevel> |
72 | 58 | </PossiblyUnusedMethod> |
73 | 59 |
|
74 | | - <!-- Properties set from database results or declared for future use --> |
75 | | - <PossiblyUnusedProperty> |
76 | | - <errorLevel type="suppress"> |
77 | | - <directory name="src/backend/Core/Entity" /> |
78 | | - <directory name="src/backend/Controllers" /> |
79 | | - </errorLevel> |
80 | | - </PossiblyUnusedProperty> |
81 | | - |
82 | | - <!-- Classes instantiated by router or kept for API completeness --> |
83 | | - <UnusedClass> |
84 | | - <errorLevel type="suppress"> |
85 | | - <directory name="src/backend/Controllers" /> |
86 | | - <directory name="src/backend/Core/Entity" /> |
87 | | - </errorLevel> |
88 | | - </UnusedClass> |
89 | | - |
90 | 60 | <!-- Views call global functions that may be dynamically loaded --> |
91 | 61 | <UndefinedFunction> |
92 | 62 | <errorLevel type="suppress"> |
|
98 | 68 | <RedundantCondition> |
99 | 69 | <errorLevel type="suppress"> |
100 | 70 | <directory name="src/backend/Views" /> |
101 | | - <directory name="src/backend/Services" /> |
102 | | - <directory name="src/backend/Core" /> |
103 | 71 | </errorLevel> |
104 | 72 | </RedundantCondition> |
105 | 73 |
|
| 74 | + <!-- Views receive variables from controllers via extract(), psalm cannot infer types --> |
106 | 75 | <TypeDoesNotContainType> |
107 | 76 | <errorLevel type="suppress"> |
108 | 77 | <directory name="src/backend/Views" /> |
109 | 78 | </errorLevel> |
110 | 79 | </TypeDoesNotContainType> |
111 | 80 |
|
112 | | - <!-- Defensive casts for type safety with dynamic data --> |
113 | | - <RedundantCast> |
114 | | - <errorLevel type="suppress"> |
115 | | - <directory name="src/backend/Views" /> |
116 | | - <directory name="src/backend/Services" /> |
117 | | - <directory name="src/backend/Core" /> |
118 | | - </errorLevel> |
119 | | - </RedundantCast> |
120 | | - |
121 | 81 | <!-- Return value may not be used by callers --> |
122 | 82 | <PossiblyUnusedReturnValue> |
123 | 83 | <errorLevel type="suppress"> |
124 | 84 | <directory name="src/backend/Services" /> |
125 | 85 | </errorLevel> |
126 | 86 | </PossiblyUnusedReturnValue> |
127 | | - |
128 | | - <!-- Services handle data from various sources with different types --> |
129 | | - <InvalidReturnType> |
130 | | - <errorLevel type="suppress"> |
131 | | - <directory name="src/backend/Services" /> |
132 | | - </errorLevel> |
133 | | - </InvalidReturnType> |
134 | | - |
135 | | - <!-- Foreach values used for iteration control only --> |
136 | | - <UnusedForeachValue> |
137 | | - <errorLevel type="suppress"> |
138 | | - <directory name="src/backend/Services" /> |
139 | | - <directory name="src/backend/Controllers" /> |
140 | | - </errorLevel> |
141 | | - </UnusedForeachValue> |
142 | | - |
143 | | - <!-- DOMNameSpaceNode has attributes in practice --> |
144 | | - <UndefinedPropertyFetch> |
145 | | - <errorLevel type="suppress"> |
146 | | - <directory name="src/backend/Services" /> |
147 | | - </errorLevel> |
148 | | - </UndefinedPropertyFetch> |
149 | | - |
150 | | - <!-- Dynamic array access patterns --> |
151 | | - <InvalidArrayOffset> |
152 | | - <errorLevel type="suppress"> |
153 | | - <directory name="src/backend/Services" /> |
154 | | - </errorLevel> |
155 | | - </InvalidArrayOffset> |
156 | | - |
157 | | - <!-- Unused function calls that have side effects --> |
158 | | - <UnusedFunctionCall> |
159 | | - <errorLevel type="suppress"> |
160 | | - <directory name="src/backend/Services" /> |
161 | | - </errorLevel> |
162 | | - </UnusedFunctionCall> |
163 | | - |
164 | | - <!-- Var annotations for clarity in views/controllers --> |
165 | | - <UnnecessaryVarAnnotation> |
166 | | - <errorLevel type="suppress"> |
167 | | - <directory name="src/backend/Views" /> |
168 | | - <directory name="src/backend/Controllers" /> |
169 | | - </errorLevel> |
170 | | - </UnnecessaryVarAnnotation> |
171 | | - |
172 | | - <!-- shell_exec used for feature detection (MeCab) --> |
173 | | - <ForbiddenCode> |
174 | | - <errorLevel type="suppress"> |
175 | | - <directory name="src/backend/Services" /> |
176 | | - </errorLevel> |
177 | | - </ForbiddenCode> |
178 | 87 | </issueHandlers> |
179 | 88 | </psalm> |
0 commit comments