(
symbol: UnifiedSymbolInformation,
whitespace_allowed: bool = False,
period_allowed: bool = False,
colon_allowed: bool = False,
brace_allowed: bool = False,
parenthesis_allowed: bool = False,
comma_allowed: bool = False,
)
| 24 | |
| 25 | |
| 26 | def has_malformed_name( |
| 27 | symbol: UnifiedSymbolInformation, |
| 28 | whitespace_allowed: bool = False, |
| 29 | period_allowed: bool = False, |
| 30 | colon_allowed: bool = False, |
| 31 | brace_allowed: bool = False, |
| 32 | parenthesis_allowed: bool = False, |
| 33 | comma_allowed: bool = False, |
| 34 | ) -> bool: |
| 35 | forbidden_chars: list[str] = [] |
| 36 | |
| 37 | if not whitespace_allowed: |
| 38 | forbidden_chars.append(" ") |
| 39 | if not period_allowed: |
| 40 | forbidden_chars.append(".") |
| 41 | if not colon_allowed: |
| 42 | forbidden_chars.append(":") |
| 43 | if not brace_allowed: |
| 44 | forbidden_chars.append("{") |
| 45 | if not parenthesis_allowed: |
| 46 | forbidden_chars.append("(") |
| 47 | if not comma_allowed: |
| 48 | forbidden_chars.append(",") |
| 49 | |
| 50 | return any(separator in symbol["name"] for separator in forbidden_chars) |
| 51 | |
| 52 | |
| 53 | def request_all_symbols(language_server: SolidLanguageServer) -> list[UnifiedSymbolInformation]: |
no test coverage detected