Skip to content

feat: add Zephyr RTOS .gitignore template - #4852

Open
srpatcha wants to merge 4 commits into
github:mainfrom
srpatcha:feat/add-zephyr-rtos-gitignore
Open

srpatcha wants to merge 4 commits into
github:mainfrom
srpatcha:feat/add-zephyr-rtos-gitignore

Conversation

@srpatcha

Copy link
Copy Markdown

Automated contribution by @srpatcha.

Changes

feat: add Zephyr RTOS .gitignore template

Signed-off with GPG.

@srpatcha
srpatcha requested a review from a team as a code owner April 25, 2026 02:16
srpatcha and others added 4 commits May 16, 2026 09:30
Add gitignore template for Zephyr RTOS projects covering:
- Build artifacts and twister output
- Generated config/devicetree files
- West workspace metadata
- Python virtual environments
Add a comprehensive template validation tool that checks for:
- Valid glob pattern syntax
- Duplicate pattern detection
- Conflicting include/exclude rules
- Coverage analysis with suggestions
- CLI interface with argparse
- Detailed reporting (errors, warnings, suggestions)
- Support for processing all templates in the repo

Signed-off-by: Srikanth Patchava <spatchava@meta.com>
Trailing whitespace in .gitignore patterns can cause unexpected
behavior. This script detects and removes trailing whitespace
from template files with dry-run support.

Signed-off-by: Srikanth Patchava <spatchava@meta.com>
Comprehensive test suite covering glob validation, trailing
whitespace detection, duplicate and conflict detection,
coverage analysis, and report formatting.

Signed-off-by: Srikanth Patchava <spatchava@meta.com>
@srpatcha
srpatcha force-pushed the feat/add-zephyr-rtos-gitignore branch from 5c3fe73 to 4cfd0b8 Compare May 16, 2026 16:30
@github-actions

Copy link
Copy Markdown

This PR is stale because there have been no updates in 90 days. It will close after 365 days of inactivity. Leave a comment if you want to keep it open.

@github-actions github-actions Bot added the stale label Aug 23, 2026
@@ -0,0 +1,78 @@
#!/usr/bin/env python3

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd ask that all of the changes in /scripts be removed. It's appreciated, but we actually have a linter already written that I keep forgetting to merge 😁

Comment on lines +24 to +27
# IDE
.vscode/launch.json
.vscode/tasks.json
*.jlink

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We ask that IDE-specific ignores go in their own Global/ templates rather than language-specific templates. In this case the vscode template lives in https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore

Suggested change
# IDE
.vscode/launch.json
.vscode/tasks.json
*.jlink

@@ -0,0 +1,27 @@
# Zephyr RTOS build artifacts

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should move this into community/embedded (which already exists) rather than create a new community/Embedded directory 👍

I think your version fits the directory structure better, but we already have the lowercase embedded directory so we should continue using it for now.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants