Project

General

Profile

Feature #15785

Provide hints for "obvious" typo's in FHiCL parameter names

Added by Rob Kutschke over 2 years ago. Updated over 2 years ago.

Status:
Accepted
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
Start date:
03/08/2017
Due date:
% Done:

0%

Estimated time:
4.00 h
Scope:
Internal
Experiment:
Mu2e
SSI Package:
Duration:

Description

This request is motivated by git's excellent error messages, which provide suggestions for what you really meant.

This suggestion is to augment some FHiCL error message with some better hints about what the right answer might be. For example, if a requested parameter cannot be found, get the list of parameter names in the current parameter set scope and do a case blind search. If there is a hit, then include a suggestion in the error message that maybe the hit (hopefully not hits!) is the correct spelling of the requested parameter.

One can imagine improving this with time - two letters swapped, one letter missing, favourite misspellings. But just highlighting case errors would be very useful start.

Would it be straightforward to include this both in the context of parameter set validation and in the context of not having parameter set validation?

History

#1 Updated by Christopher Backhouse over 2 years ago

I think if one were to do this you'd want to go the whole hog and just compute edit distance to all the available keys (case insensitive).

I'd say we more often screw this up by incorrect pluralization than we do via case-sensitivity.

#2 Updated by Marc Paterno over 2 years ago

  • Status changed from New to Accepted
  • Estimated time set to 4.00 h

We believe that boost::algorithm::sequence::edit_distance can do most of the work.



Also available in: Atom PDF