Simple Hook: Add License#66
Conversation
|
Thank you for this contribution! I see you changed the |
Of course! I have some other ideas as well. I would like to make an LSP or extension to entangled that checks whether generated comments were removed. I imagine this would be helpful on a codebase where people switch between the Markdown and generated source files.
I added a quick fix for the Makefile. Should a note be added to the README, or will poetry still be supported (for user installation)? |
|
No user installation works with anything pip compatible (pep-621?). It's just development that sort of requires |
|
Thanks also for the |
There was a problem hiding this comment.
Let's rename the hook to spdx_license; I don't like arbitrary verbs in variable names
Firstly, thank you for your program! I have been looking for an org-mode alternative for some time, and with Entangled, I like having the freedom to use any text editor! I am using it in a medium-sized project (likely to be 5k-10k LoC), which could be a good example to show.
Secondly, I am submitting this patch to add a new hook for licenses. Very similar to shebangs, most licenses (particularly SPDX) generally go at the top of a source file. I added the hook
addlicensefor this purpose.hooks/addlicense.py, is nearly identical to theshebanghook.tests/test_addlicense.py, and it passes.pyproject.toml, but poetry is called in the Makefile. I changed the latter to use hatch, but I'm not sure which is the default for this project.license, but then remembered it's a builtin constant.