Skip to content
This repository was archived by the owner on Nov 11, 2025. It is now read-only.

Conversation

@kaxil
Copy link
Member

@kaxil kaxil commented Dec 12, 2020

Install cloc (https://github.com/AlDanial/cloc).

cloc is a Prerequisite as mentioned in https://apache-kibble.readthedocs.io/en/latest/setup.html#installing-the-server

Without it the count in the git scanner fails with following:

[thread#1:plugins/scanners/git-sloc]: Running SLoC count for https://github.com/kaxil/boring-cyborg.git
/bin/sh: 1: cloc: not found
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "kibble-scanner.py", line 126, in run
    scanner.scan(self.bit, obj)
  File "/kibble/kibble/scanners/scanners/git-sloc.py", line 68, in scan
    languages, codecount, comment, blank, years, cost = sloc.count(gpath)
  File "/kibble/kibble/scanners/utils/sloc.py", line 30, in count
    inp = subprocess.check_output(
  File "/usr/local/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/local/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'cloc --quiet --progress-rate=0 --processes=4 /tmp/kaxil/git/2a219855377dc934c4fe168fe21b8fdf2fe3d5733fc86e93ea4a3cff' returned non-zero exit status 127.
'All done scanning for now, found 1 organisations and 1 sources to process.'

cc @turbaszek @michalslowikowski00 @Humbedooh

Install cloc (https://github.com/AlDanial/cloc).

`cloc` is a Prerequisite as mentioned in https://apache-kibble.readthedocs.io/en/latest/setup.html#installing-the-server

Without it the count in the git scanner fails with following:

```
[thread#1:plugins/scanners/git-sloc]: Running SLoC count for https://github.com/kaxil/boring-cyborg.git
/bin/sh: 1: cloc: not found
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "kibble-scanner.py", line 126, in run
    scanner.scan(self.bit, obj)
  File "/kibble/kibble/scanners/scanners/git-sloc.py", line 68, in scan
    languages, codecount, comment, blank, years, cost = sloc.count(gpath)
  File "/kibble/kibble/scanners/utils/sloc.py", line 30, in count
    inp = subprocess.check_output(
  File "/usr/local/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/local/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'cloc --quiet --progress-rate=0 --processes=4 /tmp/kaxil/git/2a219855377dc934c4fe168fe21b8fdf2fe3d5733fc86e93ea4a3cff' returned non-zero exit status 127.
'All done scanning for now, found 1 organisations and 1 sources to process.'
```
@kaxil
Copy link
Member Author

kaxil commented Dec 13, 2020

Fixed conflict @turbaszek

@turbaszek turbaszek merged commit 5bf37a8 into apache:main Dec 13, 2020
@kaxil kaxil deleted the fix-git-scanner branch December 13, 2020 11:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants