espressif / clang-tidy-runner

MIT License
9 stars 5 forks source link

fail ValueError (RDT-262) #18

Closed AshUK closed 2 years ago

AshUK commented 2 years ago

IDF: v4.4.2 macOS: 12.5

We are looking to replace our complex clang-tidy wrapper with idf.py clang-check but our initial findings testing is not running. Happy to help support this effort.

command: idf.py clang-check --run-clang-tidy-py ./scripts/ci/run-clang-tidy.py --exclude-paths managed_components

run command: /Users/ash/dev/iot-module-fw/scripts/ci/run-clang-tidy.py .*  || true
Traceback (most recent call last):
  File "/Users/ash/dev/esp/esp-idf-latest-release/tools/idf.py", line 816, in <module>
    main()
  File "/Users/ash/dev/esp/esp-idf-latest-release/tools/idf.py", line 734, in main
    cli(sys.argv[1:], prog_name=PROG, complete_var='_IDF.PY_COMPLETE')
  File "/Users/ash/.espressif/python_env/idf4.4_py3.9_env/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/Users/ash/.espressif/python_env/idf4.4_py3.9_env/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/Users/ash/.espressif/python_env/idf4.4_py3.9_env/lib/python3.9/site-packages/click/core.py", line 1689, in invoke
    return _process_result(rv)
  File "/Users/ash/.espressif/python_env/idf4.4_py3.9_env/lib/python3.9/site-packages/click/core.py", line 1626, in _process_result
    value = ctx.invoke(self._result_callback, value, **ctx.params)
  File "/Users/ash/.espressif/python_env/idf4.4_py3.9_env/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/Users/ash/dev/esp/esp-idf-latest-release/tools/idf.py", line 636, in execute_tasks
    task(ctx, global_args, task.action_args)
  File "/Users/ash/dev/esp/esp-idf-latest-release/tools/idf.py", line 217, in __call__
    self.callback(self.name, context, global_args, **action_args)
  File "/Users/ash/.espressif/python_env/idf4.4_py3.9_env/lib/python3.9/site-packages/pyclang/idf_extension.py", line 25, in call_runner
    runner()
  File "/Users/ash/.espressif/python_env/idf4.4_py3.9_env/lib/python3.9/site-packages/pyclang/runner.py", line 169, in __call__
    self._run(folder, log_fs, output_dir)
  File "/Users/ash/.espressif/python_env/idf4.4_py3.9_env/lib/python3.9/site-packages/pyclang/runner.py", line 140, in _run
    func(folder, log_fs, output_dir)
  File "/Users/ash/.espressif/python_env/idf4.4_py3.9_env/lib/python3.9/site-packages/pyclang/runner.py", line 183, in _f
    return func(self, *args, **kwargs)
  File "/Users/ash/.espressif/python_env/idf4.4_py3.9_env/lib/python3.9/site-packages/pyclang/runner.py", line 306, in run_clang_tidy
    raise ValueError(first_line)
ValueError
igrr commented 2 years ago

Hi @AshUK, sorry for replying late. When this error happens, could you please check, what is the contents of warnings.txt file in the same directory?

Another question, could you run ls -l ./scripts/ci/run-clang-tidy.py and check if run-clang-tidy.py has executable permissions? If no, then this issue has the same root cause as https://github.com/espressif/clang-tidy-runner/issues/16, which we will fix shortly.

AshUK commented 2 years ago

I can confirm making the file executable fixes the issue, apologies and thank you.