diff --git a/src/codemodder/scripts/generate_docs.py b/src/codemodder/scripts/generate_docs.py index c6213a14..eb757263 100644 --- a/src/codemodder/scripts/generate_docs.py +++ b/src/codemodder/scripts/generate_docs.py @@ -138,7 +138,7 @@ class DocMetadata: importance="Medium", guidance_explained="Our change fixes explicitly insecure session configuration for a Flask application. However, there may be valid cases to use these insecure configurations, such as for testing or backward compatibility.", ), - "file-resource-leak": DocMetadata( + "fix-file-resource-leak": DocMetadata( importance="High", guidance_explained="We believe this change is safe and will only close file resources that are not referenced outside of the with statement block.", ), diff --git a/src/core_codemods/docs/pixee_python_file-resource-leak.md b/src/core_codemods/docs/pixee_python_fix-file-resource-leak.md similarity index 100% rename from src/core_codemods/docs/pixee_python_file-resource-leak.md rename to src/core_codemods/docs/pixee_python_fix-file-resource-leak.md diff --git a/src/core_codemods/file_resource_leak.py b/src/core_codemods/file_resource_leak.py index 54a870fe..24992190 100644 --- a/src/core_codemods/file_resource_leak.py +++ b/src/core_codemods/file_resource_leak.py @@ -24,7 +24,7 @@ class FileResourceLeak(BaseCodemod): - NAME = "file-resource-leak" + NAME = "fix-file-resource-leak" SUMMARY = "Automatically Close Resources" REVIEW_GUIDANCE = ReviewGuidance.MERGE_WITHOUT_REVIEW DESCRIPTION = SUMMARY diff --git a/tests/codemods/test_file_resource_leak.py b/tests/codemods/test_file_resource_leak.py index 3ed716fe..b67a81f2 100644 --- a/tests/codemods/test_file_resource_leak.py +++ b/tests/codemods/test_file_resource_leak.py @@ -7,7 +7,7 @@ class TestFileResourceLeak(BaseCodemodTest): codemod = FileResourceLeak def test_name(self): - assert self.codemod.name() == "file-resource-leak" + assert self.codemod.name() == "fix-file-resource-leak" def test_simple(self, tmpdir): input_code = """\