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

Provide a Junit compliant reporter #4570

Open
LasneF opened this issue Jun 22, 2023 · 2 comments
Open

Provide a Junit compliant reporter #4570

LasneF opened this issue Jun 22, 2023 · 2 comments

Comments

@LasneF
Copy link

LasneF commented Jun 22, 2023

Describe the solution you'd like
CSpell is definitively a great tool to include inside a CICD
many CICD solution includes capability to report , track , issues leveraging the JUnit format

here leveraging Cspell reporter capability, the feature would be to add a Junit Reporter so thatn the output can be leveraged inside a CICD .

junit format could be minimal like

<testsuite tests="3">
  <testcase classname="File1" name"/>
  <testcase classname="File2" name="AnotherSuccessfulTest"/>
  <testcase classname="foo3" name="AFailingTest">
               <failure type="prohibited word"> zzz </failure>
</testcase>
</testsuite>

Additional context
My context is about leveraging CSpell as a linter for Open API file

@Jason3S
Copy link
Collaborator

Jason3S commented Jun 23, 2023

@LasneF,

Custom reporters are already possible. There is an example here: https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell-json-reporter

A PR to add cspell-junit-reporter is welcome. If you would like us to develop it for you, please visit: Support - Street Side Software.

Kind regards,
Jason

@jkrenzer
Copy link

I started to work on a quite simple and crude implementation of a junit.xml reporter. See https://github.com/jkrenzer/cspell-junit-reporter for the source-code. Quite obviously I tried to stay as close to the cspell-json-reporter example as possible.

Currently Gitlab does read the generated files, but it is still very basic and the code is not stable. Use at your own risk, contributions are welcome.

Kind regards,
Jörn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants