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

Use consistent SLOC across formats #152

Open
4 tasks
roskakori opened this issue May 13, 2024 · 0 comments
Open
4 tasks

Use consistent SLOC across formats #152

roskakori opened this issue May 13, 2024 · 0 comments
Assignees

Comments

@roskakori
Copy link
Owner

Story

As user I want the SLOC to be consistent across formats so that number are comparable.

Discussion

As pointed out in #122, the SLOC presented depends on the output --format. The initial reasoning was that including pure string lines make keeps the count similar to tools like SLOCount and cloc, allowing pygount to act as drop-in replacement. However, with the summary format, no such compatibility was necessary and a allowed my opinion of considering pure string lines to be trivial enough to consider them empty lines similar to no operations and lines containing only white characters. For more details, see the documentation chapter on "How pygount counts code".

With version 2.0, we could introduce a breaking change that would allow a more consistent behavior across format but breaking compatibility with other tools.

Goals

❓ This is a proposal open for comments.

  • When counting SLOC, all formats use the same number.
    • By default, this is the code count (excluding pure string lines).
    • If a user specifies the command line option --count-pure-strings, pure string lines are included in the code count.
  • The --format=json keep giving access to both counts.
@roskakori roskakori added this to the EuroPython 2024 Sprint milestone May 13, 2024
@roskakori roskakori moved this from 🆕 New to 📋 Backlog in Open source projects May 13, 2024
@ben05allen ben05allen self-assigned this Jul 13, 2024
@roskakori roskakori moved this from 📋 Backlog to 🏗 In progress in Open source projects Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🏗 In progress
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants