Commit graph

35 commits

Author SHA1 Message Date
PatDyn
ad166c7f0d
Sanitize csv strings (#258)
* Support spaces before/after commas when passing list of Kinds
2024-05-09 14:21:36 +02:00
Yann Hamon
a4d74ce7d2
Fail early on incorrect version of k8s (#254)
* Fail early on incorrect version of k8s

* fix tests
2023-12-24 18:05:04 +01:00
Yann Hamon
ad935b7e32 Add JSON/YAML annotations to Config struct
Co-authored-by: Ahmed AbouZaid <6760103+aabouzaid@users.noreply.github.com>
2023-04-23 13:55:09 +02:00
Yann Hamon
8bc9f42f39
Add support for "pretty" output (#195)
* feat: add pretty output format

---------

Co-authored-by: William Yardley <wyardley@users.noreply.github.com>
2023-04-22 18:41:51 +02:00
Andrea Tosatto
d8e348a597
Allow to skip resources using the GVK notation (#92)
* Allow to skip resources using the GVK notation
* Update flags description, add integration tests and update readme

Co-authored-by: Yann Hamon <yann@mandragor.org>
2022-10-16 14:59:48 +02:00
Yann Hamon
dbcd787256
Do not expose internal CPU profiling option as flag (#136) 2022-10-16 14:06:42 +02:00
Yann Hamon
f68d6ec6ea
Add debug information to help understand failures finding schemas (#133)
* Add debug information to help understand failures finding schemas

* Add debug information to help understand failures finding schemas
2022-10-16 12:28:11 +02:00
Bill Franklin
9a6fff13cb
Forbid duplicate keys in strict mode (#121)
* Forbid duplicate keys in strict mode

Prevents specifying duplicate keys using
UnmarshallStrict: https://pkg.go.dev/gopkg.in/yaml.v2#UnmarshalStrict

* Add acceptance tests for duplicated properties
2022-07-15 14:23:10 +02:00
Calle Pettersson
7bf1e01dec
fix: change flag parse error handling to return errors instead of exiting (#107)
* fix: change flag parse error handling to return errors instead of exiting

Having ExitOnError in combination with SetOutput to a buffer instead of
stdout/stderr means flags.Parse output is swallowed and kubeconform silently
exits directly with exit code 2 instead of returning the error.

Setting ContinueOnError instead returns the error, and writes usage help to
the buffer, so error handling code in main is reached.

* Add test for parsing incorrect flags

Co-authored-by: Yann Hamon <yann@mandragor.org>
2022-06-19 18:38:52 +02:00
Yann Hamon
85b30f8c2a
Improve handling of cmdline errors (#91)
Improve handling of cmdline errors
2022-01-06 12:39:24 +01:00
z0mbix
c3e6205f15
Move version to main package 2021-11-16 17:19:54 +00:00
z0mbix
d63de52458
Add -v to output version number 2021-11-16 15:30:33 +00:00
Yann Hamon
53a1689bac Fix unit tests 2021-07-11 22:57:20 +02:00
Yann Hamon
3a697f3ce2 validate against master by default, not 1.18.0 2021-07-11 22:53:23 +02:00
Cameron Villers
e6e9eb8698 Add jUnit XML output formatter 2021-03-28 21:49:59 -04:00
Yann Hamon
d53c2e9913 update config test 2021-01-02 14:22:45 +01:00
Yann Hamon
18927ddf75 cache schemas downloaded over HTTP 2021-01-01 15:49:18 +01:00
Yann Hamon
0bbee68c49 update verbose desc 2020-12-15 22:12:41 +01:00
Yann Hamon
29a8f4c09e avoid double unmarshalling 2020-12-15 18:35:33 +01:00
Yann Hamon
4afe9b1977 reduce allocations done when splitting 2020-12-15 17:04:44 +01:00
Yann Hamon
11a3e8f64f add cpu profiling 2020-12-15 16:27:25 +01:00
Yann Hamon
8c6e855239 support tap output 2020-12-15 13:22:52 +01:00
Yann Hamon
300b571c33 linting / refactor 2020-11-15 12:12:37 +01:00
Yann Hamon
4e96b44a8b Add example how to use kubeconform as a library 2020-11-15 10:01:36 +01:00
Yann Hamon
4b16128b75 Add comments to most exported functions/types 2020-11-08 22:35:17 +01:00
Yann Hamon
f78b65b025 add -ignore-filename-pattern option 2020-11-08 19:57:01 +01:00
Yann Hamon
9d7a79b253 renaming 2020-11-08 16:46:01 +01:00
Yann Hamon
207371cbc2 fix behaviour when passing erroneous flags 2020-11-08 16:33:31 +01:00
Yann Hamon
ec56304efd add -insecure-skip-tls-verify 2020-11-08 13:06:21 +01:00
Yann Hamon
b162c5b6f5 Add support for -reject and update README 2020-11-08 10:36:53 +01:00
Yann Hamon
358f145023 Add support for -exit-on-error 2020-11-08 10:08:14 +01:00
Yann Hamon
6911b9cf30 Add another flags parsing test to validate all flags 2020-11-01 23:29:50 +01:00
Yann Hamon
0152d8c209 add tests for command line parsing 2020-11-01 23:18:39 +01:00
Yann Hamon
939b44e3ca remove last mentions of flag in main 2020-10-31 16:09:53 +01:00
Yann Hamon
5bd09a483e move flag handling to pkg 2020-10-31 15:47:34 +01:00