A tool for analysing the source code of Equinox applications.
go install github.com/utilitywarehouse/billsourcery@latest
billsourcery --help
If using the neo4j output from billsourcery, you may wish to install and use neo4j.
Download and install Neo4j
For simple local use, disable authentication by setting dbms.security.auth_enabled=false
in neo4j.conf
This may take some time to import (e.g. 10 or 20 minutes)
$ cd && git clone [email protected]:utilitywarehouse/uw-bill-source-history.git
$ billsourcery --source-root=${PATH_TO_BILL_SOURCE} generate-graph --output-type neo | cypher-shell
alternatively, if you also want usage information, first obtain CSVs of the ModuleS and ModuDet tables from Bill using eqdb-loader, and then use :
$ billsourcery --source-root=${PATH_TO_BILL_SOURCE} generate-graph --output-type neo --modules-csv /path/to/ModuleS.csv --modudet-csv /path/to/ModuDet.csv | cypher-shell
Navigate to http://localhost:7474/
Find missing nodes that are referenced from elsewhere:
`MATCH (n:Missing) return n`
Find nodes containing the name "customer":
`MATCH (n:Node) where n.name CONTAINS 'customer' return n`
Find methods that are not called from anywhere:
`MATCH (m:Method) WHERE NOT (m)<-[:references]-() RETURN m.name order by m.name`
Find method nrg_sweep2
and everything it references, recursively. Exclude fields and work areas for clarity:
`MATCH p=(n:Node)-[r:references*]->(x:Node) where lower(n.name)="nrg_sweep2" and not(x:Field) and not(x:WorkArea) RETURN p`
Find table ginv
and everything that references it, recursively.
`MATCH p=(n:Node)-[r:references*]->(x:Table) where lower(x.name)="ginv" RETURN p`
Find the most referenced tables:
`MATCH (n)-[references]->(t:Table) RETURN t.name, count(n) order by count(n) desc limit 20`