D2897: fix: new extension for automatically modifying file contents

hooper (Danny Hooper) phabricator at mercurial-scm.org
Thu Mar 29 16:42:31 EDT 2018


hooper added a comment.


  In https://phab.mercurial-scm.org/D2897#47944, @yuja wrote:
  
  > In https://phab.mercurial-scm.org/D2897#47875, @pulkit wrote:
  >
  > > The code except of minor nits looks good to me. I will like others to chime in on whether we should rename the command and extension to `format` because `fix` is too generic.
  >
  >
  > I agree the extension name `fix` is  too generic, but I have no strong opinion.
  >  It could be `format`, `formatter`, `extfmt`, `extformatter`, etc., but I guess
  >  this isn't just for "formatting" in Google? And `hg fix` is easy to type. ;)
  
  
  One possibility to consider is a config that runs a linter tool on the changed lines, but makes no edits. In the proposal I also gave the example of a config to sort the lines in a file. Another thought was spell checking/fixing. Implying that the command is only useful for source code formatting is selling the feature short, but still I wouldn't know what else to call it. We had picked "fix" because our users are familiar with the term.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2897

To: hooper, #hg-reviewers
Cc: durin42, krbullock, martinvonz, yuja, indygreg, pulkit, mercurial-devel


More information about the Mercurial-devel mailing list