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

"Ignore Once" annotation line position is affected by previous executions of the quickfix #3373

Closed
daFreeMan opened this issue Sep 14, 2017 · 11 comments
Labels
bug Identifies work items for known bugs feature-inspection-quickfixes has-workaround There is some way of working around this limitation / bug that is confirmed to work
Milestone

Comments

@daFreeMan
Copy link
Contributor

daFreeMan commented Sep 14, 2017

I have some stubs for future development that are currently not being called. The Procedure {x} is not used inspection is properly identifying that they are not called. The Ignore once Quick Fix does not insert an @Ignore {inspection} annotation.

rd ignore once quick fix

That's the same picture before & after clicking...

Ignore the 243 meaningful name inspections, please, I know they're there...

@Vogel612 Vogel612 added bug Identifies work items for known bugs feature-inspection-quickfixes labels Sep 14, 2017
@retailcoder retailcoder changed the title Quick Fix for 'Procedure {x} not used' doesn't work "Ignore Once" doesn't work for "Procedure not used" Sep 14, 2017
@retailcoder
Copy link
Member

Just to confirm: "Removed unused declaration" does work, correct?

@daFreeMan
Copy link
Contributor Author

Yes, "Remove unused declaration" does work.

@Vogel612
Copy link
Member

Vogel612 commented Sep 14, 2017

---So I wrote a unit-test for this and it didn't fail--- There is a unit-test that should cover this...https://github.com/rubberduck-vba/Rubberduck/blob/next/RubberduckTests/QuickFixes/IgnoreOnceQuickFixTests.cs#L820

@retailcoder
Copy link
Member

@Vogel612 the procedure is first-thing in the module, it does make a difference. Needs tests with Option Explicit and an empty line before the procedure, and then others with two procedures, the first one invoked by the 2nd one, the 2nd one never invoked and triggering the inspection - at least one with and one without empty lines between the two procedures.

@daFreeMan
Copy link
Contributor Author

According to chat, there's no repo & questions about the version.

Here's the code in question and proof of the version.
rd ignore once quick fix 2

DBConfiguration.cls.txt

@retailcoder
Copy link
Member

No repro with .2357

@retailcoder
Copy link
Member

Wait a minute... just got it!

@retailcoder retailcoder reopened this Oct 14, 2017
@retailcoder
Copy link
Member

Ok. So the problem seems to be that there's something we're not invalidating on reparse, causing the quickfix to think the annotation should be inserted where it would have been needed before a previous quickfix shifted the module contents down one line. Investigating.

@retailcoder retailcoder added this to the Release 2.1.0 milestone Oct 14, 2017
@retailcoder retailcoder self-assigned this Oct 14, 2017
@retailcoder retailcoder modified the milestones: Release 2.1.0, 2.1.x Cycle Oct 14, 2017
retailcoder added a commit to retailcoder/Rubberduck that referenced this issue Oct 14, 2017
@retailcoder
Copy link
Member

retailcoder commented Oct 14, 2017

There's a work-around though: annotate the procedures bottom-to-top.

@retailcoder retailcoder added the has-workaround There is some way of working around this limitation / bug that is confirmed to work label Oct 14, 2017
@retailcoder retailcoder changed the title "Ignore Once" doesn't work for "Procedure not used" "Ignore Once" annotation line position is affected by previous executions of the quickfix Oct 15, 2017
@retailcoder retailcoder modified the milestones: Release 2.1.0, 2.1.x Cycle Oct 16, 2017
@Vogel612 Vogel612 moved this from ToDo to In Progress in Semi-automatic bug tracker Dec 7, 2017
@retailcoder retailcoder removed their assignment Nov 24, 2018
@retailcoder
Copy link
Member

Reportedly fixed.

Semi-automatic bug tracker automation moved this from In Progress to Done Jan 16, 2019
@bclothier
Copy link
Contributor

Closing this since this should be fixed in the PR #4693 (and related PRs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Identifies work items for known bugs feature-inspection-quickfixes has-workaround There is some way of working around this limitation / bug that is confirmed to work
Projects
Development

No branches or pull requests

4 participants