Skip to content

Commit b556d05

Browse files
Fixes for #98 and #99
1 parent a714c81 commit b556d05

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

src/rsmetacheck/scripts/warnings/w001.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def detect_unversioned_requirements(somef_data: Dict, file_name: str) -> Dict:
121121

122122
result["total_requirements"] = total_reqs
123123
result["unversioned_count"] = unversioned_count
124-
result["unversioned_requirements"] = unversioned_names
124+
result["unversioned_requirements"] = list(dict.fromkeys(unversioned_names))
125125

126126
if total_reqs > 0:
127127
result["percentage_unversioned"] = round((unversioned_count / total_reqs) * 100, 2)

src/rsmetacheck/scripts/warnings/w004.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,16 @@ def detect_programming_language_no_version_pitfall(somef_data: Dict, file_name:
4545
if isinstance(lang_name, str) and _name_contains_version(lang_name):
4646
continue
4747

48+
non_versioned_languages = {
49+
"HTML", "CSS", "JavaScript", "Shell", "Makefile",
50+
"Dockerfile", "Batchfile", "PowerShell", "CMake",
51+
}
52+
if isinstance(lang_name, str) and lang_name in non_versioned_languages:
53+
continue
54+
4855
result["programming_languages_without_version"].append(lang_name)
4956
result["source"] = source
50-
result["has_warning"] = True
57+
result["has_warning"] = True
5158

5259
if "requirements" in somef_data:
5360
requirements_entries = somef_data["requirements"]

0 commit comments

Comments
 (0)