diff --git a/src/rsmetacheck/scripts/warnings/w001.py b/src/rsmetacheck/scripts/warnings/w001.py index 39ad7ae..4519f2c 100644 --- a/src/rsmetacheck/scripts/warnings/w001.py +++ b/src/rsmetacheck/scripts/warnings/w001.py @@ -121,7 +121,7 @@ def detect_unversioned_requirements(somef_data: Dict, file_name: str) -> Dict: result["total_requirements"] = total_reqs result["unversioned_count"] = unversioned_count - result["unversioned_requirements"] = unversioned_names + result["unversioned_requirements"] = list(dict.fromkeys(unversioned_names)) if total_reqs > 0: result["percentage_unversioned"] = round((unversioned_count / total_reqs) * 100, 2) diff --git a/src/rsmetacheck/scripts/warnings/w004.py b/src/rsmetacheck/scripts/warnings/w004.py index 9d308fa..428f090 100644 --- a/src/rsmetacheck/scripts/warnings/w004.py +++ b/src/rsmetacheck/scripts/warnings/w004.py @@ -45,9 +45,16 @@ def detect_programming_language_no_version_pitfall(somef_data: Dict, file_name: if isinstance(lang_name, str) and _name_contains_version(lang_name): continue + non_versioned_languages = { + "HTML", "CSS", "JavaScript", "Shell", "Makefile", + "Dockerfile", "Batchfile", "PowerShell", "CMake", + } + if isinstance(lang_name, str) and lang_name in non_versioned_languages: + continue + result["programming_languages_without_version"].append(lang_name) result["source"] = source - result["has_warning"] = True + result["has_warning"] = True if "requirements" in somef_data: requirements_entries = somef_data["requirements"]