Skip to content

enhance lint command for script engine #19

@haveiss

Description

@haveiss

Is your feature request related to a problem? Please describe.
Currently, the lint command does not detect any errors in the script for the scripting engine used in the HTTP Extractor and Script Processor.

How to reproduce:

Example recipe:

## invalid-recipe.yaml
version: v1beta1
source:
  scope: gotocompany
  type: http
  config:
    request:
      url: "https://example.com/api/v1/endpoint"
      content_type: application/json
      accept: application/json
    script:
      engine: tengo
      source: |
        asset := new_asset("user" // <-- expected ')'
meteor lint invalid-recipe.yaml

Expected Result:

... recipe error: <show error here>

Some checks were not successful
1 failing, 0 successful, and 1 total

Actual Result:

All checks were successful
0 failing, 1 successful, and 1 total

Describe the solution you'd like
I propose enhancing the lint command to effectively identify and display errors in the script. By implementing this improvement, developers can quickly locate and fix issues, saving time and effort. we can validate recipes more robustly and integrate it into our CI Pipeline to catch any issues before merging.

Metadata

Metadata

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