Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help us clean up Bash-it! #1696

Open
NoahGorny opened this issue Oct 31, 2020 · 13 comments
Open

Help us clean up Bash-it! #1696

NoahGorny opened this issue Oct 31, 2020 · 13 comments

Comments

@NoahGorny
Copy link
Member

NoahGorny commented Oct 31, 2020

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! 😄

An example PR, would be #1695

@NoahGorny NoahGorny pinned this issue Oct 31, 2020
georgettica added a commit to georgettica/bash-it that referenced this issue Dec 16, 2020
@tbhaxor
Copy link
Contributor

tbhaxor commented Dec 20, 2020

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

@tbhaxor
Copy link
Contributor

tbhaxor commented Dec 20, 2020

I will help you refactoring bash-it

@NoahGorny
Copy link
Member Author

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 ❤️

georgettica added a commit to georgettica/bash-it that referenced this issue Dec 27, 2020
@tbhaxor
Copy link
Contributor

tbhaxor commented Dec 27, 2020

Hey @NoahGorny I found so much inconsistent code in plugins directory. 😄

@NoahGorny
Copy link
Member Author

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 😄

@cornfeedhobo
Copy link
Member

cornfeedhobo commented Jan 1, 2021

@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 pushed a commit to georgettica/bash-it that referenced this issue Jan 8, 2021
This was referenced Jan 11, 2021
@tbhaxor
Copy link
Contributor

tbhaxor commented Apr 13, 2021

@NoahGorny Is anything left in this?

@NoahGorny
Copy link
Member Author

@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 😄

@cevhyruz
Copy link
Contributor

@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

@tbhaxor
Copy link
Contributor

tbhaxor commented Apr 19, 2021

@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?

@cevhyruz
Copy link
Contributor

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?

@NoahGorny
Copy link
Member Author

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 😄

@seefood
Copy link
Contributor

seefood commented Feb 11, 2022

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants