elastic / elastic/elastic-package

[format] Integrate elastic/celfmt to format CEL programs

Open
#2,583 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
72
Forks
141
Avg merge
19h 42m
Merged PRs (30d)
55

Description

Integrate https://github.com/elastic/celfmt into the `elastic-package format` command to apply canonical format to CEL programs contained in `cel.yml.hbs` files associated with `input: cel`. File names associated with CEL input types should be determined through the `template_path` value.

Formatting the content consistently helps with the review process.

### `template_path` specification

The `template_path` can occur in two locations. And I believe the undocumented default is `stream.yml.hbs`[^1].

- https://github.com/elastic/package-spec/blob/507622633e4ee5974bb0f07a87e51141839f6e3c/spec/integration/data_stream/manifest.spec.yml#L543

- https://github.com/elastic/package-spec/blob/507622633e4ee5974bb0f07a87e51141839f6e3c/spec/integration/manifest.spec.yml#L504-L508

[^1]: https://github.com/elastic/kibana/blob/ed5f3e714cca887ff88f1f6cd6273a94a9c89e66/x-pack/platform/plugins/shared/fleet/server/services/epm/archive/parse.ts#L506

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the `elastic-package format` command and inspect how `template_path` is defined in the linked package-spec locations. Review the `elastic/celfmt` integration requirements and determine how CEL input files in `cel.yml.hbs` are identified. Done means the command applies canonical formatting to those CEL programs using their configured template paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.