carlosgalvezp wrote:

They use getLocalOrGlobal probably by mistake, copy-pasting existing code. We 
should document what we believe makes sense, and fix the implementation 
accordingly. The current documentation says these options are check-specific, 
so users should be using them per-check instead of globally. Thus, we wouldn't 
break users if we change the implementation. So I would vote for replacing the 
getLocalOrGlobal with getLocal instead.

If we believe the current implementation is faulty, and document that 
implementation, then we'll have a much harder time to refactor the 
implementation to what we want (since by documenting, we "promise" a behavior). 

I remember now that the true global options are documented here:

https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/docs/clang-tidy/index.rst?plain=1#L288

So if we create more global options (like `IncludeStyle`) we should probably 
put them there.



https://github.com/llvm/llvm-project/pull/119842
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to