Skip to content

Commit 03ac834

Browse files
SCANPY-110 Support all scanner engine properties (#130)
1 parent 67d990c commit 03ac834

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

src/pysonar_scanner/configuration.py

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,70 @@
1717
# along with this program; if not, write to the Free Software Foundation,
1818
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1919
#
20+
import time
21+
2022
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
2137

2238

2339
@dataclass(frozen=True)
2440
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+
2568
sonarcloud_url: str = ""
2669
api_base_url: str = ""
2770

71+
internal: Internal = Internal()
72+
2873

2974
@dataclass(frozen=True)
3075
class Sonar:
3176
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 = ""
3284
host_url: str = ""
3385
region: str = ""
3486

0 commit comments

Comments
 (0)