Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support more report formats #1175

Closed
braineo opened this issue Dec 13, 2024 · 1 comment
Closed

Support more report formats #1175

braineo opened this issue Dec 13, 2024 · 1 comment

Comments

@braineo
Copy link

braineo commented Dec 13, 2024

Hello, thanks for the awesome work I think this tool saves my days, many days.

Currently in order to make typos integrate well with the source control system like gitlab, one needs to fiddle the json output like.

# this is my snippet for gitlab
typos --format json | jq --slurp '[.[] | select(.type == "typo") |
            {"description": "Typo detected: \(.typo) -> should be \(.corrections | join(", "))",
             "fingerprint": (.path + ":" + (.byte_offset | tostring)),
             "severity": "minor",
             "check_name": "typo",
             "location": {
             "path": .path,
               "lines": {
                 "begin": (.line_num // 1)
               }
              }
            }]' >typos-report.json

And I saw a ticket created two years ago for similar request

#594

Take another tool I've been using for example, ruff, can generate different formats for the pipelines

https://docs.astral.sh/ruff/settings/#output-format

I think it could be beneficial to create a extensive architecture for contributors to implement different report formats?

@epage
Copy link
Collaborator

epage commented Dec 13, 2024

As you said, we have #594 for Sarif which someone has started work on in #1047 which is in my backlog to get back to.

Someone also expressed interest for Code Climate in #937.

Looking at Ruff

  • junit: not even sure what lints in junit would look like (I guess this) and I've had bad experience with how under-defined junit is, with it depending a lot on the tool reading it
  • github, gitlab, azure:
    • github would also be covered by Sarif support
    • When discussing specific vendors, this gets into the question of what vendors do we support and how stable is the support within those vendors.

Huh, in the source they also support

The core of your issue is

I think it could be beneficial to create a extensive architecture for contributors to implement different report formats?

We do have some flexibility and #1047 highlights a gap we have (non-incremental output) and fills it.

So if that is the concern, then that is being taken care of.

The title is about supporting "more report formats". That is overly broad for an issue. If you have requests for specific formats, like gitlab, I would recommend being specific.

As there isn't anything more to act on within this issue, I'm going to go ahead and close it.

@epage epage closed this as not planned Won't fix, can't repro, duplicate, stale Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants