Skip to content

Conversation

@kakkoyun
Copy link
Member

  • chore(ci): Add CRLF detection and fix targets to prevent CRLF contamination
  • chore(go/fmt): Fix formatting issues
  • chore(ci): Add yaml and action formatter/linter to CI
  • chore(.github/workflows): Fix action formats and issues

…nation

Add two new Makefile targets to detect and fix carriage return (CRLF)
line endings that can contaminate the codebase from Windows environments:

- check-crlf: Scans all text files (excluding hidden dirs and vendor)
  for CRLF line endings and fails if any are found
- fix-crlf: Automatically converts CRLF to LF using the tr command

Add CRLF check to CI workflow to catch line ending issues early in PRs.
The check runs immediately after checkout, before any other validation.

Also rename go.yml to validate.yml to better reflect the workflow's
purpose, and fix job name casing (supportedVersions -> supported_versions).

Signed-off-by: Kemal Akkoyun <kemal.akkoyun@datadoghq.com>
Signed-off-by: Kemal Akkoyun <kemal.akkoyun@datadoghq.com>
Signed-off-by: Kemal Akkoyun <kemal.akkoyun@datadoghq.com>
Signed-off-by: Kemal Akkoyun <kemal.akkoyun@datadoghq.com>
@kakkoyun kakkoyun marked this pull request as draft October 24, 2025 14:24
Copy link
Member

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

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

I would copy the .yamllint config from prometheus/prometheus.

YAMLFMT := $(FIRST_GOPATH)/bin/yamlfmt
ACTIONLINT := $(FIRST_GOPATH)/bin/actionlint

$(YAMLFMT):
Copy link
Member

Choose a reason for hiding this comment

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

We already have common-yamllint in Makefile.common.

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.

2 participants