Skip to content

Count Julia docstrings separately from code - #86

Merged
ericphanson merged 51 commits into
mainfrom
eph/count-julia-loc
Jul 3, 2023
Merged

Count Julia docstrings separately from code#86
ericphanson merged 51 commits into
mainfrom
eph/count-julia-loc

Conversation

@ericphanson

@ericphanson ericphanson commented Jun 11, 2023

Copy link
Copy Markdown
Member

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
Comment thread src/PackageAnalyzer.jl Outdated
@ericphanson
ericphanson requested a review from giordano July 2, 2023 11:20

@giordano giordano left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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

giordano commented Jul 2, 2023

Copy link
Copy Markdown
Member

#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!

@ericphanson
ericphanson merged commit f7e51cc into main Jul 3, 2023
@ericphanson
ericphanson deleted the eph/count-julia-loc branch July 3, 2023 12:49
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