Skip to content

File output option #2487

Closed as not planned
Closed as not planned

Description

@Cschlaefli

Description

I'd like to be able to write the output the results of svelte-check run to a file during CI in order to allow code climate reporting in gitlab

Proposed solution

Add a new --output option gitlab, and an associated FileWriter that writes to a json file with the gitlab format to the writers

Alternatives

Considered parsing the output of machine-verbose to a different format, but it'd be less work for me to just write the implementation into the svelte-check package.

Additional Information, eg. Screenshots

Linking the gitlab codeclimate ouput format for reference.
May need to implement the fingerprinting property, but the rest of the information is basically there.

Activity

  1. dummdidumm commented on Sep 6, 2024

    @dummdidumm
    Member

    Thank you for the suggestion, but we're not going to create another output format. The machine readable format is precisly so that you can then parse and format that into something else. Using shell commands it's also possible to write the result to disk. Therefore closing.

  2. faissalrez commented on Nov 7, 2026

    @faissalrez

    For anyone landing here from a search: I built svelte-check-reporter on top of the machine-verbose output, as suggested above. It turns it into a GitLab Code Quality report, GitHub Actions annotations or SARIF for GitHub code scanning:

    svelte-check --output machine-verbose | svelte-check-reporter --output-file gl-codequality.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

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