Skip to content

CI: detect untracked generated files - #1951

Open
mattjohnsonpint wants to merge 1 commit into
stretchr:masterfrom
mattjohnsonpint:mjp/ci-generated-files
Open

CI: detect untracked generated files#1951
mattjohnsonpint wants to merge 1 commit into
stretchr:masterfrom
mattjohnsonpint:mjp/ci-generated-files

Conversation

@mattjohnsonpint

Copy link
Copy Markdown
Contributor

Summary

Newly generated untracked files were being excluded from the safety check performed in CI, due to the git command being used to perform the check.

Changes

Use the exit code from git status --short instead. It check the complete working tree so generation checks cannot pass when code generation creates a new file.

Motivation

git diff and git status -uno ignore newly generated untracked files, so the check was incomplete.

git diff and git status -uno ignore newly generated untracked files. Check the complete working tree so generation checks cannot pass when code generation creates a new file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant