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

feat(#3800): LintMojo prints lints URL #3897

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

h1alexbel
Copy link
Contributor

In this PR I've updated LintMojo to print URL with current lints version.

closes #3800

@h1alexbel
Copy link
Contributor Author

@maxonfjvipon please check this one. Looks like Codacy complaint is a false-positive.

@maxonfjvipon
Copy link
Member

@h1alexbel you can ignore the file by adding it to .codacy

@h1alexbel
Copy link
Contributor Author

@maxonfjvipon updated. Take a look, please

final ConcurrentHashMap<Severity, List<Defect>> counts = new ConcurrentHashMap<>();
counts.putIfAbsent(Severity.CRITICAL, new ListOf<>());
counts.putIfAbsent(Severity.ERROR, new ListOf<>());
counts.putIfAbsent(Severity.WARNING, new ListOf<>());
Copy link
Member

Choose a reason for hiding this comment

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

@h1alexbel why do we need all this stuff with Lists? Only retrieving jus one element and take the version? Looks a bit suboptimal to me

Copy link
Contributor Author

@h1alexbel h1alexbel Feb 7, 2025

Choose a reason for hiding this comment

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

@maxonfjvipon I agree. But to my knowledge, for now, we can't get the version without defect creation. To find defect, you need to aggregate the list of defects, not its count. I also thought about returning version in Program or Programs from lints like this:

final Programs programs = ...;
final String version = programs.version();

WDYT? Maybe we should implement such functionality in lints?

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.

LintMojo doesn't show links to motive pages for each defect type
2 participants