cloud66-oss / copper

A configuration file validator for Kubernetes.
https://help.cloud66.com/copper/
Apache License 2.0
274 stars 16 forks source link

Current getting started doc formats to an emdash, appearing to be the wrong syntax for CLI parameters #7

Closed conorcurlett closed 6 years ago

conorcurlett commented 6 years ago

The current version of getting started contains $ copper check –rules my_rule.cop –file service.yml This looks like the command uses one dash (-rules) rather than two (--rules), which is probably a quirk of the formatter.

This is exacerbated by there being some problems in CLI syntax handling, meaning the output is an unhelpful $ copper check -rules foo -file bar ERROR: "copper check" was called with arguments ["-rules", "foo", "-file", "bar"] Usage: "copper check" However, copper check also doesn't suggest what the problem is: $ copper check ~/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/c66-copper-0.0.4/bin/copper:39:in ``exists?': no implicit conversion of nil into String (TypeError)...`

To work around, someone can check the source and see what it's expecting, but this could be a bit of a speedbump for people ramping up on copper. The website doesn't appear to be part of the repo or I'd make a PR.

khash commented 6 years ago

Thank you @conorcurlett for the feedback. We are going to move the site into the repo as well soon. In the meantime, I've changed the formatting to show the -- properly.