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

Remove redundant commented-out code to improve code quality #296

Open
diogomene opened this issue Nov 15, 2024 · 0 comments · May be fixed by #297
Open

Remove redundant commented-out code to improve code quality #296

diogomene opened this issue Nov 15, 2024 · 0 comments · May be fixed by #297

Comments

@diogomene
Copy link

After scanning the source code with SonarQube, commented-out code appears as "code smells" in several project files. On closer inspection, some of these comments actually provide useful insights about the behavior of functions and modules. However, most seem irrelevant, cluttering the codebase and reducing its quality.

To ensure the code remains as maintainable as possible, it is essential to review each commented-out section and remove any obsolete or meaningless fragments. SonarQube is particularly useful here, as it highlights instances of commented-out code (among other code smells), making it easier to identify and address these issues. After this initial review, it’s advisable to export the results as a JSON file—available via the SonarQube API—to document findings for future reference by repository maintainers. Lastly, human verification of each flagged comment is crucial; comments that do not add value for context, learning, or detailed explanation of operations should indeed be considered code smells and removed.

diogomene added a commit to diogomene/planck.js that referenced this issue Nov 15, 2024
@diogomene diogomene linked a pull request Nov 15, 2024 that will close this issue
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.

1 participant