-
Notifications
You must be signed in to change notification settings - Fork 53
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
Add CLI option to group reporter output #38
Comments
Hi @kehoecj! I would like to pick this up. I have been working with Golang for some time, and I feel that this would be a challenging and fun feature for me to implement. Can I take a stab at this? Also, this would be my first open source contribution and I feel excited about it. |
Excited to have you contribute! I assigned you this issue |
@abhishek-nigam Are you still interested in working this issue? |
Hey @kehoecj , mind if I take this on? I have the implementation done for passing a single value using |
@jcsmurph it's yours! |
Thanks! Couple of follow up questions:
|
|
* Add GroupBy command Add -groupby command to group output by file type, pass/fail, and directory * Add multiple groupby commands and validation Add: Validation for the groupby command and return error if value passed is not a valid command Add: Allow for multiple values for the groupby command * Add Tests Add: Added tests for cli_test.go and validator_test.go * Reformat groupBy Reformatted the groupBy functions and groupBy validation * Add Test Files Added more test files for testing purposes * Update grouping order and update readme Updated the groupings to be done in reverse order. Updated the readme with information on the groupby command * Fix groupby directory Fixed the groupby directory function to group by the last directory in the path * Update Tests Updated CLI tests * Fix Comment Fixed the cleanString funciton comment * Update README.md Co-authored-by: Jamie Davidson <51518462+jd4235@users.noreply.github.com> * Update cli_test.go Fixed formatting * Update validator.go Update pass/fail to pass-fail for validation checks * Update validator_test.go Fixed formatting indentation * Update group_output.go Changed pass/fail to pass-fail for GroupBy routing * Update README.md Changed pass/fail to pass-fail for documentation * Update validator.go Fixed formatting for groupBy string cleansing * Update group_output.go Updated indentation * Update validator.go Update flag to pass-fail * Update cli_test.go Update pass/fail to pass-fail * Update group_output.go Update GroupByPassFail comment to be consistent with pass-fail * Formatting fix Update to formatting * Add Group output Organized output for when groupby flag is set * Implement Group Output standard out Implementation of standard out using single and double groupbys * Implement Single Groupby JSON Implement the JSON output for a single groupby call * Refactor GroupBy Refactored groupBy when 2 values are passed * Refactor GroupByTwo Refactored groupby when 2 values are passed * Update to Stdout Update to standard out print * Implement JSON single group Implement output for JSON when single group is passed * Implement JSON double group and tests Implemented the JSON output for when two groupbys are passed. Also added test cases in the CLI path * Update go fmt Updated running go fmt * Implement triple group output Implement output for when 3 groupbys are passed * Add Output Tests Added output tests for groupby outputs * Clean comments Cleaned up comments * Changed Summary Format Changed the summary per group to be aligned with the inner most group rather than the tests * Update README.md Co-authored-by: Clayton Kehoe <118750525+kehoecj@users.noreply.github.com> * Update cmd/validator/validator.go Update file type to filetype to avoid input confusion Co-authored-by: Clayton Kehoe <118750525+kehoecj@users.noreply.github.com> * Add Header Comments Added header comments to the stdout and json reporters * Fix Naming Conflict Fixed a naming conflict in the json reporter groupby when 3 groups are passed * Add Util function for Json Reporter Added a utility function to the JSON reporter to reduce duplicated code. * Rename Utility Function Renamed the utility function and added a header comment * Rename Utility Function Calls Renamed the utility function calls to the correct name * Update JSON Print Updated the JSON print to use the utility function * Update STD Reporter Test Updated the standard reporter tests to align with groupby function changes * Refactor Reporter Refactored the print groupBy functions to be removed from the Reporter Interface * Update GroupBy Filetype Updated grouping for filetypes to group mixed cases * GoFmt update Updated the group_output.go to align to gofmt standards * Update directory groupby Updated the directory groupby to check if the filepath is in Windows * Add GroupBy Directory test Added a test for the GroupBy directory flag for Windows and other directory paths --------- Co-authored-by: Jamie Davidson <51518462+jd4235@users.noreply.github.com> Co-authored-by: Clayton Kehoe <118750525+kehoecj@users.noreply.github.com>
Description
The current output is displayed by the reporter as individual files without any grouping. Some users may want to have a customized grouping of the files in the output - for example grouping by file type, directory, pass/failed, etc. The options should be able to be combined/nested such as grouping by filetype within a directory
The text was updated successfully, but these errors were encountered: