bash-it
bash-it copied to clipboard
Help us clean up Bash-it!
Hello folks!
We have now integrated pre-commit
hooks in order to improve the codebase quality. and now we need to start going through the files. We invite anyone who wants to contribute to this effort to try this out:
- Choose a file in the project, which is not present in
clean_files.txt
- Add the path from the root of the project to the file in
clean_files.txt
- Run
./lint_clean_files.sh
, and fix the issues - When
pre-commit
runs successfully, feel free to open a PR - Hooray, you helped us make Bash-it better! :smile:
An example PR, would be #1695
Pre commit can be ignore using --no-verify
and it will also frustrate the contributor when they are working on too many commits. So I would recommend you to add these checking tasks in the github workflow
I will help you refactoring bash-it
Pre commit can be ignore using
--no-verify
and it will also frustrate the contributor when they are working on too many commits. So I would recommend you to add these checking tasks in the github workflow
It is indeed pretty frustrating, but checked in the CI (see lint
stage)
Also see #1746 for better instructions
Thanks you @tbhaxor for helping us :heart:
Hey @NoahGorny I found so much inconsistent code in plugins directory. :smile:
Hey @NoahGorny I found so much inconsistent code in plugins directory. smile
Hi @tbhaxor, there is indeed a lot of inconsistent code in the plugins (and in the rest of the codebase as well). It does not mean we should give up though! We can continue improving the codebase, one PR at a time :smile:
@tbhaxor haha indeed. Luckily, @NoahGorny has been putting in an amazing amount of effort into figuring out our contribution guidelines and tooling. I see a bright future ahead, especially with great contributors like you helping us clean everything up!! :)
@NoahGorny Is anything left in this?
@NoahGorny Is anything left in this?
There are actually many things that are still not cleaned up- most of the plugins, the lib
directory, and also the install script.
If you want on those things, it would be really great :smile:
@tbhaxor hi, I was wondering if you have already started on this? I'd also like to lend a hand if you're not already done
@NoahGorny Is anything left in this?
There are actually many things that are still not cleaned up- most of the plugins, the
lib
directory, and also the install script. If you want on those things, it would be really great
@NoahGorny @cevhyruz Actually I am down with covid so I won't be able to work on that. Could you guys take care of it?
Sorry to hear that, hope you get well soon.
I'll be starting to work on it then.
@NoahGorny, @tbhaxor Just a quick question, should I need a separate PR for every file / directory that has been cleaned or should I just commit everything in a single PR?
Well @tbhaxor, I hope you will get through this, you have my support!
Sorry to hear that, hope you get well soon.
I'll be starting to work on it then.
@NoahGorny, @tbhaxor Just a quick question, should I need a separate PR for every file / directory that has been cleaned or should I just commit everything in a single PR?
I prefer that you split your work into separate PRs, this way is easier to check and merge. If you have any troubles feel free to contact me.
Thanks for your decision to help Bash-it! You rock :smile:
seems like I can't compile the pre-commit hooks without a bit of help (see bottom)
as: unrecognized option '--gdwarf-5'
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/ira/.cache/pre-commit/repop169ejxs/py_env-python3.9/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-707uv1_t/python-levenshtein_1a27053a5a29481fbbdcee325f499a89/setup.py'"'"'; __file__='"'"'/tmp/pip-install-707uv1_t/python-levenshtein_1a27053a5a29481fbbdcee325f499a89/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-oab8hg3w/install-record.txt --single-version-externally-managed --compile --install-headers /home/ira/.cache/pre-commit/repop169ejxs/py_env-python3.9/include/site/python3.9/python-Levenshtein Check the logs for full command output.
Check the log at /home/ira/.cache/pre-commit/pre-commit.log
version information
pre-commit version: 2.17.0
git --version: git version 2.32.0
sys.version:
3.9.7 (default, Sep 10 2021, 14:59:43)
[GCC 11.2.0]
sys.executable: /usr/bin/python
os.name: posix
sys.platform: linux
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=21.10
setting export CC=gcc-8
does the trick (a search says any version gcc-10 and earlier would do)