Skip to content

Commit

Permalink
Changed FileResourceLeak codemod name
Browse files Browse the repository at this point in the history
  • Loading branch information
andrecsilva committed Nov 27, 2023
1 parent 9a3dbc2 commit 5b4ea90
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/codemodder/scripts/generate_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
),
Expand Down
2 changes: 1 addition & 1 deletion src/core_codemods/file_resource_leak.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/codemods/test_file_resource_leak.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = """\
Expand Down

0 comments on commit 5b4ea90

Please sign in to comment.