Make CleverCSV a pre-commit hook
See original GitHub issueWould you consider making CleverCSV a pre-commit hook, by adding a .pre-commit-hooks.yaml
file to your repository? This would allow people to have csv files in their repositories to automatically check them whenever they want to commit them.
The only thing missing to make it work is, as I understand:
- An option to overwrite the input file instead of printing to STDOUT (I think this could be a flag, like
--in-place
) - The possibility of
clevercsv
to accept a list of file arguments to process. - (Probably implemented already) A different exit status whether the input file was altered (!=0) or not (=0).
I can file a PR for the .pre-commit-hooks.yaml
, if you agree (after the above points are implemented).
Thanks for your consideration!
Issue Analytics
- State:
- Created 3 years ago
- Comments:25
Top Results From Across the Web
Supported hooks - pre-commit
reorder-python-imports - This hook reorders imports in python files. ... go-build - Makes sure Go code can build; go-build-plugin - Makes sure Go...
Read more >Quick Start — CleverCSV documentation - Read the Docs
CleverCSV provides a drop-in replacement for the Python csv package with improved ... CSV file to your repository, you can install a pre-commit...
Read more >CleverCSV - Read the Docs
If you'd like to make sure that you never commit a messy (non-standard) CSV file to your repository, you can install a pre-commit...
Read more >Skip Git commit hooks - Stack Overflow
commit : skip discarding the index if there is no pre-commit hook ... So using this "invoked_hook" pattern doesn't make sense in those...
Read more >How to Set up Pre-Commit Hooks in Python
They let you execute code right before the commit. Interestingly, a Python package is also called pre-commit, which allows you to create and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can confirm that it works for me without problems.
Thanks a lot for all your effort!
(Not closing as merging of #30 will do so)
Cool, I can confirm that your repo works!
I’m trying to think about how to set this up so it isn’t a lot of effort to maintain going forward. I think the setup.py of the mirror repo can be simplified to pull the version info from the
.version
file (similar to what we do in this repo), and then I can add a bash script or so to update that.version
file and do the git tag whenever I do a new release of CleverCSV.I’ll pick this back up tomorrow, thanks for your help!