opengrok icon indicating copy to clipboard operation
opengrok copied to clipboard

Improve handling of case insensitive languages

Open RaoulHC opened this issue 1 year ago • 2 comments

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.

RaoulHC avatar Mar 16 '23 13:03 RaoulHC

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

vladak avatar Mar 16 '23 14:03 vladak

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.

RaoulHC avatar Mar 16 '23 15:03 RaoulHC