inrupt / mashlib-dev

Development setup for the mashlib project
MIT License
5 stars 7 forks source link

Inventory #8

Open michielbdejong opened 4 years ago

michielbdejong commented 4 years ago

I'm doing a little inventory to get a feel for how much code is in mashlib:

#!/bin/zsh
SOURCES=( "workspaces/mashlib/src" "workspaces/solid-panes/src" "workspaces/pane-registry/paneRegistry.js")
SOURCES+=( "workspaces/chat-pane/src" "workspaces/source-pane/sourcePane.js")
SOURCES+=( "workspaces/contacts-pane/contactsPane.js" "workspaces/folder-pane/folderPane.js" )
SOURCES+=( "workspaces/issue-pane/issuePane.js" "workspaces/meeting-pane/src" )
SOURCES+=( "workspaces/solid-ui/src" )

FILES_JS=`for NAME in ${SOURCES[@]}; do
  find $NAME -type f -name "*.js"
done`

FILES_TS=`for NAME in ${SOURCES[@]}; do
  find $NAME -type f -name "*.ts"
done`

echo JS:
echo `wc -l $FILES_JS`
echo TS:
echo `wc -l $FILES_TS`

Output: 32814 lines of JS, 2806 lines of TS. This includes solid-ui, the panes, and mashlib, but it excludes rdflib.js, solid-auth-client, and node-solid-server. Next I'll try to get some numbers for test coverage and code complexity.

michielbdejong commented 4 years ago

Looks like 191 out of 35620 lines are covered by tests. Most repos only do lint; solid-panes does have a couple of jest tests, but only as a proof of concept. Some room for improvement there, it seems:

michielbdejong commented 4 years ago

Some indication of code complexity:

michielbdejong commented 4 years ago

We could also tighten up the limit for https://eslint.org/docs/rules/complexity And enable CodeMetrics in VSCode.