From c3774e1255811b3a2d809f68dac7adb5a1e9ec70 Mon Sep 17 00:00:00 2001 From: konsti Date: Thu, 21 Sep 2023 21:33:09 +0200 Subject: [PATCH] Fix gitignore to not ignore files that are required (#7538) It is apparently possible to add files to the git index, even if they are part of the gitignore (see e.g. https://stackoverflow.com/questions/45400361/why-is-gitignore-not-ignoring-my-files, even though it's strange that the gitignore entries existed before the files were added, i wouldn't know how to get them added in that case). I ran ``` git rm -r --cached . ``` then change the gitignore not actually ignore those files with the exception of `crates/ruff_cli/resources/test/fixtures/cache_mutable/source.py`, which is actually a generated file. --- .gitignore | 6 ++++++ .../test/fixtures/cache_mutable/source.py | 3 --- docs/.gitignore | 14 +++++--------- 3 files changed, 11 insertions(+), 12 deletions(-) delete mode 100644 crates/ruff_cli/resources/test/fixtures/cache_mutable/source.py diff --git a/.gitignore b/.gitignore index c36085eaa4..a7912ac7c9 100644 --- a/.gitignore +++ b/.gitignore @@ -208,3 +208,9 @@ cython_debug/ # VIM .*.sw? .sw? + +# Custom re-inclusions for the resolver test cases +!crates/ruff_python_resolver/resources/test/airflow/venv/ +!crates/ruff_python_resolver/resources/test/airflow/venv/lib +!crates/ruff_python_resolver/resources/test/airflow/venv/lib/python3.11/site-packages/_watchdog_fsevents.cpython-311-darwin.so +!crates/ruff_python_resolver/resources/test/airflow/venv/lib/python3.11/site-packages/orjson/orjson.cpython-311-darwin.so diff --git a/crates/ruff_cli/resources/test/fixtures/cache_mutable/source.py b/crates/ruff_cli/resources/test/fixtures/cache_mutable/source.py deleted file mode 100644 index 83936dccb5..0000000000 --- a/crates/ruff_cli/resources/test/fixtures/cache_mutable/source.py +++ /dev/null @@ -1,3 +0,0 @@ -a = 1 - -__all__ = list(["a", "b"]) diff --git a/docs/.gitignore b/docs/.gitignore index 77e239d610..9df24a132a 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,9 +1,5 @@ -* -!assets -!configuration.md -!editor-integrations.md -!faq.md -!installation.md -!requirements.txt -!tutorial.md -!usage.md +contributing.md +index.md +rules.md +rules/ +settings.md