resyntax icon indicating copy to clipboard operation
resyntax copied to clipboard

Statistics mode

Open jackfirth opened this issue 5 years ago • 1 comments

It's hard to tell whether a rule will actually be useful. It should be possible to run rules over a large corpus of existing code and gather statistics about how many times they'd be applied, possibly with a sample of application sites. Ideally this would be easy for people other than me to use, in order to help others come up with good rules. Possible corpus candidates include:

  • Racket itself. Already installed, so no need to download anything (assuming the source code is still around for macro expansion purposes).
  • Scribble. It's big, old, it's a single package (scribble-lib), and it hasn't seen much maintenance love over the years.
  • The entire package catalog.

jackfirth avatar Jan 13 '21 19:01 jackfirth

Now that the --refactoring-rule option is implemented to filter the refactoring suite down to a specific rule, this would be even more useful. This should be implemented with a --output-summary-stats-only CLI option for resyntax analyze which should print out the total number of matches per rule, if no --refactoring-rule filter is given. If that filter is given, then it should print out the number of matches of that rule per file.

jackfirth avatar Nov 06 '25 02:11 jackfirth