On 2022-05-17 12:50, Eugen Wissner wrote:
Glad to announce that Funkwerk releases cogito [1], a tool that measures
cognitive complexity of D code.

Thanks for sharing this tool.
I tried it on OSX by building with this script instead of your Makefile as I am managing my dlang version with https://dlang.org/install.html:

```bash
#!/bin/bash -xe

# select dmd sources (please run ~/dlang/install.sh dmd-2.098.1 manually)
DMD_SOURCES=~/dlang/dmd-2.098.1/src

# prepare filesystem
rm -f tools/dmd2/src
mkdir -p tools/dmd2
ln -s $DMD_SOURCES tools/dmd2/src

mkdir -p build

# activate compiler (please run ~/dlang/install.sh ldc-1.29.0 manually)
source ~/dlang/ldc-1.29.0/activate


# build dmd-lib
ldmd2 -debug -lib -version=MARS -version=NoMain -J=./include -J=$DMD_SOURCES/dmd/dmd/res -I$DMD_SOURCES/dmd -od=build -of=dmd.a $DMD_SOURCES/dmd/dmd/*.d $DMD_SOURCES/dmd/dmd/*/*.d

# and cognito
dub build --build=release --config=executable
```

and I am wondering what real world "numbers" are. Is e.g. 20 a "good" or "bad" number?

Another question that comes to mind is, if the dmd frontend could be made available as a dub package, which would simplify the build process?


Kind regards,
Christian

Reply via email to