GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||
GeezerVison is showing github.com — [apex] #3569 - Requested changes for code review feedback by SCWells72 · Pull Request #3581 · pmd/pmd Conversation
Contributor
Addressed the final two code review feedback items requested by @oowekyala from PR #3574 for issue #3569. That PR was already merged, so creating a new PR for these. Describe the PRMade the check for whether a node contains comments more efficient. Instead of having to inspect all commented lines in the file for each comment container, we now pre-calculate an index of which lines were comments, and then we see whether any of the lines in a comment container's range are flagged in that index. Given that we're currently only going to perform this logic for Made Related issues
Ready?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…nstead of having to inspect all commented lines in the file for each comment container, we now pre-calculate an index of which lines were comments, and then we see whether any of the lines in a comment container's range are flagged in that index. Given that we're currently only going to perform this logic for ASTCatchBlockStatement nodes, hopefully this should be very efficient. If/when this logic is expanded to include other node types, we can revisit and determine whether another approach such as a binary search for lines in a given range is a better fit. Made AbstractApexCommentContainerNode package-private.
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
oowekyala
added a commit
to oowekyala/pmd
that referenced
this pull request
1 of 4 tasks
4 tasks done
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
adangel
added a commit
that referenced
this pull request
adangel
added a commit
to adangel/pmd
that referenced
this pull request
[apex] Cleanup after pmd#3581 pmd#3582 * pr-3582: [apex] comments: use index instead of line/column to map to node [apex] comments: consider position index in the same line [apex] EmptyCatchBlock: Improve test case Added a new test case verifying the expected boundary condition behavior for allowing commented blocks. Cleanup after pmd#3581
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersNo reviewsUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsDevelopmentSuccessfully merging this pull request may close these issues. [apex] EmptyCatchBlock rule should provide an option to ignore empty catch blocks in test methodsUh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. | ||||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |