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 custom reporters #42

Closed
ajsait opened this issue May 27, 2015 · 10 comments
Closed

Support custom reporters #42

ajsait opened this issue May 27, 2015 · 10 comments

Comments

@ajsait
Copy link

ajsait commented May 27, 2015

It would be cool if there will be a Jenkins integration

@segiddins
Copy link
Contributor

@ajsait can you please give a bit more detail in what you're asking for?

@ajsait
Copy link
Author

ajsait commented May 27, 2015

We want to use the SwiftLint in our Jenkins CI server. Currently it just generates something like this.

Finding Swift files in current directory...
/Users/Shared/Jenkins/.jenkins/workspace/iOS-v3-Build/Foo/AppDelegate.swift:20: warning: Length Violation (Low Severity): Line should be 100 characters or less: currently 125 characters
/Users/Shared/Jenkins/.jenkins/workspace/iOS-v3-Build/Foo/AppDelegate.swift:21: warning: Length Violation (Very Low Severity): Line should be 100 characters or less: currently 117 characters
/Users/Shared/Jenkins/.jenkins/workspace/iOS-v3-Build/Foo/AppDelegate.swift:27: error: Length Violation (Very High Severity): Line should be 100 characters or less: currently 281 characters
/Users/Shared/Jenkins/.jenkins/workspace/iOS-v3-Build/Foo/AppDelegate.swift:28: warning: Length Violation (Medium Severity): Line should be 100 characters or less: currently 151 characters
/Users/Shared/Jenkins/.jenkins/workspace/iOS-v3-Build/Foo/AppDelegate.swift:32: error: Length Violation (High Severity): Line should be 100 characters or less: currently 214 characters
/Users/Shared/Jenkins/.jenkins/workspace/iOS-v3-Build/Foo/AppDelegate.swift:33: warning: Length Violation (Low Severity): Line should be 100 characters or less: currently 137 characters
/Users/Shared/Jenkins/.jenkins/workspace/iOS-v3-Build/Foo/AppDelegate.swift:37: warning: Length Violation (Medium Severity): Line should be 100 characters or less: currently 153 characters

It would be nice to have a much better report for SwiftLint, something like the one in Sonar.

@neilpa
Copy link

neilpa commented May 27, 2015

I think this boils down to supporting structured output - json, csv, etc.

@jpsim jpsim changed the title Jenkins reporting Support custom reporters May 27, 2015
@jpsim
Copy link
Collaborator

jpsim commented May 27, 2015

Indeed, supporting custom reporters would be great!

@ajsait
Copy link
Author

ajsait commented May 29, 2015

A PMD XML report file output would also be ideal.

@rompic
Copy link

rompic commented Sep 17, 2015

Would be perfect if sonar could be supported

@jpsim
Copy link
Collaborator

jpsim commented Sep 19, 2015

Could those of you who have requested support for custom report formats point to official documentation for the formats you need? I'll need a full spec of what "PMD XML" and "Sonar" output should look like.

@jpsim
Copy link
Collaborator

jpsim commented Sep 19, 2015

I've added the infrastructure necessary for this, along with new JSON and CSV reporters in #133.

I encourage those of you who have requested this feature to take a look at how it's done and let me know if it's on the right track.

jpsim added a commit that referenced this issue Sep 19, 2015
added custom reporters: xcode (default), json, csv. fixes #42
keith added a commit to lyft/SwiftLint that referenced this issue Sep 30, 2015
* master:
  Release 0.2.0: Tumble Dry
  keep it functional, yo!
  [Configuration] allow configuring parameterized rules from the configuration file
  use XcodeReporter for StyleViolation's description
  added custom reporters: xcode (default), json, csv. fixes realm#42
  generalize TodoRule
  further generalized TodoRule
  Generalize TodoRule
@dmytrol
Copy link

dmytrol commented Dec 18, 2015

I would certainly add XML reporting to the mix, primarily because TeamCity, for example, can handle a lot of XML-based formats, but, unfortunately, neither CSV nor JSON.

You can check out this page for more information: https://confluence.jetbrains.com/display/TCD9/XML+Report+Processing

@jpsim
Copy link
Collaborator

jpsim commented Dec 18, 2015

Thanks for the suggestion @dmytrol, I've created #277 to track that.

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

6 participants