Skip to content

[chore] [cmd/mdatagen] added CI enforcement for tab identation#15031

Open
ThyTran1402 wants to merge 1 commit intoopen-telemetry:mainfrom
ThyTran1402:fix/gap_template_source_quality_and_generated_output_quality
Open

[chore] [cmd/mdatagen] added CI enforcement for tab identation#15031
ThyTran1402 wants to merge 1 commit intoopen-telemetry:mainfrom
ThyTran1402:fix/gap_template_source_quality_and_generated_output_quality

Conversation

@ThyTran1402
Copy link
Copy Markdown

Description

Go template files in cmd/mdatagen and cmd/builder could be authored with space indentation instead of tabs, violating Go conventions. This was silently masked in cmd/mdatagen because format.Source() corrected the generated output after template execution but the template source itself stayed broken.
In cmd/builder, no such formatting step existed at all, meaning space-indented templates would produce space-indented generated files directly.

Related PRs:
#14669
#14688
#14697

Link to tracking issue

Fixes #14698

Testing

Documentation

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented Mar 30, 2026

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: ThyTran1402 / name: Thy Tran (19b0e06)

@ThyTran1402 ThyTran1402 changed the title added CI enforcement for tab identation [chore] added CI enforcement for tab identation Mar 30, 2026
@ThyTran1402 ThyTran1402 changed the title [chore] added CI enforcement for tab identation [chore] [cmd/mdatagen]] added CI enforcement for tab identation Mar 30, 2026
@ThyTran1402 ThyTran1402 changed the title [chore] [cmd/mdatagen]] added CI enforcement for tab identation [chore] [cmd/mdatagen] added CI enforcement for tab identation Mar 30, 2026
@dmathieu
Copy link
Copy Markdown
Member

This is a good first step, but it's not enough. Tab indentation would indeed be fixed. But there could also be unneeded imports (that will be removed by gofmt), or misordered ones.

You should look at the first PR fixing this, it was heading in the right direction.

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.

Ensure templates are properly tab-formatted

2 participants