LibCST icon indicating copy to clipboard operation
LibCST copied to clipboard

Clean warnings in context when transforming multiple files

Open jschavesr opened this issue 2 years ago • 4 comments

Summary

Using libCST cli tool allows to run a codemod over files inside a folder recursively. Context warning messages were not being cleaned between files, so warnings from one files could be passed to other files in the context. Because of that warnings were being shown wrongly in the summary and the total number of warnings was wrong as well.

Test Plan

python3 -m unittest libcst.codemod.tests.test_codemod_cli

jschavesr avatar Mar 24 '22 21:03 jschavesr

Hi @jschavesr!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

facebook-github-bot avatar Mar 24 '22 21:03 facebook-github-bot

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

facebook-github-bot avatar Mar 24 '22 22:03 facebook-github-bot

Running CI, I'll merge if it comes back clean

stroxler avatar Apr 07 '22 18:04 stroxler