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

Programs.version is needed #324

Closed
h1alexbel opened this issue Feb 9, 2025 · 5 comments · Fixed by #325
Closed

Programs.version is needed #324

h1alexbel opened this issue Feb 9, 2025 · 5 comments · Fixed by #325

Comments

@h1alexbel
Copy link
Contributor

Currently, we cannot get the version of lints library, without creating the Defect, since it's implementation is package-private (Defect.Simple). Besides that, in some cases it's suboptimal to retrieve only one element from all the received defects to take its .version(). I suggest we introduce new method: version() in Program or Programs in order to do it easier:

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

This idea was initiated by this: objectionary/eo#3897 (comment)

@h1alexbel
Copy link
Contributor Author

@yegor256 @maxonfjvipon WDYT?

@h1alexbel
Copy link
Contributor Author

@maxonfjvipon @yegor256 how about this idea?

@maxonfjvipon
Copy link
Member

@h1alexbel I like the idea. Let's do it

@yegor256
Copy link
Member

@h1alexbel maybe simply put EOLints-Version into MANIFEST.MF and then read it through com.jcabi.manifests.Manifests.read()?

@h1alexbel
Copy link
Contributor Author

@yegor256 Yes, my plan was to read version from MANIFEST.MF, the same way we did in Defect.java:

return Manifests.read("Lints-Version");

h1alexbel added a commit to h1alexbel/lints that referenced this issue Feb 11, 2025
h1alexbel added a commit to h1alexbel/lints that referenced this issue Feb 11, 2025
h1alexbel added a commit to h1alexbel/lints that referenced this issue Feb 11, 2025
h1alexbel added a commit to h1alexbel/lints that referenced this issue Feb 12, 2025
yegor256 added a commit that referenced this issue Feb 12, 2025
feat(#324): Programs.version()
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 a pull request may close this issue.

3 participants