From 51a322c77ee289f522785e13f68fef520be87471 Mon Sep 17 00:00:00 2001 From: Aristotelis Date: Thu, 27 Jul 2023 14:27:07 +0200 Subject: [PATCH] [Development] Specify `extra` directory as a designated ignored folder (#2593) * Add `extra` directory as a designated ignored folder Excludes `extra/` from version tracking, file formatters, and file checks. * Remove pytest cache from exclusion rules Python test discovery is easy enough to disable for the workspace in VS Code's settings and pytest does not serve any purpose in the context of the project anyway. --- .dprint.json | 4 +++- .eslintrc.js | 2 +- .gitignore | 1 + docs/development.md | 4 ++++ tools/minilints/src/main.rs | 2 ++ 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.dprint.json b/.dprint.json index 5b5d7f702..840565115 100644 --- a/.dprint.json +++ b/.dprint.json @@ -27,7 +27,9 @@ "licenses.json", ".dmypy.json", "qt/bundle/PyOxidizer", - "target" + "target", + ".mypy_cache", + "extra" ], "plugins": [ "https://plugins.dprint.dev/typescript-0.85.1.wasm", diff --git a/.eslintrc.js b/.eslintrc.js index e7dd15563..f18b7ea61 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -50,7 +50,7 @@ module.exports = { }, ], env: { browser: true }, - ignorePatterns: ["backend_proto.d.ts", "*.svelte.d.ts", "vendor"], + ignorePatterns: ["backend_proto.d.ts", "*.svelte.d.ts", "vendor", "extra/*"], globals: { globalThis: false, NodeListOf: false, diff --git a/.gitignore b/.gitignore index 21e7a06b6..68139a32a 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ node_modules .n2_db .ninja_log .ninja_deps +/extra diff --git a/docs/development.md b/docs/development.md index 1d1ead6b6..3081cbef4 100644 --- a/docs/development.md +++ b/docs/development.md @@ -95,6 +95,10 @@ When formatting issues are reported, they can be fixed with cargo clippy --fix ``` +## Excluding your own untracked files from formatting and checks + +If you want to add files or folders to the project tree that should be excluded from version tracking and not be matched by formatters and checks, place them in an `extra` folder and they will automatically be ignored. + ## Optimized builds The `./run` command will create a non-optimized build by default. This is faster diff --git a/tools/minilints/src/main.rs b/tools/minilints/src/main.rs index 1f8a206fc..a5d46d4e6 100644 --- a/tools/minilints/src/main.rs +++ b/tools/minilints/src/main.rs @@ -40,6 +40,8 @@ const IGNORED_FOLDERS: &[&str] = &[ "./tools/workspace-hack", "./qt/bundle/PyOxidizer", "./target", + ".mypy_cache", + "./extra", ]; fn main() -> Result<()> {