| 308 | } |
| 309 | |
| 310 | const char *cbm_workspace_verdict_reason(cbm_ws_verdict_t verdict) { |
| 311 | switch (verdict) { |
| 312 | case CBM_WS_ALLOW: |
| 313 | return "allowed"; |
| 314 | case CBM_WS_DENY_TOO_SHALLOW: |
| 315 | return "path is too broad to index as one root; name a project directory below it"; |
| 316 | case CBM_WS_DENY_ABSOLUTE: |
| 317 | return "path is a volume root or holds the codebase-memory cache; it cannot be indexed"; |
| 318 | case CBM_WS_DENY_SENSITIVE: |
| 319 | return "path is a home or credential directory"; |
| 320 | default: |
| 321 | break; |
| 322 | } |
| 323 | return "refused"; |
| 324 | } |
| 325 | |
| 326 | bool cbm_workspace_verdict_is_overridable(cbm_ws_verdict_t verdict) { |
| 327 | return verdict == CBM_WS_DENY_SENSITIVE; |
no outgoing calls
no test coverage detected