|
1 | 1 | # ruff: noqa: RUF009 |
2 | 2 | from dataclasses import dataclass |
3 | | -from typing import List, Optional, Union |
| 3 | +from enum import Enum |
| 4 | +from typing import List, Optional |
4 | 5 |
|
5 | 6 | from robotcode.robot.config.model import BaseOptions, field |
6 | 7 |
|
7 | 8 |
|
8 | | -@dataclass |
9 | | -class Dummy: |
10 | | - some_field: Optional[str] = field(default="some value", description="Some field") |
| 9 | +class CacheSaveLocation(Enum): |
| 10 | + WORKSPACE_FOLDER = "workspaceFolder" |
| 11 | + WORKSPACE_STORAGE = "workspaceStorage" |
11 | 12 |
|
12 | 13 |
|
13 | 14 | @dataclass |
14 | 15 | class AnalyzerConfig(BaseOptions): |
15 | | - select: Optional[List[Union[str, Dummy]]] = field(description="Selects which rules are run.") |
16 | | - extend_select: Optional[List[Union[str, Dummy]]] = field(description="Extends the rules which are run.") |
| 16 | + select: Optional[List[str]] = field(description="Selects which rules are run.") |
| 17 | + extend_select: Optional[List[str]] = field(description="Extends the rules which are run.") |
17 | 18 | ignore: Optional[List[str]] = field(description="Defines which rules are ignored.") |
18 | 19 | extend_ignore: Optional[List[str]] = field(description="Extends the rules which are ignored.") |
| 20 | + exclude_patterns: List[str] = field(default_factory=list) |
| 21 | + |
| 22 | + cache_dir: Optional[str] = field(description="Path to the cache directory.") |
| 23 | + |
| 24 | + ignored_libraries: List[str] = field( |
| 25 | + default_factory=list, |
| 26 | + description="""\ |
| 27 | + Specifies the library names that should not be cached. |
| 28 | + This is useful if you have a dynamic or hybrid library that has different keywords depending on |
| 29 | + the arguments. You can specify a glob pattern that matches the library name or the source file. |
| 30 | +
|
| 31 | + Examples: |
| 32 | + - `**/mylibfolder/mylib.py` |
| 33 | + - `MyLib`\n- `mylib.subpackage.subpackage` |
| 34 | +
|
| 35 | + For robot framework internal libraries, you have to specify the full module name like |
| 36 | + `robot.libraries.Remote`. |
| 37 | + """, |
| 38 | + ) |
| 39 | + ignored_variables: List[str] = field( |
| 40 | + default_factory=list, |
| 41 | + description="""\ |
| 42 | + Specifies the variable files that should not be cached. |
| 43 | + This is useful if you have a dynamic or hybrid variable files that has different variables |
| 44 | + depending on the arguments. You can specify a glob pattern that matches the variable module |
| 45 | + name or the source file. |
| 46 | +
|
| 47 | + Examples: |
| 48 | + - `**/variables/myvars.py` |
| 49 | + - `MyVariables` |
| 50 | + - `myvars.subpackage.subpackage` |
| 51 | + """, |
| 52 | + ) |
0 commit comments