tox-dev / tox

Command line driven CI frontend and development task automation tool.
https://tox.wiki
MIT License
3.59k stars 511 forks source link

Automatic `.gitignore` #2530

Open adamchainz opened 1 year ago

adamchainz commented 1 year ago

Some testing tools add a .gitignore with a * rule into the temporary directories they create. This saves projects needing to add a pattern to their Git ignore file, and prevents accidents where such a pattern is missing. For example, Coverage.py does so, since version 6.1.

Perhaps tox could do the same when creating a .tox directory?

jugmac00 commented 1 year ago

Sounds good to me. Let's wait for feedback whether the other maintainers have any objections.

gaborbernat commented 1 year ago

Go for it!

jugmac00 commented 11 months ago

FWIW - the virtual environments below .tox already come with a .gitignore, automatically created by virtualenv.

kurtmckee commented 8 months ago

However, if an interpreter is missing, a .tox-info.json file is still created, as I discovered when I ran a test suite but didn't have a few PyPy versions installed:

.tox/pypy38/.tox-info.json
.tox/pypy39/.tox-info.json

A top-level .gitignore in .tox/ is still desirable.