Class: Csvlint::Cli
- Inherits:
-
Thor
- Object
- Thor
- Csvlint::Cli
- Defined in:
- lib/csvlint/cli.rb
Instance Method Summary collapse
Instance Method Details
#help ⇒ Object
29 30 31 |
# File 'lib/csvlint/cli.rb', line 29 def help self.class.command_help(shell, :validate) end |
#validate(source = nil) ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/csvlint/cli.rb', line 18 def validate(source = nil) source = read_source(source) @schema = get_schema([:schema]) if [:schema] fetch_schema_tables(@schema, ) if source.nil? Rainbow.enabled = $stdout.tty? valid = validate_csv(source, @schema, [:dump_errors], [:json], [:werror]) exit 1 unless valid end |