Files
sdk/pkg/analyzer_plugin/lib
Brian Wilkerson 216b9d65d8 Change the range of values for features so that features are never disabled
I believe that this approach will make it much easier for us to make
changes to the ranking order for some suggestions without significantly
changing the ranking order of others. In particular, adding a negative
feature for a subset of suggestions (such as decreasing the rank of
methods named 'noSuchMethod') currently has the effect of decreasing the
rank of everything that isn't a method. This solved that problem by
giving all features a baseline of zero and allowing features to either
increment or decrement the rank from there.

This CL has minimal overall impact on ranking except in the following
areas (values are the inverse mrr):
- keyword void, which regresses from 150.766 to 237.838 (87.071 points)
- local function, which regresses from 24.941 to 173.016 (148.075 points)
- prefix, which improves from 386.455 to 361.611 (24.844 points)
- type parameter, which improves from 269.235 to 249.489 (19.746 points)

The change to 'keyword void' largely shows up in return types of function
declarations, but interestingly enough has little impact on the return
type of method declarations. We might be able to offset this by treating
`void` (and `dynamic`) as types rather than as keywords. I've added that
work item to the list.

The change to local functions doesn't appear to impact any individual
location significantly, and might not be significantly detrimental
because local functions are probably not all that common.

Change-Id: Ifc7002cd6a9d656792ad4ffd76d96df2ab50e4a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181900
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-02-01 16:00:58 +00:00
..