Will Yardley
71fd5f8386
fix: add missing output formats in error message ( #213 )
...
- Add missing 'junit' and 'pretty' output formats.
- Use quotes vs. backticks around command name
2023-06-14 22:41:51 +02: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
d038bf8840
Do not hardcode output stream in pkg/output
...
Co-authored-by: Ahmed AbouZaid <6760103+aabouzaid@users.noreply.github.com>
2023-04-23 13:39:43 +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
Aleksey Levenstein
e3bb34851d
fix: expose error instance path instead of schema path ( #177 )
2023-02-27 16:16:00 +01:00
Yann Hamon
563e1db94c
Try to expose JSON paths ( #173 )
...
* Try to expose JSON paths
* update validationErrors format in json output
* Add test to JSON output with validationError
2023-02-26 12:32:51 +01:00
Yann Hamon
ee7c498580
Migrate to santhosh-tekuri/jsonschema ( #168 )
...
* Migrate to santhosh-tekuri/jsonschema
2023-01-23 19:22:20 +01: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
f5338b07f9
Validate JUnit output against Jenkins JUnit XSD ( #134 )
...
* Validate JUnit output against Jenkins JUnix XSD
* Add missing Jenkins JUnit XSD
* Add time to TestCase for #127
2022-10-16 13:52:04 +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
John-Michael Mulesa
5cbbd1a898
Upgrade hash to sha256. ( #126 )
2022-09-02 10:28:07 +02:00
hadar-co
5e63bc5ad7
add {{ .Group }} variable to schema location options ( #120 )
2022-07-16 14:13:17 +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
Carlos Sanchez
932b35d71f
chore: print the url of failed download ( #96 )
2022-02-22 23:59:39 +01:00
Yann Hamon
85b30f8c2a
Improve handling of cmdline errors ( #91 )
...
Improve handling of cmdline errors
2022-01-06 12:39:24 +01:00
Maxime Brunet
ff2ab3d770
feat(output/tap): Output qualified resource name
2021-12-17 19:18:55 -08: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
ab4745ddf0
Small clean-up
2021-09-26 22:55:01 +02:00
Yann Hamon
b5c823d6b5
Also read up to 256MB from stdin
2021-09-26 17:45:27 +02:00
Yann Hamon
8bb87b9a63
Allow bufio.Scanner to resize buffer when reading large files
2021-09-26 17:27:20 +02:00
Yann Hamon
4e83800979
gofmt
2021-09-26 11:58:09 +02:00
Christian Brauchli
dee75355d0
FIX: enable http_proxy environment variable
2021-09-17 09:32:36 +02:00
Yann Hamon
2eefa7fc22
Update Junit tests, fix #45
2021-08-29 12:57:25 +02:00
Victor Cardenas
44b7ba9aef
Properly handle successful http requests to registries sending invalid schema responses
2021-08-03 19:46:18 -04: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
Yann Hamon
df386fc1fd
Reformat strings
2021-07-03 16:01:51 +02:00
Yann Hamon
4eb75860d9
support for lists
2021-07-03 15:49:37 +02:00
Yann Hamon
77682c3142
fix junit test
2021-03-30 15:31:42 +02:00
Cameron Villers
e6e9eb8698
Add jUnit XML output formatter
2021-03-28 21:49:59 -04:00
Yann Hamon
b10927a052
Update Readme, add 'default' value for -schema-location parameter
2021-02-27 16:37:24 +01:00
Christoph Mertz
65968cf540
remove gosimple offences
2021-02-19 17:01:54 +01:00
Yann Hamon
61e708277d
Use a custom, more up-to-date fork of kubernetes-json-schema by default
2021-01-24 01:17:35 +01:00
Yann Hamon
d53c2e9913
update config test
2021-01-02 14:22:45 +01:00
Yann Hamon
c1f0e9010d
add tests for yaml scanning
2021-01-02 14:06:13 +01:00
Yann Hamon
92f8f4593d
break down FromFiles for easier testing
2021-01-02 12:52:58 +01:00
Yann Hamon
f7a9c86717
Add / update a few tests
2021-01-02 12:32:12 +01:00
Yann Hamon
128fcf993b
fail early when cache folder does not exist
2021-01-02 11:57:52 +01:00
Yann Hamon
18927ddf75
cache schemas downloaded over HTTP
2021-01-01 15:49:18 +01:00
Yann Hamon
1a76217195
fix - do try following schema registries when schema not found in local registry
2020-12-29 19:16:28 +01:00
Yann Hamon
9a56fc4176
Indicate field on validation error
2020-12-28 13:03:36 +01:00
Yann Hamon
509ad8e997
add test for missing apiVersion - better error message
2020-12-23 18:25:46 +01:00
Yann Hamon
031f83cbde
linting
2020-12-15 22:20:02 +01:00
Yann Hamon
0bbee68c49
update verbose desc
2020-12-15 22:12:41 +01:00
Yann Hamon
69e2fc8ba9
Add TAP header
2020-12-15 22:09:07 +01:00
Yann Hamon
07dec90112
tap plan can be at the end, that way we can stream the output and not buffer
2020-12-15 21:54:44 +01:00
Yann Hamon
c5aa8e6da3
fix closing files
2020-12-15 19:36:22 +01:00