cppcheck icon indicating copy to clipboard operation
cppcheck copied to clipboard

removed unused `Token::until()` and `tokenrange.h`

Open firewave opened this issue 2 years ago • 4 comments

This essentially reverts a5664c3e4900f46df5ad774bdc2181ebdb4dc56c. Since we still have no users of this within our code base it doesn't make much sense to keep it. So if there were issues in this they would most likely stay unnoticed.

I do get that it might be helpful for people utilizing Cppcheck as a library but we are not treating it as such in other ways. And it can easily be implemented outside of the library so there's no issue with maintaining this out-of-tree.

CC @shaneasd.

firewave avatar Jan 26 '23 20:01 firewave

That change is a prerequisite for #3014. Since #3014 has seen no activity on the code review in a year I think it's probably fair to say it's not going to be merged any time soon and we always revert the revert if/when it is.

The hope was that it would be useful in other contexts but if it still has no users in that time frame then perhaps that hope was too idealistic.

No objections here. Thanks for the CC.

shaneasd avatar Jan 29 '23 10:01 shaneasd

Thanks for the update.

I will leave it as a draft for now. It's not blocking anything - I just came across this while review potential unusedFunction false negatives.

firewave avatar Jan 29 '23 13:01 firewave

A little surprising that it would show up as an unused function since I believe unit tests were added.

shaneasd avatar Jan 30 '23 16:01 shaneasd

A little surprising that it would show up as an unused function since I believe unit tests were added.

That's the point. There's a selfcheck in the CI which checks only the application code for unused functions to identify code which is only used by tests.

firewave avatar Jan 30 '23 19:01 firewave