todogroup/repolinter

Include rule policy info and URL in console output

willnorris opened this issue · 3 comments

repolinter allows specifying policy information and a URL for individual rules, which is really helpful to directing project owners to get more information about those rules. However, that information is only included in the JSON and Markdown formatters, not the SymbolFormatter, which is used for console output, and by extension the repolinter GitHub Action.

Current output:

✖ license-file-exists: Did not find a file matching the specified patterns
	✖ LICENSE*
	✖ COPYING*

Desired output (something like...):

✖ license-file-exists: Did not find a file matching the specified patterns
  Must have a license file. (see more: http://go/oss-licensing)
	✖ LICENSE*
	✖ COPYING*

This issue is to track adding policyInfo and policyUrl to the SymbolFormatter, and I'm going ahead and assigning it to myself to do the work. I already started looking into it, and it felt like it was getting a little messy. So I either just need to read up more to understand the relationship between FormatResult and Result, or might try to do a little bit of refactoring while I'm in there.

Just noting that it looks like NewRelic are the primary ones using policyInfo and policyUrl in the wild, and much of it seems to assume the MarkdownFormatter (markdown is often included in the policyInfo).

I'll have to think about the best way to handle that. Include it anyway, since markdown is also designed to be human readable? Only include the policyUrl in SymboleFormatter? Only include policy information if requested with additional flag?

I would love to get a better understanding of this issue from a CNCF code of conduct maintainer, @caniszczyk do you have any insight?

If I'm understanding the request correctly, this was resolved by fb81866