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

Count Julia docstrings separately from code #86

Merged
merged 51 commits into from
Jul 3, 2023
Merged

Conversation

ericphanson
Copy link
Member

@ericphanson ericphanson commented Jun 11, 2023

Closes #76

This PR uses JuliaSyntax to count Julia code. Split out from #79 since I think this part is better scoped and easier to land by itself.

This should be non-breaking from an API and an serialization perspective, although obviously the counts change.

TODO:

  • Tests for the code-counting functionality

@ericphanson ericphanson marked this pull request as ready for review July 2, 2023 10:27
src/PackageAnalyzer.jl Outdated Show resolved Hide resolved
@ericphanson ericphanson requested a review from giordano July 2, 2023 11:20
Copy link
Member

@giordano giordano left a comment

Choose a reason for hiding this comment

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

I only had a cursory look, also because I'm not much familiar with JuliaSyntax, but this looks awesome!

Should we have some tests to ensure we can still read V1 of the schema?

@ericphanson
Copy link
Member Author

https://github.com/JuliaEcosystem/PackageAnalyzer.jl/pull/86/files#diff-3b9314a6f9f2d7eec1d0ef69fa76cfabafdbe6d0df923768f9ec32f27a249c63R407 should cover that, since it was serialized out w/ V1 of the schema (and the file isn't updated in this PR).

BTW: should this be a breaking or feature release for PackageAnalyzer? It doesn't break serialization but the actual counts do change, since now we count docstrings.

@giordano
Copy link
Member

giordano commented Jul 2, 2023

#86 (files) should cover that, since it was serialized out w/ V1 of the schema (and the file isn't updated in this PR).

Uh, ok!

BTW: should this be a breaking or feature release for PackageAnalyzer? It doesn't break serialization but the actual counts do change, since now we count docstrings.

Even though I don't think this is technically breaking, keeping consistent numbers within a major release is probably a safe choice!

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.

Docstrings count as code
2 participants