Closed ammiranda closed 3 days ago
@bplunkett-stripe ok I think the latest push is getting closer to what is desired. One thing that was interesting is if I converted the tabs to spaces for the opening ` in the first few files the lint would give goimport-ed
failures, if they are left alone the lint passes. Any guidance on what to do for this is appreciated because it feels a bit wonky, I could adjust it so the tab replacement doesn't happen for the lines that solely have the ` characters but don't know if that is acceptable. Also I achieved this through a python script that I can add into the source so it can be run in the future easily (possibly in its own docker container) so just let me know if I should push it up.
ok I think the latest push is getting closer to what is desired. One thing that was interesting is if I converted the tabs to spaces for the opening
in the first few files the lint would give goimport-ed failures, if they are left alone the lint passes. Any guidance on what to do for this is appreciated because it feels a bit wonky, I could adjust it so the tab replacement doesn't happen for the lines that solely have the
characters but don't know if that is acceptable. Also I achieved this through a python script that I can add into the source so it can be run in the future easily (possibly in its own docker container) so just let me know if I should push it up.
Hmmm I see....Instead of converting tabs to spaces, what if we converted spaces to tabs? That would also align with go formatting recommendation and give us consistent white space throughout. I'd be interested in seeing the script!
ok I think the latest push is getting closer to what is desired. One thing that was interesting is if I converted the tabs to spaces for the opening
in the first few files the lint would give goimport-ed failures, if they are left alone the lint passes. Any guidance on what to do for this is appreciated because it feels a bit wonky, I could adjust it so the tab replacement doesn't happen for the lines that solely have the
characters but don't know if that is acceptable. Also I achieved this through a python script that I can add into the source so it can be run in the future easily (possibly in its own docker container) so just let me know if I should push it up.Hmmm I see....Instead of converting tabs to spaces, what if we converted spaces to tabs? That would also align with go formatting recommendation and give us consistent white space throughout. I'd be interested in seeing the script!
@bplunkett-stripe I just pushed up the change changing 4 spaces to tabs. You can view the python script as a gist here: https://gist.github.com/ammiranda/44c720878f09aad21e8e17e305988537. Let me know if you want me to write a Dockerfile to enable it to be easily run as part of this PR!
@bplunkett-stripe I just pushed up the change changing 4 spaces to tabs. You can view the python script as a gist here: https://gist.github.com/ammiranda/44c720878f09aad21e8e17e305988537. Let me know if you want me to write a Dockerfile to enable it to be easily run as part of this PR!
Nice changes, look solid! Thinking about it a bit more...I think we want to convert the tabs to spaces, i.e., reverse your script! Sorry for the confusion on that! Since you wrote a script, hopefully a pretty easy thing to switch up! Should be good to merge after that.
Thanks for the script! might look into vendoring your script in later. I'm a little hesitant since the matching condition is pretty loose.
-- Sorry again for the churn! I'm hoping this won't be too annoying with the script you wrote.
@bplunkett-stripe I've switched it back to spaces, please review again when able. If you can let me know how you'd want me to tighten the script I can work on implementing it, it seems to work for the existing formatting FWIW but I understand the desire to not be sloppy.
Got it, if you create an issue with your specifications I can work on that separately in a new PR. Or if you want me to create it I can do that.
Doing as a separate PR is probably best. I think what we're aiming for here is to just have a golang "script" that:
--fix
option, such that there is basically a validation/dry-run mode and a write modelint
and lint_fix
targets (like go_lint, sql_lint, etc)
Description
Standardizing the whitespace in the migration_acceptance_tests to be spaces so viewing isn't uneven.
Motivation
Resolves #67
Testing
I ran the test docker image built on my local machine and observed no test failures which is expected given the only changes are whitespace. The one caveat is it was only run against
postgres
14 given that was the specified arg in the test dockerfile.