4 ms·
Part of a good software team's toolbox. Others: https://direnv.net/ https://direnv.net/ -- when you cd to a directory, do things like set variables. https://
by bloopernova 4y ago
Part of a good software team's toolbox.
Others:
https://direnv.net/ https://direnv.net/ -- when you cd to a directory, do things like set variables.
https://asdf-vm.com/ https://asdf-vm.com/ -- manage and use specific versions of software. Can work with direnv too!
https://pre-commit.com/ https://pre-commit.com/ -- git hooks that I personally found easier to manage than Husky.
https://github.com/qoomon/git-conventional-commits https://github.com/qoomon/git-conventional-commits -- enforce standard commit messages. Works with pre-commit!
- bavent 4y agoI used asdf for a long time and recently switched over to rtx (https://github.com/jdxcode/rtx https://github.com/jdxcode/rtx) and so far it's been a better experience for me. I must have screwed up something years ago in my dotfiles, but when I setup asdf two or so years ago, I kept running into odd issues - the wrong version of ruby being used for running rubocop/rspec, vim being unable to autofix styling, misc other tools not working as expected when maintaining several versions of them. I installed rtx as kind of a hail Mary and it's been much more smooth so far.
- e1g 4y agoSame, I went from volta -> asdf -> rtx, and find rtx to be the most seamless and well-thought-out option for me.
- SOLAR_FIELDS 4y agoI just spent an hour or so today fighting with asdf Python installs. I’ll check out rtx.
- mherrmann 4y agoI'd like to offer https://github.com/jamesob/desk https://github.com/jamesob/desk as an alternative to direnv. It's useful for also jumping to the project directory and doing other things like opening an editor.
- hamandcheese 4y agoWhat advantages does desk have over direnv?
- kevincox 4y agoI have to say I love editorconfig, I feel that once you start running code and managing tools it starts to get too much for me. At that point just spin up a VM or container so that the environment is yours. I loathe pre-commit hooks. I often times just want to save work in progress or show someone what I have right now and they slow down my work or worse fail and lose my commit message and cause me to have to figure out how to disable them to continue. If you want to run checks for formatting or similar that is much better done in CI. I can get a reminder without breaking any dev workflows. Of course make fixing formatting a single command, and maybe an optional hook for those that prefer it. But when projects try to auto-install hooks it drives me crazy.
- andybak 4y agoA compromise is to only enforce pre-commit rules when merging to main or some other important branch. Be as sloppy as you want on your own branches and make stuff proper when you're ready.
- ucm_edge 4y agoFor us we did the main only pre commit thing and also a CI check that any MR marked as ready for review has to pass linting. So you can go wild in your own branches and draft MRs but anything you want someone else to review has to pass.
- ghosty141 4y agoImo the pre-receive or update hook should be used on the server. For trunk based development I‘d also only check for (e.g) formatting on the main branch.
- throw_a_grenade 4y agogit commit -n|--no-verify I have it in shell history, so it's somethig like "^R ver".
- kevincox 4y agoBy the time I realize I should have done that I have already been inconvinced. Also remember to copy .git/COMMIT_EDITMSG before you run it so that you don't loose your message.
- silverwind 4y ago> https://direnv.net/ https://direnv.net/ -- when you cd to a directory, do things like set variables. Just use dotenv instead. https://asdf-vm.com/ https://asdf-vm.com/ -- manage and use specific versions of software. Can work with direnv too! May be useful in some cases, but adds a global dependency on asdf itself. > https://pre-commit.com/ https://pre-commit.com/ -- git hooks that I personally found easier to manage than Husky. Git hooks are disturbing and slow down and/or break advanced git interactions. > https://github.com/qoomon/git-conventional-commits https://github.com/qoomon/git-conventional-commits -- enforce standard commit messages. Works with pre-commit! Only if you want to be so pedantic about them. I find it mostly a waste of time to enforce commit message style.
- artdigital 4y agoGood tools, but I disagree with the last one, which feels more like an outlier. The feat, docs, whatever style is highly opinionated, and I have yet to encounter a need for something like this in a professional setting