feat: strip trailing whitespace in EditFile and WriteFile tools#224
Closed
ezyang wants to merge 2 commits intogh/ezyang/172/basefrom
Closed
feat: strip trailing whitespace in EditFile and WriteFile tools#224ezyang wants to merge 2 commits intogh/ezyang/172/basefrom
ezyang wants to merge 2 commits intogh/ezyang/172/basefrom
Conversation
This was referenced Mar 27, 2025
ezyang
added a commit
that referenced
this pull request
Mar 27, 2025
Modify the EditFile and WriteFile tools so that they always strip trailing whitespace for each line from the text content to be written from the LLM. ```git-revs 49e2dec (Base revision) d9b5330 Strip trailing whitespace from each line before writing to file 4fd7add Update docstring to mention trailing whitespace removal 1a7d7c6 Add test for trailing whitespace stripping in WriteFile and EditFile 0b57f3d Update test to match actual behavior without trailing newline 74e7013 Fix empty lines test expectation 4e9026a Fix third test expectation f315fae Auto-commit format changes HEAD Auto-commit lint changes ``` codemcp-id: 234-feat-strip-trailing-whitespace-in-editfile-and-wri ghstack-source-id: a8d9190 Pull-Request-resolved: #224
ezyang
added a commit
that referenced
this pull request
Mar 27, 2025
Modify the EditFile and WriteFile tools so that they always strip trailing whitespace for each line from the text content to be written from the LLM. ```git-revs 49e2dec (Base revision) d9b5330 Strip trailing whitespace from each line before writing to file 4fd7add Update docstring to mention trailing whitespace removal 1a7d7c6 Add test for trailing whitespace stripping in WriteFile and EditFile 0b57f3d Update test to match actual behavior without trailing newline 74e7013 Fix empty lines test expectation 4e9026a Fix third test expectation f315fae Auto-commit format changes 17e5c1b Auto-commit lint changes ce7c1d0 Ensure trailing newline in files 887765d Update docstring to mention trailing newline e950607 Update test to expect trailing newline 319b098 Update second test to expect trailing newline 70d0295 Update third test to expect trailing newline HEAD Auto-commit format changes ``` codemcp-id: 234-feat-strip-trailing-whitespace-in-editfile-and-wri ghstack-source-id: b3bffca Pull-Request-resolved: #224
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
Modify the EditFile and WriteFile tools so that they always strip trailing whitespace for each line from the text content to be written from the LLM.
codemcp-id: 234-feat-strip-trailing-whitespace-in-editfile-and-wri