codeguardian-cli 1.0.2__py3-none-any.whl → 1.2.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- CODEGUARDIAN/src/discovery/finder.py +26 -15
- {codeguardian_cli-1.0.2.dist-info → codeguardian_cli-1.2.2.dist-info}/METADATA +1 -1
- {codeguardian_cli-1.0.2.dist-info → codeguardian_cli-1.2.2.dist-info}/RECORD +6 -6
- {codeguardian_cli-1.0.2.dist-info → codeguardian_cli-1.2.2.dist-info}/WHEEL +0 -0
- {codeguardian_cli-1.0.2.dist-info → codeguardian_cli-1.2.2.dist-info}/entry_points.txt +0 -0
- {codeguardian_cli-1.0.2.dist-info → codeguardian_cli-1.2.2.dist-info}/top_level.txt +0 -0
|
@@ -1,39 +1,50 @@
|
|
|
1
1
|
from pathlib import Path
|
|
2
|
+
import os
|
|
2
3
|
|
|
3
4
|
IGNORE_DIRS = {
|
|
4
|
-
"venv",
|
|
5
|
+
"venv",
|
|
5
6
|
".venv",
|
|
6
7
|
".git",
|
|
7
8
|
"__pycache__",
|
|
8
|
-
".pytest_cache",
|
|
9
|
+
".pytest_cache",
|
|
9
10
|
"node_modules",
|
|
10
11
|
"dist",
|
|
11
12
|
"build",
|
|
12
13
|
"tests",
|
|
13
|
-
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
def discover_files(project_path, extensions)
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
def discover_files(project_path, extensions):
|
|
20
18
|
|
|
21
19
|
project_path = Path(project_path)
|
|
22
20
|
|
|
23
21
|
files = []
|
|
24
22
|
|
|
25
|
-
for
|
|
23
|
+
for root, dirs, filenames in os.walk(project_path):
|
|
24
|
+
|
|
25
|
+
# Ignore predefined directories
|
|
26
|
+
dirs[:] = [
|
|
27
|
+
d for d in dirs
|
|
28
|
+
if d not in IGNORE_DIRS
|
|
29
|
+
]
|
|
26
30
|
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
# Ignore Python virtual environments
|
|
32
|
+
dirs[:] = [
|
|
33
|
+
d for d in dirs
|
|
34
|
+
if not (Path(root) / d / "pyvenv.cfg").exists()
|
|
35
|
+
]
|
|
29
36
|
|
|
30
|
-
|
|
31
|
-
continue
|
|
37
|
+
for filename in filenames:
|
|
32
38
|
|
|
33
|
-
|
|
34
|
-
files.append(file)
|
|
39
|
+
file_path = Path(root) / filename
|
|
35
40
|
|
|
36
|
-
|
|
41
|
+
if filename.startswith("test_"):
|
|
42
|
+
continue
|
|
37
43
|
|
|
44
|
+
if (
|
|
45
|
+
file_path.is_file()
|
|
46
|
+
and file_path.suffix in extensions
|
|
47
|
+
):
|
|
48
|
+
files.append(file_path)
|
|
38
49
|
|
|
39
|
-
|
|
50
|
+
return files
|
|
@@ -27,7 +27,7 @@ CODEGUARDIAN/rules/controllers/user_controller.py,sha256=To6ZzyBi5cV7AZBD8DjG-u7
|
|
|
27
27
|
CODEGUARDIAN/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
28
|
CODEGUARDIAN/src/main.py,sha256=8Es65AMa5M27CpwNMt5dGZahoNND2P7CJLyiWnYqoz0,1130
|
|
29
29
|
CODEGUARDIAN/src/discovery/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
|
-
CODEGUARDIAN/src/discovery/finder.py,sha256=
|
|
30
|
+
CODEGUARDIAN/src/discovery/finder.py,sha256=gsZkqffNpwShpKLKUKW_0e2Apt-A2ugHzVljAve75lE,979
|
|
31
31
|
CODEGUARDIAN/src/extractor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
32
32
|
CODEGUARDIAN/src/extractor/class_extractor.py,sha256=PkI9d4i0J_ZFl8_DphL4q1WR_ohSbQ3VLBILhjJmvGA,628
|
|
33
33
|
CODEGUARDIAN/src/extractor/function_extractor.py,sha256=T34m0zvHW1XQ2c_eBI98VjuTSH6DkQqBJGlUvvSPEX4,381
|
|
@@ -43,8 +43,8 @@ CODEGUARDIAN/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
|
|
|
43
43
|
CODEGUARDIAN/utils/ast_cache.py,sha256=XVbOWW_Iw-I3bge8mI923WfYCyEn9GZCyMWkYLe8_aI,777
|
|
44
44
|
CODEGUARDIAN/utils/file_cache.py,sha256=BCjiSAwZZYOq_pV57yWvrzBov8yPlkG_ZHsnSdaBZr8,510
|
|
45
45
|
CODEGUARDIAN/utils/layer_utils.py,sha256=QpUawYG8f5qjtIuXP0QBKEI_-W9kgHX9F2X_AvzrehM,248
|
|
46
|
-
codeguardian_cli-1.
|
|
47
|
-
codeguardian_cli-1.
|
|
48
|
-
codeguardian_cli-1.
|
|
49
|
-
codeguardian_cli-1.
|
|
50
|
-
codeguardian_cli-1.
|
|
46
|
+
codeguardian_cli-1.2.2.dist-info/METADATA,sha256=DuO7-spe9OIbXm_Bg0sYELeu994uHrQAOpGTfkUwgTs,884
|
|
47
|
+
codeguardian_cli-1.2.2.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
|
|
48
|
+
codeguardian_cli-1.2.2.dist-info/entry_points.txt,sha256=I4OdLGA4ilsjlUDtu9NrmkswYu8vIjIpMaLL8koX11g,55
|
|
49
|
+
codeguardian_cli-1.2.2.dist-info/top_level.txt,sha256=FCCh2epuHzvBi_N-MJr-PFIPrWydRx1kRSDBVAdYbOw,13
|
|
50
|
+
codeguardian_cli-1.2.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|