Skip to content

igluctl: Raise errors in parseable errorformat #500

Open
@mrchief

Description

Igluctl lint reports errors that are spread over multiple lines and look something like this

Cannot read [com.test]: no valid JSON SchemasCannot parse [com.test/test_schema/jsonschema/1-0-0]: Unexpected character ('}' (code 125)): was expecting double-quote to start field name
 at [Source: {
  "$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
  "description": "Test.",
  "self": {
    "vendor": "com.test",
    "name": "test_schema",
    "format": "jsonschema",
    "version": "1-0-0"
  },
  "type": "object",
  "properties": {

    "prop": {
      "description": "Test prop",
      "enum": ["test"]
    },

  },
  "minProperties": 1,
  "required": [
    "prop"
  ],
  "additionalProperties": false
}
; line: 18, column: 4]

It'd be great if the error could be formatted in {file}:{line}:{column}: {message} format. I'm building a lint action to validate and report errors on Github Pull Requests. Having errors output in this format opens up numerous possibilities like annotations and file suggestions.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions