Bug 1751795 Comment 4 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Mitchell Hentges [:mhentges] 🦀 from comment #3)
> I'm struggling to reproduce this - editing a `.cpp` file (I chose `browser/components/about/AboutRedirector.cpp` at random) and doing an `hg commit` didn't trigger the failure.

Do you have the linter hooks set up? My `.hg/hgrc` in the repo has:

```
pretxncommit.lint = python:~/path/to/repo/tools/lint/hooks.py:hg
```

in the hooks section, and my userdir `.hgrc` has:

```
clang-format = /Users/gkruitbosch/.mozbuild/version-control-tools/hgext/clang-format
js-format = /Users/gkruitbosch/.mozbuild/version-control-tools/hgext/js-format
```

in the extensions section.

> Do you know what specific Mach command is failing? Is it `./mach clang-format`, or perhaps `./mach lint [with-some-other-args-perhaps]`?

I'm not sure. I'm not executing mach commands myself, I assume this is from https://searchfox.org/mozilla-central/rev/7fb9750a14e99267a77328559c2fd022e360d99b/tools/lint/hooks.py#38 so I guess `python3 /absolute/path/to/mach lint`?

> Let me know and I'll see if I can dig into this further 👍

Does that help? If not, is there some way I can gather more debug info myself?

Here's the complete output of me changing `uriloader/exthandler/nsMIMEInfoImpl.cpp` just now:

```
$ hg amend
Processing 1 file(s)...
mozlog 6.0 requires mozterm, which is not installed.
Unable to install correct version of pylint
Try to install it manually with:
    $ pip install -U --require-hashes -r /Users/gkruitbosch/dev/inbound/tools/lint/python/pylint_requirements.txt
mozlog 6.0 requires mozterm, which is not installed.
Unable to install correct version of codespell
Try to install it manually with:
    $ pip install -U --require-hashes -r /Users/gkruitbosch/dev/inbound/tools/lint/spell/codespell_requirements.txt
mozlog 6.0 requires mozterm, which is not installed.
Unable to install required version of rstcheck
Try to install it manually with:
    $ pip install -U --require-hashes -r /Users/gkruitbosch/dev/inbound/tools/lint/rst/requirements.txt
mozlog 6.0 requires mozterm, which is not installed.
Unable to install correct version of flake8
Try to install it manually with:
    $ pip install -U --require-hashes -r /Users/gkruitbosch/dev/inbound/tools/lint/python/flake8_requirements.txt
error: problem with lint setup, skipping android-api-lint, android-checkstyle, android-format, android-javadoc, android-lint, android-test, codespell, flake8, pylint, rst
✖ 0 problems (0 errors, 0 warnings, 0 fixed)
```
(In reply to Mitchell Hentges [:mhentges] 🦀 from comment #3)
> I'm struggling to reproduce this - editing a `.cpp` file (I chose `browser/components/about/AboutRedirector.cpp` at random) and doing an `hg commit` didn't trigger the failure.

Do you have the linter hooks set up? My `.hg/hgrc` in the repo has:

```
pretxncommit.lint = python:~/path/to/repo/tools/lint/hooks.py:hg
```

in the hooks section, and my userdir `.hgrc` has:

```
clang-format = /Users/gkruitbosch/.mozbuild/version-control-tools/hgext/clang-format
js-format = /Users/gkruitbosch/.mozbuild/version-control-tools/hgext/js-format
```

in the extensions section.

> Do you know what specific Mach command is failing? Is it `./mach clang-format`, or perhaps `./mach lint [with-some-other-args-perhaps]`?

I'm not sure. I'm not executing mach commands myself, I assume this is from https://searchfox.org/mozilla-central/rev/7fb9750a14e99267a77328559c2fd022e360d99b/tools/lint/hooks.py#38 so I guess `python3 /absolute/path/to/mach lint`?

> Let me know and I'll see if I can dig into this further 👍

Does that help? If not, is there some way I can gather more debug info myself?

Here's the complete output of me changing `uriloader/exthandler/nsMIMEInfoImpl.cpp` just now:

```
$ hg amend
Processing 1 file(s)...
mozlog 6.0 requires mozterm, which is not installed.
Unable to install correct version of pylint
Try to install it manually with:
    $ pip install -U --require-hashes -r /path/to/srcdir/tools/lint/python/pylint_requirements.txt
mozlog 6.0 requires mozterm, which is not installed.
Unable to install correct version of codespell
Try to install it manually with:
    $ pip install -U --require-hashes -r /path/to/srcdir/tools/lint/spell/codespell_requirements.txt
mozlog 6.0 requires mozterm, which is not installed.
Unable to install required version of rstcheck
Try to install it manually with:
    $ pip install -U --require-hashes -r /path/to/srcdir/tools/lint/rst/requirements.txt
mozlog 6.0 requires mozterm, which is not installed.
Unable to install correct version of flake8
Try to install it manually with:
    $ pip install -U --require-hashes -r /path/to/srcdir/tools/lint/python/flake8_requirements.txt
error: problem with lint setup, skipping android-api-lint, android-checkstyle, android-format, android-javadoc, android-lint, android-test, codespell, flake8, pylint, rst
✖ 0 problems (0 errors, 0 warnings, 0 fixed)
```

Back to Bug 1751795 Comment 4