|
17 | 17 | # along with this program; if not, write to the Free Software Foundation,
|
18 | 18 | # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
19 | 19 | #
|
| 20 | +import time |
| 21 | + |
20 | 22 | from dataclasses import dataclass
|
| 23 | +from enum import Enum |
| 24 | +from typing import Optional |
| 25 | + |
| 26 | + |
| 27 | +class JRECacheStatus(Enum): |
| 28 | + HIT = 1 |
| 29 | + MISS = 2 |
| 30 | + DISABLE = 3 |
| 31 | + |
| 32 | + |
| 33 | +@dataclass(frozen=True) |
| 34 | +class Internal: |
| 35 | + dump_to_file: Optional[str] = None # File path to dump the input to the scanner engine |
| 36 | + sq_version: Optional[str] = None |
21 | 37 |
|
22 | 38 |
|
23 | 39 | @dataclass(frozen=True)
|
24 | 40 | class Scanner:
|
| 41 | + app: str = "python" |
| 42 | + app_version: str = "1.0" |
| 43 | + bootstrap_start_time: int = int(time.time() * 1000) |
| 44 | + |
| 45 | + os: Optional[str] = None |
| 46 | + arch: Optional[str] = None |
| 47 | + |
| 48 | + connect_timeout: Optional[int] = None |
| 49 | + socket_timeout: Optional[int] = None |
| 50 | + response_timeout: Optional[int] = None |
| 51 | + |
| 52 | + truststore_path: Optional[str] = None |
| 53 | + truststore_password: Optional[str] = None |
| 54 | + keystore_path: Optional[str] = None |
| 55 | + keystore_password: Optional[str] = None |
| 56 | + |
| 57 | + proxy_host: Optional[str] = None |
| 58 | + proxy_port: Optional[int] = None |
| 59 | + proxy_user: Optional[str] = None |
| 60 | + proxy_password: Optional[str] = None |
| 61 | + |
| 62 | + was_jre_cache_hit: Optional[JRECacheStatus] = None |
| 63 | + was_engine_cache_hit: Optional[bool] = None |
| 64 | + skip_jre_provisioning: bool = False |
| 65 | + java_exe_path: Optional[str] = None |
| 66 | + java_opts: Optional[str] = None |
| 67 | + |
25 | 68 | sonarcloud_url: str = ""
|
26 | 69 | api_base_url: str = ""
|
27 | 70 |
|
| 71 | + internal: Internal = Internal() |
| 72 | + |
28 | 73 |
|
29 | 74 | @dataclass(frozen=True)
|
30 | 75 | class Sonar:
|
31 | 76 | scanner: Scanner = Scanner()
|
| 77 | + |
| 78 | + verbose: bool = False |
| 79 | + |
| 80 | + project_base_dir: Optional[str] = None |
| 81 | + user_home: Optional[str] = None |
| 82 | + |
| 83 | + token: str = "" |
32 | 84 | host_url: str = ""
|
33 | 85 | region: str = ""
|
34 | 86 |
|
|
0 commit comments