troubadix 24.8.2__py3-none-any.whl → 24.9.1__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.
- troubadix/__version__.py +1 -1
- troubadix/plugins/script_calls_recommended.py +3 -1
- troubadix/standalone_plugins/file_extensions.py +20 -8
- {troubadix-24.8.2.dist-info → troubadix-24.9.1.dist-info}/METADATA +14 -5
- {troubadix-24.8.2.dist-info → troubadix-24.9.1.dist-info}/RECORD +8 -8
- {troubadix-24.8.2.dist-info → troubadix-24.9.1.dist-info}/LICENSE +0 -0
- {troubadix-24.8.2.dist-info → troubadix-24.9.1.dist-info}/WHEEL +0 -0
- {troubadix-24.8.2.dist-info → troubadix-24.9.1.dist-info}/entry_points.txt +0 -0
troubadix/__version__.py
CHANGED
|
@@ -73,7 +73,9 @@ class CheckScriptCallsRecommended(FileContentPlugin):
|
|
|
73
73
|
]
|
|
74
74
|
|
|
75
75
|
if not _get_special_script_tag_pattern(
|
|
76
|
-
name=rf"({'|'.join(recommended_many_call)})",
|
|
76
|
+
name=rf"({'|'.join(recommended_many_call)})",
|
|
77
|
+
value=".*?",
|
|
78
|
+
flags=re.DOTALL,
|
|
77
79
|
).search(file_content):
|
|
78
80
|
yield LinterWarning(
|
|
79
81
|
"VT contains none of the following recommended calls: "
|
|
@@ -34,6 +34,11 @@ def parse_args() -> Namespace:
|
|
|
34
34
|
parser.add_argument(
|
|
35
35
|
"--ignore-file", type=file_type, help="path to ignore file"
|
|
36
36
|
)
|
|
37
|
+
parser.add_argument(
|
|
38
|
+
"--gen-ignore-entries",
|
|
39
|
+
action="store_true",
|
|
40
|
+
help="output only newline seperated entries, no header",
|
|
41
|
+
)
|
|
37
42
|
return parser.parse_args()
|
|
38
43
|
|
|
39
44
|
|
|
@@ -74,16 +79,23 @@ def check_extensions(args: Namespace) -> List[Path]:
|
|
|
74
79
|
|
|
75
80
|
|
|
76
81
|
def main() -> int:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
+
args = parse_args()
|
|
83
|
+
unwanted_files = check_extensions(args)
|
|
84
|
+
if not unwanted_files:
|
|
85
|
+
return 0
|
|
86
|
+
|
|
87
|
+
if args.gen_ignore_entries:
|
|
82
88
|
for file in unwanted_files:
|
|
83
|
-
print(file)
|
|
84
|
-
return
|
|
89
|
+
print(file.relative_to(args.dir))
|
|
90
|
+
return 0
|
|
85
91
|
|
|
86
|
-
|
|
92
|
+
print(
|
|
93
|
+
f"{len(unwanted_files)} "
|
|
94
|
+
"Files with unwanted file extension were found:"
|
|
95
|
+
)
|
|
96
|
+
for file in unwanted_files:
|
|
97
|
+
print(file)
|
|
98
|
+
return 1
|
|
87
99
|
|
|
88
100
|
|
|
89
101
|
if __name__ == "__main__":
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: troubadix
|
|
3
|
-
Version: 24.
|
|
3
|
+
Version: 24.9.1
|
|
4
4
|
Summary: A linting and QA check tool for NASL files
|
|
5
5
|
Home-page: https://github.com/greenbone/troubadix
|
|
6
6
|
License: GPL-3.0-or-later
|
|
@@ -44,9 +44,19 @@ A linting and QA check tool for NASL files
|
|
|
44
44
|
|
|
45
45
|
Python 3.9 and later is supported.
|
|
46
46
|
|
|
47
|
+
### Install using pipx
|
|
48
|
+
|
|
49
|
+
You can install the latest stable release of **troubadix** from the Python
|
|
50
|
+
Package Index (pypi) using [pipx]
|
|
51
|
+
|
|
52
|
+
python3 -m pipx install troubadix
|
|
53
|
+
|
|
47
54
|
### Install using pip
|
|
48
55
|
|
|
49
|
-
|
|
56
|
+
> [!NOTE]
|
|
57
|
+
> The `pip install` command does no longer work out-of-the-box in newer
|
|
58
|
+
> distributions like Ubuntu 23.04 because of [PEP 668](https://peps.python.org/pep-0668).
|
|
59
|
+
> Please use the [installation via pipx](#install-using-pipx) instead.
|
|
50
60
|
|
|
51
61
|
You can install the latest stable release of **troubadix** from the Python
|
|
52
62
|
Package Index (pypi) using [pip]
|
|
@@ -71,9 +81,7 @@ For installation via pipenv please take a look at their [documentation][pipenv].
|
|
|
71
81
|
**troubadix** uses [poetry] for its own dependency management and build
|
|
72
82
|
process.
|
|
73
83
|
|
|
74
|
-
First install poetry
|
|
75
|
-
|
|
76
|
-
python3 -m pip install --user poetry
|
|
84
|
+
First install poetry (see [documentation](https://python-poetry.org/docs/#installation)).
|
|
77
85
|
|
|
78
86
|
Afterwards run
|
|
79
87
|
|
|
@@ -113,6 +121,7 @@ Licensed under the [GNU General Public License v3.0 or later](LICENSE).
|
|
|
113
121
|
[Greenbone]: https://www.greenbone.net/
|
|
114
122
|
[poetry]: https://python-poetry.org/
|
|
115
123
|
[pip]: https://pip.pypa.io/
|
|
124
|
+
[pipx]: https://pypa.github.io/pipx/
|
|
116
125
|
[pipenv]: https://pipenv.pypa.io/
|
|
117
126
|
[autohooks]: https://github.com/greenbone/autohooks
|
|
118
127
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
troubadix/__init__.py,sha256=K7sIXXDrC7YRb7BvIpdQ6ZfG_QkT0qUH_wAlHROVRfM,716
|
|
2
|
-
troubadix/__version__.py,sha256=
|
|
2
|
+
troubadix/__version__.py,sha256=ZDcSR0f7wqcHYyLlgRk4AVKxvoiWRm7FEU79mNRfj3k,103
|
|
3
3
|
troubadix/argparser.py,sha256=YAo8cGJt0k2GMICXrDj3Z124GrM8oRwgNm2Bn3J_gYI,7001
|
|
4
4
|
troubadix/codespell/codespell.additions,sha256=9hUrzjJF4Q8T5rVLx8CQa01oICvmsjzE6sCPjVRDOEU,418
|
|
5
5
|
troubadix/codespell/codespell.exclude,sha256=qALEzLglEbPwcTRwGcobM_MTJzZyJekYRdJY3ws5yeM,138030
|
|
@@ -43,7 +43,7 @@ troubadix/plugins/qod.py,sha256=u4VPFAjzidnnPrmwuSPZuK8KKMZBFi30XqaRGLcYPhc,3816
|
|
|
43
43
|
troubadix/plugins/reporting_consistency.py,sha256=xBLd3ASa2zlPg61ONpBFSt_RtblTQ70vKWm05MS0tew,4027
|
|
44
44
|
troubadix/plugins/script_add_preference_type.py,sha256=KhVYU24g-OJF1XqPOsqX1k8LU7-BciSXQ2EbCcnJezw,3193
|
|
45
45
|
troubadix/plugins/script_calls_empty_values.py,sha256=XdtqTGWI3k_3eId-XAgxwXLxucENqC5CIQJG8Ncn1_M,2512
|
|
46
|
-
troubadix/plugins/script_calls_recommended.py,sha256=
|
|
46
|
+
troubadix/plugins/script_calls_recommended.py,sha256=GHnfCKBlmutfCXrkvvujvDR7TJDxr2Dx2KZDMa1z_TU,3180
|
|
47
47
|
troubadix/plugins/script_category.py,sha256=EsFoR6fKjnJNNJb2gLkftwXDhJ3RCfa5g8796N-jxX8,2184
|
|
48
48
|
troubadix/plugins/script_copyright.py,sha256=z8TjoDDMonne1xEUjEmwOVKvuGJ0CkEk9rtrNBoiKCY,2310
|
|
49
49
|
troubadix/plugins/script_family.py,sha256=MBeocKLStuRESAGyKA43g4htOgTJI8aUMWfiYuJJ7p0,4023
|
|
@@ -87,13 +87,13 @@ troubadix/standalone_plugins/changed_packages/marker/marker.py,sha256=7uZXR2Ds_8
|
|
|
87
87
|
troubadix/standalone_plugins/changed_packages/package.py,sha256=Pcr2tcwiPTzD3jB0iteqA7-TajL-dl5Onh1dvC_H9xk,2743
|
|
88
88
|
troubadix/standalone_plugins/common.py,sha256=PkScV-lisNY4WyrzwjV3dK1DF26hJv5JXTcREblJ0v0,1028
|
|
89
89
|
troubadix/standalone_plugins/deprecate_vts.py,sha256=kqWYfRO6Cr2E_zBnP3kJQoVznpRDcbIF6x6AiApYGBk,7661
|
|
90
|
-
troubadix/standalone_plugins/file_extensions.py,sha256=
|
|
90
|
+
troubadix/standalone_plugins/file_extensions.py,sha256=QLQt02WIc4SWLDTKKnG8q2g-atC7Mgus-opuXf_SX1A,2630
|
|
91
91
|
troubadix/standalone_plugins/last_modification.py,sha256=oYzQq7xV3YzSvi6ZtuHuupXsJwBtO93tKfbwaIeqiJI,4616
|
|
92
92
|
troubadix/standalone_plugins/no_solution.py,sha256=81r20kP8otRob2NTaCea-sgVRIM6ARvhddFdibsG6Ao,8877
|
|
93
93
|
troubadix/standalone_plugins/version_updated.py,sha256=dIGj81rbluyNjINn9kA1yPY2hUo6fqbNa-kg0Zi9Clc,4263
|
|
94
94
|
troubadix/troubadix.py,sha256=foA7Loi67cCKieN3ea4s3QOfOWOkgwQVR1H-pNXtXn0,6041
|
|
95
|
-
troubadix-24.
|
|
96
|
-
troubadix-24.
|
|
97
|
-
troubadix-24.
|
|
98
|
-
troubadix-24.
|
|
99
|
-
troubadix-24.
|
|
95
|
+
troubadix-24.9.1.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
96
|
+
troubadix-24.9.1.dist-info/METADATA,sha256=ZunmHinfrP5DbBKTWljuhyqXUzQrI58-6Iyj947GFTI,4357
|
|
97
|
+
troubadix-24.9.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
98
|
+
troubadix-24.9.1.dist-info/entry_points.txt,sha256=LplOk4nzKrS4B8Jz0SPkQLPlIDesdraCO8Vp_eoycpc,737
|
|
99
|
+
troubadix-24.9.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|