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

improve commented out code check with JavaParser #671

Merged
merged 2 commits into from
Jan 11, 2025

Conversation

Fenmore
Copy link
Contributor

@Fenmore Fenmore commented Jan 10, 2025

The current implementation of checking whether a comment is a code fragment is naive and creates many false positives. This PR introduces the JavaParser tool which is used to surely detect valid code fragments. Since the code must be compilable to be detected, some preformatting is used. Any content that doesn't contain special characters is ignored.

Copy link
Collaborator

@Luro02 Luro02 left a comment

Choose a reason for hiding this comment

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

Looks good to me. I am curious how well this will work.

Thank you for the PR.

@Luro02 Luro02 merged commit 8ed1456 into Feuermagier:main Jan 11, 2025
2 checks passed
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.

2 participants