From 2fed75bcf572f9efef05b971f0d367479dfd2d0d Mon Sep 17 00:00:00 2001 From: Vickey <891607480@qq.com> Date: Mon, 18 May 2026 18:36:44 +0800 Subject: [PATCH] chore(gitignore): expand ignore patterns for build, IDE, OS and secrets The existing .gitignore relied on non-standard globs ("*target", "*logs") and missed several categories that contributors regularly hit: Java class/jar artifacts, JVM crash dumps, common secret extensions, full IDE templates (IntelliJ/Eclipse/VS Code), editor swap and backup files, OS junk on macOS/Windows/Linux, Python venvs (now used by the mkdocs build), and Node fallbacks for any future frontend tooling. Reorganize into labelled sections and add the missing patterns. Use "target/" instead of "*target" and "*.log" + "logs/" instead of "*logs". Deliberately avoid a bare "bin/" entry so dc3/bin/ shell scripts stay tracked. git check-ignore confirms target/ is still ignored, dc3/bin and .env.example are not affected, and the only currently tracked file matching a new rule is an existing client.key under dc3-common-mqtt/src/main/resources/certs/ which is unaffected because git already tracks it. --- .gitignore | 108 ++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 91 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index 3501359ac..80fab7bf1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,20 +1,17 @@ -*target -*logs -dc3/data/ -.idea -*.iws -*.iml -*.ipr -.vs -.vscode -.settings -.project -.DS_Store -.env -.claude/settings.local.json -.claude/TODO.md +# ===== Build artifacts (Maven / Gradle / general) ===== +target/ +build/ +out/ +*.class +*.jar +*.war +*.ear +dependency-reduced-pom.xml +.flattened-pom.xml +release.properties +buildNumber.properties -# Test artifacts +# ===== Test artifacts ===== test-results/ **/target/test-classes/ **/target/surefire-reports/ @@ -22,6 +19,83 @@ test-results/ **/target/site/jacoco*/ **/target/jacoco*.exec -# Testcontainers state +# ===== Testcontainers state ===== .testcontainers/ **/.testcontainers.properties.bak + +# ===== Logs & JVM crash dumps ===== +*.log +*.log.* +logs/ +hs_err_pid*.log +replay_pid*.log +*.hprof +core.* + +# ===== Environment & secrets ===== +.env +.env.local +.env.*.local +*.key +*.pem +*.p12 +*.pfx +secrets/ + +# ===== IntelliJ IDEA ===== +.idea/ +*.iws +*.iml +*.ipr + +# ===== Eclipse ===== +.classpath +.project +.settings/ +.factorypath +.springBeans +.apt_generated/ + +# ===== VS Code / Visual Studio ===== +.vscode/ +.vs/ +*.code-workspace + +# ===== Editor temp / swap / backup ===== +*.swp +*.swo +*~ +*.bak +*.tmp +*.orig +*.rej + +# ===== OS junk ===== +.DS_Store +.AppleDouble +.LSOverride +Thumbs.db +ehthumbs.db +Desktop.ini +$RECYCLE.BIN/ + +# ===== Python (used by docs venv: mkdocs) ===== +__pycache__/ +*.py[cod] +.venv/ +.venv-*/ +venv/ + +# ===== Node (in case frontend tooling appears) ===== +node_modules/ +dist/ +.parcel-cache/ + +# ===== MkDocs build output ===== +/site/ +.cache/ + +# ===== Project-local data ===== +dc3/data/ +.claude/settings.local.json +.claude/TODO.md