-
-
Notifications
You must be signed in to change notification settings - Fork 371
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
Don't output table if no violations are specified #116
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ import * as v from "voca" | |
* @returns {string} HTML | ||
*/ | ||
function table(name: string, emoji: string, violations: Array<Violation>): string { | ||
if (violations.length === 0) { return "" } | ||
if (violations.length === 0 || (violations.length === 1 && !violations[0].message)) { return "" } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lets get a test on this logic, as this is not something which would get manually tested very often There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This area is already pretty well covered, so it should be pretty trivial to C&P an existing one |
||
return ` | ||
<table> | ||
<thead> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be something more like:
Which makes a bit more sense without the context of this PR 👍