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 handling of case insensitive languages #4223

Open
RaoulHC opened this issue Mar 16, 2023 · 2 comments
Open

Improve handling of case insensitive languages #4223

RaoulHC opened this issue Mar 16, 2023 · 2 comments

Comments

@RaoulHC
Copy link

RaoulHC commented Mar 16, 2023

Fortran is a case insensitive language, and that can make searching for definitions and references in opengrok less useful. Ideally codebases would be consistent, but unfortunately that's not necessarily the case.
For example, a function may be defined as MyFunction but called as Myfunction and if you click on it in opengrok to search for the definition, you'll get no results. Similar case for symbols, where searching will only encounter uses with the exact same case, missing lots of usages.

I'm trying to improve ctags behaviour such that it stores definitions as lowercase (probably gated behind a flag to avoid breaking other consumers, see universal-ctags/ctags#3668), but the Fortran symbol tokenizer here probably wants to store symbols as lowercase. This is both so you can click on a symbol and actually find the definition, and also so you can search symbols and get results for all usages. We probably also want make the definition and reference search queries lowercase for Fortran too, though I'm not sure how feasible that is. If I'm given some pointers in the right direction I can have a go at implementing it myself.

@vladak
Copy link
Member

vladak commented Mar 16, 2023

There is related old PR #1957 that I believe has some relevant bits to this.

@RaoulHC
Copy link
Author

RaoulHC commented Mar 16, 2023

Aha, must've gone for the wrong words when searching issues/PRs for whether something already existed, that will have actually been for the same codebase. I'll have a look at that and see if it can be updated.

@vladak vladak added the indexer label Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants