Commit Graph

15 Commits

Author SHA1 Message Date
Robin H. Johnson
c6029376a5
feat: K8S KYAML output format support (#2560)
* feat: K8S KYAML output format support

Reference: https://github.com/kubernetes/enhancements/blob/master/keps/sig-cli/5295-kyaml/README.md
Co-authored-by: Codex <codex@openai.com>
Generated-with: OpenAI Codex CLI (partial)
Signed-off-by: Robin H. Johnson <rjohnson@coreweave.com>

* build: gomodcache/gocache should not be committed

Signed-off-by: Robin H. Johnson <rjohnson@coreweave.com>

* chore: fix spelling of behaviour

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>

* build: pass GOFLAGS to docker to support buildvcs=false

In trying to develop the KYAML support, various tests gave false
positive results because they made assumptions about Git functionality
Make it possible to avoid that by passing GOFLAGS='-buildvcs=false' to
to Makefile.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>

* doc: cover documentScenarios for tests

Signed-off-by: Robin H. Johnson <rjohnson@coreweave.com>

* build: exclude go caches from gosec

Without tuning, gosec scans all of the vendor/gocache/gomodcache, taking
several minutes (3m35 here), whereas the core of the yq takes only 15
seconds to scan.

If we intend to remediate upstream issues in future; add a seperate
target to scan those.

Signed-off-by: Robin H. Johnson <rjohnson@coreweave.com>

---------

Signed-off-by: Robin H. Johnson <rjohnson@coreweave.com>
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Co-authored-by: Codex <codex@openai.com>
2026-01-01 15:14:53 +11:00
Mike Farah
aa858520a8 Merge branch 'master' into toml_encoder 2025-12-16 14:27:22 +11:00
Mike Farah
626624af7b Adding tf to hcl format names 2025-12-16 14:17:38 +11:00
Mike Farah
1338b521ff Colours! 2025-12-14 19:41:45 +11:00
Mike Farah
51ddf8d357 Update pkg/yqlib/format.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-08 20:30:47 +11:00
Mike Farah
554bf5a2f2 colorise output 2025-12-08 20:30:47 +11:00
Mike Farah
656f07d0c2 wip 2025-12-08 20:30:47 +11:00
Mike Farah
1852073f29 hcl - sorted decoding 2025-12-08 20:30:47 +11:00
ryenus
d0c897f5e6 skip format check for filenames ending with dot
also add a unit test for func FormatStringFromFilename to cover such case
2025-07-15 19:30:07 +10:00
o.bilko
c58d9e7da4 fix tests 2025-05-17 18:55:53 +10:00
beliys
3ac203ebb8 Add INI support 2025-05-17 18:55:53 +10:00
damuzhi0810
1395d6e230 refactor: using slices.Contains to simplify the code
Signed-off-by: damuzhi0810 <rust@before.tech>
2025-03-25 15:10:25 +11:00
ryenus
b9c3ff6f0a
convert file ext to lowercase for format detection (#2121)
* convert file ext to lowercase for format detection

To ensure proper file format detection with case-insensitive file
systems.

* use filepath.Ext for more reliable file ext detection

especially for paths like index.js/foo

* add a test for file ext based format detection
2024-08-05 15:14:43 +10:00
Mike Farah
28c406706a Fixes npe when given filename ending with "." #1994 2024-03-30 14:00:57 +11:00
Mike Farah
447bf28cd8 Introduced 'format' to encapsulate encoding and decoding formats together 2024-02-24 16:37:13 +11:00