lexifi / dead_code_analyzer Goto Github PK
View Code? Open in Web Editor NEWDead-code analyzer for OCaml
License: MIT License
Dead-code analyzer for OCaml
License: MIT License
I'm trying to use dead_code_analyzer, and it doesn't seem to scan any files.
I ran it using:
docker run -it --mount type=bind,src=$PWD,dst=/app -w /app ocaml/opam:ubuntu-12.04_ocaml-4.04.2 /bin/bash
opam install dead_code_analyzer
dead_code_analyzer.opt --verbose src/*/*.{ml,mli}
with output
Scanning files...
[DONE]
.> UNUSED EXPORTED VALUES:
=========================
Nothing else to report in this section
--------------------------------------------------------------------------------
.> UNUSED METHODS:
=================
Nothing else to report in this section
--------------------------------------------------------------------------------
.> UNUSED CONSTRUCTORS/RECORD FIELDS:
====================================
Nothing else to report in this section
--------------------------------------------------------------------------------
My understanding is that with the verbose flag it should list all the files it scanned in the output, so I conclude it scanned no files.
The analyzer loops on absolute paths (e.g. dead_code_analyzer --references /tmp
) because of the path normalization function.
I'll submit a tentative fix.
Under 4.06, the following error occurs during building:
ocamlc -w +A-4-9-40-42 -I +compiler-libs -bin-annot -keep-locs -g -o dead_code_analyzer.byt ocamlcommon.cma deadCode.mli deadFlag.ml deadCommon.ml deadArg.mli deadType.mli deadObj.mli deadType.ml deadArg.ml deadMod.ml deadObj.ml deadCode.ml
File "deadCommon.ml", line 341, characters 9-19:
Error: Unbound record field Ident.name
Hi, I was wondering if you were considering making a release that supports OCaml 4.05 (or even the upcoming 4.06) soon ?
I've just tried to compile the current master of dead_code_analyzer (commit e9a4f98), against opam switch 4.05.0+trunk
as indicated in the README. Compilation is fine, but make check
fails: no unused item is reported in the examples, and success rate according to check
is 0%.
As a matter of fact, I tried to use the opam package with 4.04.0, which gave me similar results. Only the package installed within the 4.03.0 switch did report unused elements.
Did I miss something, or is dead_code_analyzer
only compatible with 4.03?
The opam
file in the main directory claims release 0.9 runs on ocaml 4.05 and higher, but the opam file in the opam repository claims only under 4.05. I suspect that, in fact, only the code at the head of the repo runs in 4.05 and higher.
Perhaps a new release should be cut and an updated opam file submitted?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.