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

Prettier lint results #415

Open
wants to merge 58 commits into
base: main
Choose a base branch
from

Conversation

ryanhubbell
Copy link

I wasn't happy with what github annotations gives you (especially the limit of 10!), so I went ahead and implemented a new way to display the results, which creates markdown. This has a limitation as well (65k), but its much better than the annotations. This is quite a large change, so I understand if you don't want to bother. I got it done and working, so I figured I would offer it up.

Summary Example:
image
Lint issue Example:
image

Copy link
Owner

@yutailang0119 yutailang0119 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your wonderful work!
Using Step Summary to display Lint results looks like a great idea.

However, I think that Annotation and Summary have different purposes.
Annotation is excellent for confirming remarks in review.

Since there are different use cases, I think it is better to support to each method.

idData.summary,
`${getSeverityIcon(idData)}`
])
const nameLink = `<a id="${lintSlug.id}" href="${baseUrl + lintSlug.link}">${idData.summary}</a>`
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel it is redundant to insert Explanation into Summary.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷‍♂️ I thought it was nice to have in the markdown, as it has a more detailed explanation than just the "summary" text you normally see, but to each his own. I was basically following the format of the lint html file that gets generated when running lint (more or less). I suppose it could be an optional thing.

@ryanhubbell
Copy link
Author

Thanks for your wonderful work! Using Step Summary to display Lint results looks like a great idea.

However, I think that Annotation and Summary have different purposes. Annotation is excellent for confirming remarks in review.

Since there are different use cases, I think it is better to support to each method.

I was originally just doing this work for myself, but when I was done, figured I would offer this up to you for PR (otherwise I wouldn't have changed the main run function like I did here). Let me know if you would like me to make any changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants