[PATCH] D77363: Use git-clang-format as Arcanist linter

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 3 03:43:49 PDT 2020


fhahn added a comment.

In D77363#1959149 <https://reviews.llvm.org/D77363#1959149>, @vitalybuka wrote:

> This does not work for me


+1

I am seeing a similar error when trying to upload a patch during an interactive rebase. The lock file does not exist before or after running arc.

  Linting...
  >>> [20] (+7,528) <exec> $ git rev-parse 'HEAD'
  <<< [20] (+7,537) <exec> 8,955 us
  >>> [21] (+7,537) <exec> $ git merge-base '9b56cc9361a471a3ce57da4c98f60e377cc43026' '64e1c0d3bb54e39b13fc902d5fa0bdd78c5bf458'
  <<< [21] (+7,551) <exec> 13,073 us
  >>> [22] (+7,551) <exec> $ git diff --no-ext-diff --no-textconv --submodule=short --raw '9b56cc9361a471a3ce57da4c98f60e377cc43026' HEAD --
  <<< [22] (+7,567) <exec> 15,900 us
  >>> [23] (+7,567) <exec> $ git -c 'diff.suppressBlankEmpty=false' diff --no-ext-diff --no-textconv --submodule=short --no-color --src-prefix=a/ --dst-prefix=b/ -U32767 -M -C '9b56cc9361a471a3ce57da4c98f60e377cc43026' --
  <<< [23] (+8,230) <exec> 662,852 us
  Examining paths for linter 'clang-format'.
  Found 3 matching paths for linter 'clang-format'.
  >>> [24] (+8,303) <lint> Script and Regex <paths = 3>
  >>> [25] (+8,303) <exec> $ utils/arcanist/clang-format.sh 'clang/include/clang/AST/Type.h'
  >>> [26] (+8,304) <exec> $ utils/arcanist/clang-format.sh 'clang/lib/Sema/SemaType.cpp'
  >>> [27] (+8,305) <exec> $ utils/arcanist/clang-format.sh 'clang/test/SemaCXX/vector.cpp'
  <<< [25] (+15,132) <exec> 6,829,495 us
  <<< [27] (+16,807) <exec> 8,502,181 us
  <<< [24] (+16,807) <lint> 8,504,390 us
  
  [2020-04-03 10:15:48] EXCEPTION: (PhutilAggregateException) Some linters failed:
      - CommandException: Command failed with error #2!
        COMMAND
        utils/arcanist/clang-format.sh 'clang/include/clang/AST/Type.h'
  
        STDOUT
        (empty)
  
        STDERR
        fatal: Unable to create 'projects/llvm-project/.git/clang-format-index.lock': File exists.
  
        Another git process seems to be running in this repository, e.g.
        an editor opened by 'git commit'. Please make sure all processes
        are terminated then try again. If it still fails, a git process
        may have crashed in this repository earlier:
        remove the file manually to continue.
        error: `git update-index --add -z --stdin` failed
         at [<arcanist>/src/lint/engine/ArcanistLintEngine.php:274]
  arcanist(head=master, ref.master=cc850163f30c), phutil(head=master, ref.master=39ed96cd818a)
    #0 <#2> ExecFuture::resolvex() called at [<arcanist>/src/lint/linter/ArcanistScriptAndRegexLinter.php:195]
    #1 <#2> ArcanistScriptAndRegexLinter::willLintPaths(array) called at [<arcanist>/src/lint/engine/ArcanistLintEngine.php:585]
    #2 <#2> ArcanistLintEngine::executeLinterOnPaths(ArcanistScriptAndRegexLinter, array) called at [<arcanist>/src/lint/engine/ArcanistLintEngine.php:546]
    #3 <#2> ArcanistLintEngine::executeLintersOnChunk(array, array) called at [<arcanist>/src/lint/engine/ArcanistLintEngine.php:484]
    #4 <#2> ArcanistLintEngine::executeLinters(array) called at [<arcanist>/src/lint/engine/ArcanistLintEngine.php:216]
    #5 ArcanistLintEngine::run() called at [<arcanist>/src/workflow/ArcanistLintWorkflow.php:337]
    #6 ArcanistLintWorkflow::run() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1250]
    #7 ArcanistDiffWorkflow::runLint() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1211]
    #8 ArcanistDiffWorkflow::runLintUnit() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:483]
    #9 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:394]


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77363/new/

https://reviews.llvm.org/D77363





More information about the llvm-commits mailing list