analyze-codebase-paths ( paths -- )


Vocabulary
codebase-analyzer

Inputs
pathsan object


Outputs
None

Definition


: analyze-codebase-paths ( paths -- )
{
[
partition-binary
[ length "%d binary files" sprintf print ]
[ length "%d text files" sprintf print ] bi*
]
[
github-files
[ sort "has .github files" print files. ]
unless-empty
]
[
license-files [
sort
[ length "has %d license files" sprintf print ]
[ files. ] bi
] unless-empty
]
[
readme-files
[ sort "has readme files" print files. ]
unless-empty
]
[
owners-files
[ sort "has owners files" print files. ]
unless-empty
]
[
codenotify-files
[ sort "has codenotify files" print files. ]
unless-empty
]
[
contributing-files
[ sort "has contributing files" print files. ]
unless-empty
]
[
changelog-files
[ sort "has changelog files" print files. ]
unless-empty
]
[
release-files
[ sort "has release files" print files. ]
unless-empty
]
[
authors-files
[ sort "has authors files" print files. ]
unless-empty
]
[
contributors-files
[ sort "has contributors files" print files. ]
unless-empty
]
[
patents-files
[ sort "has patents files" print files. ]
unless-empty
]
[
ideas-files
[ sort "has ideas files" print files. ] unless-empty
]
[
testing-files
[ sort "has testing files" print files. ]
unless-empty
]
[
copying-files
[ sort "has copying files" print files. ]
unless-empty
]
[
copyright-files
[ sort "has copyright files" print files. ]
unless-empty
]
[
citation-files
[ sort "has citation files" print files. ]
unless-empty
]
[
security-files
[ sort "has security files" print files. ]
unless-empty
]
[
notice-files
[ sort "has notice files" print files. ]
unless-empty
]
[
version-files
[ sort "has version files" print files. ]
unless-empty
]
[
{
[ dot-files ]
[ rc-files diff ]
[ ignore-files diff ]
} cleave
[ sort "has dot files" print files. ] unless-empty
]
[
rc-files [
sort
[ length "has %d rc files" sprintf print ]
[ files. ] bi
] unless-empty
]
[
configure-files
[ sort "uses configure files" print files. ]
unless-empty
]
[
automake-files
[ sort "uses automake" print files. ] unless-empty
]
[
make-files
[ sort "uses make" print files. ] unless-empty
]
[
nmake-files
[ sort "uses nmake" print files. ] unless-empty
]
[
cmake-files
[ sort "uses cmake" print files. ] unless-empty
]
[
meson-files
[ sort "uses meson" print files. ] unless-empty
]
[
docker-files
[ sort "uses docker" print files. ] unless-empty
]
[
gradle-files
[ sort "uses gradle" print files. ] unless-empty
]
[
cargo-files
[ sort "uses rust/cargo" print files. ] unless-empty
]
[
julia-project-files
[ sort "uses julia Project.toml" print files. ]
unless-empty
]
[
in-files
[ sort "uses 'in' files" print files. ] unless-empty
]
[
ignore-files [
sort
[ length "has %d ignore files" sprintf print ]
[ files. ] bi
] unless-empty
]
[
[ rust-project-dir? ] filter [
[ "rust projects at " print files. ]
[ [ analyze-rust-project ] each ] bi
] unless-empty
]
[
[ upper-files ] keep meta-files diff [
sort [
length
"has %d UPPER files (minus meta files)"
sprintf print
] [ files. ] bi
] unless-empty
]
[ source-files-usage ]
[
"Top 20 largest files" print
file-sizes sort-values 20 index-or-length tail*
[ normalize-path ] map-keys reverse assoc.
]
[
"Top 10 file extension sizes" print
sum-sizes-by-extension 10 index-or-length tail*
reverse assoc.
]
[
"Top 10 text file line counts" print
sum-line-counts-by-extension 10 index-or-length
tail* reverse assoc.
]
[
"Top 10 file extension counts" print
count-by-file-extension 10 index-or-length tail*
reverse assoc.
]
[
"All file extension sizes" print
sum-sizes-by-extension reverse assoc.
]
[
"All text file line counts" print
sum-line-counts-by-extension reverse assoc.
]
[
"All file extension counts" print
count-by-file-extension reverse assoc.
]
} cleave ;