korandoru / hawkeye

Simple license header checker and formatter, in multiple distribution forms.
Apache License 2.0
85 stars 12 forks source link

Factor out the reporting logics #86

Closed tisonkun closed 6 months ago

tisonkun commented 1 year ago

Now we always print the result to the console in a fixed format.

We should build an internal report data structure and adapt it to multiple reporting format (HTML, XML, console plain text, etc.).

dshunter107 commented 1 year ago

Hello. I am interested in working on this issue; however, I am rather new to GitHub and development. I have taken several computer science classes (including data structures and algorithms), and I have built some programs in the past. I am also familiar with GitHub commits, push, and pull requests. Can you tell me more about this issue. What type of data structure would you be looking for, and where would be a good place to look in the program to start working on this issue?

tisonkun commented 1 year ago

@dshunter107 Glad to see you :D

The data structure should be relatively simple:

Filepath -> License check result (present / missing / noop / added / replaced / removed / unknown)

You can take a look at the ReportConstants class where I use a flatten and String-represent solution for now.

For the report format, you can take a look at Maven's Report Mojo designs:

For the report format this plugin may need:

dshunter107 commented 1 year ago

@tisonkun I have an update.

I was able to figure out how to get surefire reports to work; however, I am currently getting a pretty brutal error attempting to utilize the report Mojo. I created a stackoverflow if you want to see the issue that I am having:

https://stackoverflow.com/questions/77045561/how-to-solve-maven-error-a-required-class-is-missing-org-apache-maven-reportin

I can implement Surefire reports for your project, if you would like, but I can't figure out how to utilize a Mojo to enable you to customize the report. Instead, the report would be the standard ones that surefire would print. it would be available in html, xml, and txt. It would also be able to show the outcomes of tests. Do you want me to implement the surefire reports?

tisonkun commented 6 months ago

No longer relvant.