From d632c05d44fb664b6fcab2ccb45d51a0034c89dc Mon Sep 17 00:00:00 2001 From: Kakadu Date: Thu, 10 Oct 2024 20:15:34 +0000 Subject: [PATCH] deploy: f66d3025a43f445845c2800c473c13c7a5c094d6 --- api/odoc.css | 2 +- api/reviewer/Diff_parser/index.html | 2 +- api/reviewer/Line_parser/index.html | 2 +- api/reviewer/Types/index.html | 2 +- api/reviewer/_doc-dir/README.md | 13 +++++++++---- api/reviewer/index.html | 2 +- api/zanuda/My_printtyped/index.html | 2 +- api/zanuda/My_untype/index.html | 2 +- api/zanuda/Tast_pattern/Packed/index.html | 2 +- api/zanuda/Tast_pattern/index.html | 2 +- api/zanuda/Zanuda_core/Collected_decls/index.html | 2 +- api/zanuda/Zanuda_core/Collected_lints/index.html | 2 +- api/zanuda/Zanuda_core/Config/index.html | 2 +- .../Zanuda_core/Dune_project/Library/index.html | 2 +- api/zanuda/Zanuda_core/Dune_project/index.html | 2 +- api/zanuda/Zanuda_core/LINT/index.html | 2 +- .../Zanuda_core/LINT/module-type-GENERAL/index.html | 2 +- .../LINT/module-type-REPORTER/index.html | 2 +- .../Zanuda_core/LINT/module-type-TYPED/index.html | 2 +- .../Zanuda_core/LINT/module-type-UNTYPED/index.html | 2 +- .../LINT/module-type-UNUSED_DECLS/index.html | 2 +- api/zanuda/Zanuda_core/Lint_filesystem/index.html | 2 +- api/zanuda/Zanuda_core/Load_dune/index.html | 2 +- api/zanuda/Zanuda_core/Unused_ML_logger/index.html | 2 +- api/zanuda/Zanuda_core/Utils/ErrorFormat/index.html | 4 ++-- api/zanuda/Zanuda_core/Utils/RDJsonl/index.html | 2 +- api/zanuda/Zanuda_core/Utils/Report/index.html | 6 +++--- api/zanuda/Zanuda_core/Utils/index.html | 2 +- api/zanuda/Zanuda_core/index.html | 2 +- api/zanuda/Zanuda_core__Collected_decls/index.html | 2 +- api/zanuda/Zanuda_core__Collected_lints/index.html | 2 +- api/zanuda/Zanuda_core__Config/index.html | 2 +- api/zanuda/Zanuda_core__Dune_project/index.html | 2 +- api/zanuda/Zanuda_core__LINT/index.html | 2 +- api/zanuda/Zanuda_core__Lint_filesystem/index.html | 2 +- api/zanuda/Zanuda_core__Load_dune/index.html | 2 +- api/zanuda/Zanuda_core__Unused_ML_logger/index.html | 2 +- api/zanuda/Zanuda_core__Utils/index.html | 2 +- api/zanuda/_doc-dir/README.md | 13 +++++++++---- api/zanuda/index.html | 2 +- 40 files changed, 59 insertions(+), 49 deletions(-) diff --git a/api/odoc.css b/api/odoc.css index 71148de..15240b5 100644 --- a/api/odoc.css +++ b/api/odoc.css @@ -1,7 +1,7 @@ @charset "UTF-8"; /* Copyright (c) 2016 The odoc contributors. All rights reserved. Distributed under the ISC license, see terms at the end of the file. - odoc 2.4.2 */ + odoc 2.4.3 */ /* Fonts */ /* noticia-text-regular - latin */ diff --git a/api/reviewer/Diff_parser/index.html b/api/reviewer/Diff_parser/index.html index fb95136..353e8dc 100644 --- a/api/reviewer/Diff_parser/index.html +++ b/api/reviewer/Diff_parser/index.html @@ -1,2 +1,2 @@ -Diff_parser (reviewer.Diff_parser)

Module Diff_parser

val parse_whole_file : Types.file_info list Angstrom.t

Parser of the diff file. The grammar is similar too

diff ::= ( head chunk* )*

See also file_head and a_chunk.

val parse_string : string -> (Types.file_info list, string) Stdlib.result

Main entry point. Uses parse_whole_file under the hood

val file_head : (string * string) option Angstrom.t

Parse header of the diff file

val a_chunk : Types.chunk Angstrom.t

Parses hunk for the file

val recover_lines : string -> (int * (int * int)) list
val lookup : Types.file_info list -> file:string -> line:int -> int option

The call lookup db ~file ~line searches in the list of file differences by a file name file and a file line line the corresponding line of in diff file (counting from the beginning of the information about file).

Github API requires this information to submit a review

val set_logging : bool -> unit

Enable or disable trace logging

+Diff_parser (reviewer.Diff_parser)

Module Diff_parser

val parse_whole_file : Types.file_info list Angstrom.t

Parser of the diff file. The grammar is similar too

diff ::= ( head chunk* )*

See also file_head and a_chunk.

val parse_string : string -> (Types.file_info list, string) Stdlib.result

Main entry point. Uses parse_whole_file under the hood

val file_head : (string * string) option Angstrom.t

Parse header of the diff file

val a_chunk : Types.chunk Angstrom.t

Parses hunk for the file

val recover_lines : string -> (int * (int * int)) list
val lookup : Types.file_info list -> file:string -> line:int -> int option

The call lookup db ~file ~line searches in the list of file differences by a file name file and a file line line the corresponding line of in diff file (counting from the beginning of the information about file).

Github API requires this information to submit a review

val set_logging : bool -> unit

Enable or disable trace logging

diff --git a/api/reviewer/Line_parser/index.html b/api/reviewer/Line_parser/index.html index bee8be6..eb754fb 100644 --- a/api/reviewer/Line_parser/index.html +++ b/api/reviewer/Line_parser/index.html @@ -1,2 +1,2 @@ -Line_parser (reviewer.Line_parser)

Module Line_parser

val run : ?info:string -> 'a Angstrom.t -> 'a Angstrom.t

run ?info p trims line break in the input string and runs parser p.

val diff_cmd : unit Angstrom.t
val file_mode : unit Angstrom.t
val similarity : unit Angstrom.t
val rename : unit Angstrom.t
val index : unit Angstrom.t
val binary_files_differ : unit Angstrom.t
val old_mode : unit Angstrom.t
val new_mode : unit Angstrom.t
val remove_file : string Angstrom.t
val add_file : string Angstrom.t
val pos_num : int Angstrom.t
val chunk_head : Types.chunk_info Angstrom.t
val chunk_item : (Types.kind * string) Angstrom.t
val no_new_line_eof : unit Angstrom.t
val set_logging : bool -> unit
+Line_parser (reviewer.Line_parser)

Module Line_parser

val run : ?info:string -> 'a Angstrom.t -> 'a Angstrom.t

run ?info p trims line break in the input string and runs parser p.

val diff_cmd : unit Angstrom.t
val file_mode : unit Angstrom.t
val similarity : unit Angstrom.t
val rename : unit Angstrom.t
val index : unit Angstrom.t
val binary_files_differ : unit Angstrom.t
val old_mode : unit Angstrom.t
val new_mode : unit Angstrom.t
val remove_file : string Angstrom.t
val add_file : string Angstrom.t
val pos_num : int Angstrom.t
val chunk_head : Types.chunk_info Angstrom.t
val chunk_item : (Types.kind * string) Angstrom.t
val no_new_line_eof : unit Angstrom.t
val set_logging : bool -> unit
diff --git a/api/reviewer/Types/index.html b/api/reviewer/Types/index.html index 88d1f30..17b795d 100644 --- a/api/reviewer/Types/index.html +++ b/api/reviewer/Types/index.html @@ -1,2 +1,2 @@ -Types (reviewer.Types)

Module Types

type chunk_info = {
  1. old : int;
  2. old_range : int;
  3. fresh : int;
  4. fresh_range : int;
}
type pos = int
type kind =
  1. | Add
  2. | Del
  3. | Leave
type chunk = chunk_info * (kind * string * pos) list
type file_info = {
  1. old_file : string;
  2. new_file : string;
  3. chunks : chunk list;
}
+Types (reviewer.Types)

Module Types

type chunk_info = {
  1. old : int;
  2. old_range : int;
  3. fresh : int;
  4. fresh_range : int;
}
type pos = int
type kind =
  1. | Add
  2. | Del
  3. | Leave
type chunk = chunk_info * (kind * string * pos) list
type file_info = {
  1. old_file : string;
  2. new_file : string;
  3. chunks : chunk list;
}
diff --git a/api/reviewer/_doc-dir/README.md b/api/reviewer/_doc-dir/README.md index 367a638..4e9fe11 100644 --- a/api/reviewer/_doc-dir/README.md +++ b/api/reviewer/_doc-dir/README.md @@ -8,18 +8,21 @@ ## A linter for OCaml+dune projects -A *linter* is a tool that discovers bugs and obscurities in the code. The name was invented in 1978 paper of S. C. Johnson: [Lint, a C Program Checker](http://squoze.net/UNIX/v7/files/doc/15_lint.pdf). +A *linter* is a tool that discovers bugs and obscurities in the code. +The name was invented in 1978 paper of S. C. Johnson: [Lint, a C Program Checker](http://squoze.net/UNIX/v7/files/doc/15_lint.pdf). -At the moment most of implemented lints are inspired by my teaching experience. -But I'm aware that there are other linters like [Camelot](https://github.com/upenn-cis1xx/camelot) for OCaml and [Clippy](https://github.com/rust-lang/rust-clippy) Rust. [This is a list of currently supported analyses.](https://kakadu.github.io/zanuda/lints/index.html) -From techinical point of view, most of the lints study Typedtree, so the input for linter should be a **fully compiled dune project**. There is a support of linters that study untyped tree, but I don't expect them to be widely used. These two abstract trees don't allow to find all possible code quirks. Currently, we delegate job of detecting something like `f(1)(2)(3)` to [ocamlformat](https://github.com/ocaml-ppx/ocamlformat). +From techinical point of view, most of the lints study Typedtree, so the **input** for linter should be a **fully compiled dune project**. +There is a support of linters that study untyped tree, but I don't expect them to be widely used. +These two abstract trees don't allow to find all possible code quirks. +Currently, we delegate job of detecting something like `f(1)(2)(3)` to [ocamlformat](https://github.com/ocaml-ppx/ocamlformat). This linter is inspired by: * [How possible is a clippy-like linter for OCaml?](https://discuss.ocaml.org/t/how-possible-is-a-clippy-like-linter-for-ocaml) * My experience in teaching OCaml at my local university. +But I'm aware that there are other linters like [Camelot](https://github.com/upenn-cis1xx/camelot) for OCaml and [Clippy](https://github.com/rust-lang/rust-clippy) Rust. ##### Usage @@ -59,6 +62,8 @@ Running all tests: ##### See also +* [Rescript Reanalyze](https://github.com/rescript-association/reanalyze) +* [Sem grep](https://github.com/semgrep/semgrep) * [Ocp-lint paper](https://hal.inria.fr/hal-01352013/document) * Lexifi's dead [dead_code_analyzer](https://github.com/LexiFi/dead_code_analyzer) * [Camelot](https://github.com/upenn-cis1xx/camelot) diff --git a/api/reviewer/index.html b/api/reviewer/index.html index 309683f..45113c3 100644 --- a/api/reviewer/index.html +++ b/api/reviewer/index.html @@ -1,2 +1,2 @@ -index (reviewer.index)

Package reviewer ~dev

Package info

authors
  • Kakadu
changes-files
depends
homepage
issues
license
  • LGPL-3.0-only
license-files
maintainers
  • kakadu@pm.me
readme-files
repo
  • git+https://github.com/Kakadu/zanuda.git
version
  • ~dev
+index (reviewer.index)

Package reviewer ~dev

Package info

authors
  • Kakadu
changes-files
depends
homepage
issues
license
  • LGPL-3.0-only
license-files
maintainers
  • kakadu@pm.me
readme-files
repo
  • git+https://github.com/Kakadu/zanuda.git
version
  • ~dev
diff --git a/api/zanuda/My_printtyped/index.html b/api/zanuda/My_printtyped/index.html index c38a4bc..394e75f 100644 --- a/api/zanuda/My_printtyped/index.html +++ b/api/zanuda/My_printtyped/index.html @@ -1,5 +1,5 @@ -My_printtyped (zanuda.My_printtyped)

Module My_printtyped

These extra functions are an extension of Printtyped module from compiler libs. Maybe in new versions of compiler they will be available out of box.

include module type of struct include Printtyped end
val interface : Stdlib.Format.formatter -> Typedtree.signature -> unit
val implementation : Stdlib.Format.formatter -> Typedtree.structure -> unit
val implementation_with_coercion : +My_printtyped (zanuda.My_printtyped)

Module My_printtyped

These extra functions are an extension of Printtyped module from compiler libs. Maybe in new versions of compiler they will be available out of box.

include module type of struct include Printtyped end
val interface : Stdlib.Format.formatter -> Typedtree.signature -> unit
val implementation : Stdlib.Format.formatter -> Typedtree.structure -> unit
val implementation_with_coercion : Stdlib.Format.formatter -> Typedtree.implementation -> unit

New functions

val expr : Stdlib.Format.formatter -> Typedtree.expression -> unit
val me : Stdlib.Format.formatter -> Typedtree.module_expr -> unit
val attrs : Stdlib.Format.formatter -> Ast_helper.attrs -> unit
diff --git a/api/zanuda/My_untype/index.html b/api/zanuda/My_untype/index.html index ce2ee2b..7e26a59 100644 --- a/api/zanuda/My_untype/index.html +++ b/api/zanuda/My_untype/index.html @@ -1,5 +1,5 @@ -My_untype (zanuda.My_untype)

Module My_untype

These extra functions are an extension of Untypeast module from compiler libs. Maybe in new versions of compiler they will be available out of box.

include module type of struct include Untypeast end
val lident_of_path : Path.t -> Longident.t
type mapper = Untypeast.mapper = {
  1. attribute : mapper -> Typedtree.attribute -> Parsetree.attribute;
  2. attributes : mapper -> Typedtree.attribute list -> Parsetree.attribute list;
  3. binding_op : mapper -> +My_untype (zanuda.My_untype)

    Module My_untype

    These extra functions are an extension of Untypeast module from compiler libs. Maybe in new versions of compiler they will be available out of box.

    include module type of struct include Untypeast end
    val lident_of_path : Path.t -> Longident.t
    type mapper = Untypeast.mapper = {
    1. attribute : mapper -> Typedtree.attribute -> Parsetree.attribute;
    2. attributes : mapper -> Typedtree.attribute list -> Parsetree.attribute list;
    3. binding_op : mapper -> Typedtree.binding_op -> Typedtree.pattern -> Parsetree.binding_op;
    4. case : 'k. mapper -> 'k Typedtree.case -> Parsetree.case;
    5. class_declaration : mapper -> diff --git a/api/zanuda/Tast_pattern/Packed/index.html b/api/zanuda/Tast_pattern/Packed/index.html index b82ed77..84042dc 100644 --- a/api/zanuda/Tast_pattern/Packed/index.html +++ b/api/zanuda/Tast_pattern/Packed/index.html @@ -1,2 +1,2 @@ -Packed (zanuda.Tast_pattern.Packed)

      Module Tast_pattern.Packed

      type ('a, 'b) t
      val create : ('a, 'b, 'c) t -> 'b -> ('a, 'c) t
      val parse : ('a, 'b) t -> Location.t -> 'a -> 'b
      +Packed (zanuda.Tast_pattern.Packed)

      Module Tast_pattern.Packed

      type ('a, 'b) t
      val create : ('a, 'b, 'c) t -> 'b -> ('a, 'c) t
      val parse : ('a, 'b) t -> Location.t -> 'a -> 'b
      diff --git a/api/zanuda/Tast_pattern/index.html b/api/zanuda/Tast_pattern/index.html index 9737cc1..e4a4184 100644 --- a/api/zanuda/Tast_pattern/index.html +++ b/api/zanuda/Tast_pattern/index.html @@ -1,5 +1,5 @@ -Tast_pattern (zanuda.Tast_pattern)

      Module Tast_pattern

      Matching combinators for Typedtree.

      Inspired by Ppxlib.Ast_pattern module.

      Generic combinators

      type ('a, 'b, 'c) t
      val parse : +Tast_pattern (zanuda.Tast_pattern)

      Module Tast_pattern

      Matching combinators for Typedtree.

      Inspired by Ppxlib.Ast_pattern module.

      Generic combinators

      type ('a, 'b, 'c) t
      val parse : ('a, 'b, 'c) t -> Location.t -> ?on_error:(string -> 'c) -> diff --git a/api/zanuda/Zanuda_core/Collected_decls/index.html b/api/zanuda/Zanuda_core/Collected_decls/index.html index 50ce055..bed9c4d 100644 --- a/api/zanuda/Zanuda_core/Collected_decls/index.html +++ b/api/zanuda/Zanuda_core/Collected_decls/index.html @@ -1,5 +1,5 @@ -Collected_decls (zanuda.Zanuda_core.Collected_decls)

      Module Zanuda_core.Collected_decls

      Global storage for defined names. Is used to detect public but not used library fields.

      Mutable. Not thread safe. See also Unused_ML_logger

      val add_just_decl : string -> unit

      Report definition of a value. Usually is called from signature analyzer.

      val add_used_decl : string -> unit

      Report usage of a value. Usually is called from structure analyzer.

      val print_all_decls : unit -> unit
      val print_used_decls : unit -> unit
      val collect_unused : unit -> unit
      val collect_from_mli_tree : +Collected_decls (zanuda.Zanuda_core.Collected_decls)

      Module Zanuda_core.Collected_decls

      Global storage for defined names. Is used to detect public but not used library fields.

      Mutable. Not thread safe. See also Unused_ML_logger

      val add_just_decl : string -> unit

      Report definition of a value. Usually is called from signature analyzer.

      val add_used_decl : string -> unit

      Report usage of a value. Usually is called from structure analyzer.

      val print_all_decls : unit -> unit
      val print_used_decls : unit -> unit
      val collect_unused : unit -> unit
      val collect_from_mli_tree : Load_dune.w -> string -> Typedtree.signature -> diff --git a/api/zanuda/Zanuda_core/Collected_lints/index.html b/api/zanuda/Zanuda_core/Collected_lints/index.html index 79d30c8..3fc9e52 100644 --- a/api/zanuda/Zanuda_core/Collected_lints/index.html +++ b/api/zanuda/Zanuda_core/Collected_lints/index.html @@ -1,2 +1,2 @@ -Collected_lints (zanuda.Zanuda_core.Collected_lints)

      Module Zanuda_core.Collected_lints

      Global storage for found defects.

      Mutable. Not thread safe.

      val clear : unit -> unit
      val add : loc:Warnings.loc -> (module LINT.REPORTER) -> unit
      val report : unit -> unit

      Report found lints

      +Collected_lints (zanuda.Zanuda_core.Collected_lints)

      Module Zanuda_core.Collected_lints

      Global storage for found defects.

      Mutable. Not thread safe.

      Collecting found lints

      val clear : unit -> unit
      val add : loc:Warnings.loc -> (module LINT.REPORTER) -> unit
      val report : unit -> unit

      Report found lints

      Collecting type declarations

      We use information about type declarations to skip reporting lints in the code generated from a type declaration via `deriving`.

      val add_tdecl : Warnings.loc -> unit
      val has_tdecl_at : Warnings.loc -> bool
      val clear_tdecls : unit -> unit
      diff --git a/api/zanuda/Zanuda_core/Config/index.html b/api/zanuda/Zanuda_core/Config/index.html index 9310143..a3b5c8c 100644 --- a/api/zanuda/Zanuda_core/Config/index.html +++ b/api/zanuda/Zanuda_core/Config/index.html @@ -1,2 +1,2 @@ -Config (zanuda.Zanuda_core.Config)

      Module Zanuda_core.Config

      type mode =
      1. | Unspecified
      2. | Dump_json of Base.string
      3. | Dump_text
      4. | File of Base.string
      5. | Dir of Base.string
      6. | Fix of Base.string
      7. | UnusedDecls of Base.string
      type t = {
      1. mutable outfile : Base.string Base.option;
      2. mutable outgolint : Base.string Base.option;
      3. mutable out_rdjsonl : Base.string Base.option;
      4. mutable mode : mode;
      5. mutable prefix_to_cut : Base.string Base.option;
      6. mutable prefix_to_add : Base.string Base.option;
      7. mutable extra_includes : Base.string Base.list;
      8. mutable verbose : Base.bool;
      9. mutable gen_replacements : Base.bool;
      10. enabled_lints : Base.string Base.Hash_set.t;
      11. all_lints : Base.string Base.Hash_set.t;
      12. mutable skip_level_allow : Base.bool;
      13. mutable check_filesystem : Base.bool;
      }
      val opts : t

      Modes

      val mode : unit -> mode
      val set_mode : mode -> unit
      val set_dump_file : Base.string -> unit
      val set_dump_text : unit -> unit
      val set_in_file : Base.string -> unit
      val set_in_dir : Base.string -> unit
      val set_in_unused_decls : Base.string -> unit
      val set_fix : Base.string -> unit

      Other switches

      val add_include : Base.string -> unit
      val set_out_file : Base.string -> unit
      val set_out_golint : Base.string -> unit
      val set_out_rdjsonl : Base.string -> unit
      val set_prefix_to_cut : Base.string -> unit
      val set_prefix_to_add : Base.string -> unit
      val includes : unit -> Base.string Base.list
      val prefix_to_cut : unit -> Base.string Base.option
      val prefix_to_add : unit -> Base.string Base.option
      val is_check_filesystem : unit -> Base.bool
      val enabled_lints : unit -> Base.string Base.Hash_set.t
      val all_lints : unit -> Base.string Base.Hash_set.t
      val outfile : unit -> Base.string Base.option
      val out_golint : unit -> Base.string Base.option
      val out_rdjsonl : unit -> Base.string Base.option
      val unset_check_filesystem : unit -> unit
      val verbose : unit -> Base.bool
      val gen_replacements : unit -> Base.bool
      val set_verbose : unit -> unit
      val set_skip_level_allow : Base.bool -> unit
      val recover_filepath : Base.String.t -> Base.String.t
      val is_enabled : unit -> (module LINT.GENERAL) -> bool
      val parse_args : unit -> unit
      +Config (zanuda.Zanuda_core.Config)

      Module Zanuda_core.Config

      type mode =
      1. | Unspecified
      2. | Dump_json of Base.string
      3. | Dump_text
      4. | File of Base.string
      5. | Dir of Base.string
      6. | Fix of Base.string
      7. | UnusedDecls of Base.string
      type t = {
      1. mutable outfile : Base.string Base.option;
      2. mutable outgolint : Base.string Base.option;
      3. mutable out_rdjsonl : Base.string Base.option;
      4. mutable mode : mode;
      5. mutable prefix_to_cut : Base.string Base.option;
      6. mutable prefix_to_add : Base.string Base.option;
      7. mutable extra_includes : Base.string Base.list;
      8. mutable verbose : Base.bool;
      9. mutable gen_replacements : Base.bool;
      10. enabled_lints : Base.string Base.Hash_set.t;
      11. all_lints : Base.string Base.Hash_set.t;
      12. mutable skip_level_allow : Base.bool;
      13. mutable check_filesystem : Base.bool;
      }
      val opts : t

      Modes

      val mode : unit -> mode
      val set_mode : mode -> unit
      val set_dump_file : Base.string -> unit
      val set_dump_text : unit -> unit
      val set_in_file : Base.string -> unit
      val set_in_dir : Base.string -> unit
      val set_in_unused_decls : Base.string -> unit
      val set_fix : Base.string -> unit

      Other switches

      val add_include : Base.string -> unit
      val set_out_file : Base.string -> unit
      val set_out_golint : Base.string -> unit
      val set_out_rdjsonl : Base.string -> unit
      val set_prefix_to_cut : Base.string -> unit
      val set_prefix_to_add : Base.string -> unit
      val includes : unit -> Base.string Base.list
      val prefix_to_cut : unit -> Base.string Base.option
      val prefix_to_add : unit -> Base.string Base.option
      val is_check_filesystem : unit -> Base.bool
      val enabled_lints : unit -> Base.string Base.Hash_set.t
      val all_lints : unit -> Base.string Base.Hash_set.t
      val outfile : unit -> Base.string Base.option
      val out_golint : unit -> Base.string Base.option
      val out_rdjsonl : unit -> Base.string Base.option
      val unset_check_filesystem : unit -> unit
      val verbose : unit -> Base.bool
      val gen_replacements : unit -> Base.bool
      val set_verbose : unit -> unit
      val set_skip_level_allow : Base.bool -> unit
      val recover_filepath : Base.String.t -> Base.String.t
      val is_enabled : unit -> (module LINT.GENERAL) -> bool
      val parse_args : unit -> unit
      diff --git a/api/zanuda/Zanuda_core/Dune_project/Library/index.html b/api/zanuda/Zanuda_core/Dune_project/Library/index.html index 0fb1cd9..bc659b8 100644 --- a/api/zanuda/Zanuda_core/Dune_project/Library/index.html +++ b/api/zanuda/Zanuda_core/Dune_project/Library/index.html @@ -1,2 +1,2 @@ -Library (zanuda.Zanuda_core.Dune_project.Library)

      Module Dune_project.Library

      type t = {
      1. name : string;
      2. uid : string;
      3. local : bool;
      4. requires : string list;
      5. source_dir : string;
      6. modules : module_ list;
      7. include_dirs : string list;
      }
      val t_of_sexp : Sexplib0.Sexp.t -> t
      +Library (zanuda.Zanuda_core.Dune_project.Library)

      Module Dune_project.Library

      type t = {
      1. name : string;
      2. uid : string;
      3. local : bool;
      4. requires : string list;
      5. source_dir : string;
      6. modules : module_ list;
      7. include_dirs : string list;
      }
      val t_of_sexp : Sexplib0.Sexp.t -> t
      diff --git a/api/zanuda/Zanuda_core/Dune_project/index.html b/api/zanuda/Zanuda_core/Dune_project/index.html index b75d558..2531bc3 100644 --- a/api/zanuda/Zanuda_core/Dune_project/index.html +++ b/api/zanuda/Zanuda_core/Dune_project/index.html @@ -1,2 +1,2 @@ -Dune_project (zanuda.Zanuda_core.Dune_project)

      Module Zanuda_core.Dune_project

      Specialized data type to deserialize the output of 'dune describe'

      type module_ = {
      1. name : string;
      2. impl : string option;
      3. intf : string option;
      4. cmt : string option;
      5. cmti : string option;
      }
      val sexp_of_module_ : module_ -> Sexplib0.Sexp.t
      val module__of_sexp : Sexplib0.Sexp.t -> module_
      val module_ : ?cmt:string -> ?cmti:string -> string -> module_
      type executables = {
      1. names : string list;
      2. modules : module_ list;
      3. requires : string list;
      4. include_dirs : string list;
      }
      val executables_of_sexp : Sexplib0.Sexp.t -> executables
      module Library : sig ... end
      type t =
      1. | Executables of executables
      2. | Library of Library.t
      3. | Root of string
      4. | Build_context of string
      val t_of_sexp : Sexplib0.Sexp.t -> t
      +Dune_project (zanuda.Zanuda_core.Dune_project)

      Module Zanuda_core.Dune_project

      Specialized data type to deserialize the output of 'dune describe'

      type module_ = {
      1. name : string;
      2. impl : string option;
      3. intf : string option;
      4. cmt : string option;
      5. cmti : string option;
      }
      val sexp_of_module_ : module_ -> Sexplib0.Sexp.t
      val module__of_sexp : Sexplib0.Sexp.t -> module_
      val module_ : ?cmt:string -> ?cmti:string -> string -> module_
      type executables = {
      1. names : string list;
      2. modules : module_ list;
      3. requires : string list;
      4. include_dirs : string list;
      }
      val executables_of_sexp : Sexplib0.Sexp.t -> executables
      module Library : sig ... end
      type t =
      1. | Executables of executables
      2. | Library of Library.t
      3. | Root of string
      4. | Build_context of string
      val t_of_sexp : Sexplib0.Sexp.t -> t
      diff --git a/api/zanuda/Zanuda_core/LINT/index.html b/api/zanuda/Zanuda_core/LINT/index.html index 31d89b9..6f3da91 100644 --- a/api/zanuda/Zanuda_core/LINT/index.html +++ b/api/zanuda/Zanuda_core/LINT/index.html @@ -1,2 +1,2 @@ -LINT (zanuda.Zanuda_core.LINT)

      Module Zanuda_core.LINT

      Module types for program tree analyzers

      type impl =
      1. | Untyped
      2. | Typed

      A type of lint's implementation. Typed and untyped lints inspect OCaml's Parsetree/Typedtree respectively. In Clippy it corresponds to early and late lint passes.

      type group =
      1. | Style
        (*

        Code that should be written in a more idiomatic way

        *)
      2. | Correctness
        (*

        Code that is outright wrong or useless

        *)
      3. | Perf
        (*

        Code that can be written to run faster

        *)
      4. | Restriction
      5. | Deprecated
      6. | Pedantic
        (*

        Lints which are rather strict or might have false positives

        *)
      7. | Complexity
      8. | Suspicious
      9. | Nursery
        (*

        New lints that are still under development

        *)

      Group of lints. The same as Rust's Clippy

      type level =
      1. | Allow
      2. | Warn
      3. | Deny
      4. | Deprecated

      Level of lints. The same as Rust's Clippy

      type lint_source =
      1. | Camelot
        (*

        Adopted from Camelot linter

        *)
      2. | Clippy
        (*

        Adopted from Rust's Clippy

        *)
      3. | FPCourse
        (*

        Invented after reviewing Kakadu's student's OCaml homeworks

        *)
      4. | Other
        (*

        The source is not specified

        *)

      How various lints were invented

      module type GENERAL = sig ... end
      module type UNTYPED = sig ... end
      module type TYPED = sig ... end
      module type UNUSED_DECLS = sig ... end
      module type REPORTER = sig ... end
      +LINT (zanuda.Zanuda_core.LINT)

      Module Zanuda_core.LINT

      Module types for program tree analyzers

      type impl =
      1. | Untyped
      2. | Typed

      A type of lint's implementation. Typed and untyped lints inspect OCaml's Parsetree/Typedtree respectively. In Clippy it corresponds to early and late lint passes.

      type group =
      1. | Style
        (*

        Code that should be written in a more idiomatic way

        *)
      2. | Correctness
        (*

        Code that is outright wrong or useless

        *)
      3. | Perf
        (*

        Code that can be written to run faster

        *)
      4. | Restriction
      5. | Deprecated
      6. | Pedantic
        (*

        Lints which are rather strict or might have false positives

        *)
      7. | Complexity
      8. | Suspicious
      9. | Nursery
        (*

        New lints that are still under development

        *)

      Group of lints. The same as Rust's Clippy

      type level =
      1. | Allow
      2. | Warn
      3. | Deny
      4. | Deprecated

      Level of lints. The same as Rust's Clippy

      type lint_source =
      1. | Camelot
        (*

        Adopted from Camelot linter

        *)
      2. | Clippy
        (*

        Adopted from Rust's Clippy

        *)
      3. | FPCourse
        (*

        Invented after reviewing Kakadu's student's OCaml homeworks

        *)
      4. | Other
        (*

        The source is not specified

        *)

      How various lints were invented

      module type GENERAL = sig ... end
      module type UNTYPED = sig ... end
      module type TYPED = sig ... end
      module type UNUSED_DECLS = sig ... end
      module type REPORTER = sig ... end
      diff --git a/api/zanuda/Zanuda_core/LINT/module-type-GENERAL/index.html b/api/zanuda/Zanuda_core/LINT/module-type-GENERAL/index.html index d007321..9dce86b 100644 --- a/api/zanuda/Zanuda_core/LINT/module-type-GENERAL/index.html +++ b/api/zanuda/Zanuda_core/LINT/module-type-GENERAL/index.html @@ -1,2 +1,2 @@ -GENERAL (zanuda.Zanuda_core.LINT.GENERAL)

      Module type LINT.GENERAL

      type input
      val lint_id : string

      Linter id. Should be unique

      val lint_source : lint_source

      How this lint appeared.

      val level : level
      val run : Compile_common.info -> input -> input

      Run this lint and save result in global store CollectedLints.

      val documentation : string

      Lint's documentation in Markdown.

      Dump lint's documentation as Markdown.

      val describe_as_json : unit -> Yojson.Safe.t

      Dump lint's documentation to as JSON object to use in web-based interfaces.

      +GENERAL (zanuda.Zanuda_core.LINT.GENERAL)

      Module type LINT.GENERAL

      type input
      val lint_id : string

      Linter id. Should be unique

      val lint_source : lint_source

      How this lint appeared.

      val level : level
      val run : Compile_common.info -> input -> input

      Run this lint and save result in global store CollectedLints.

      val documentation : string

      Lint's documentation in Markdown.

      Dump lint's documentation as Markdown.

      val describe_as_json : unit -> Yojson.Safe.t

      Dump lint's documentation to as JSON object to use in web-based interfaces.

      diff --git a/api/zanuda/Zanuda_core/LINT/module-type-REPORTER/index.html b/api/zanuda/Zanuda_core/LINT/module-type-REPORTER/index.html index d973d0e..31b3572 100644 --- a/api/zanuda/Zanuda_core/LINT/module-type-REPORTER/index.html +++ b/api/zanuda/Zanuda_core/LINT/module-type-REPORTER/index.html @@ -1,2 +1,2 @@ -REPORTER (zanuda.Zanuda_core.LINT.REPORTER)

      Module type LINT.REPORTER

      val txt : Stdlib.Format.formatter -> unit -> unit

      Report lint info as text. Useful to print to terminal.

      val rdjsonl : Stdlib.Format.formatter -> unit -> unit

      Report lint info as RDJSONL format.

      Originally, it was used with ReviewDog tool to publish Github review. But nowadays we are abandoning it.

      • deprecated
      +REPORTER (zanuda.Zanuda_core.LINT.REPORTER)

      Module type LINT.REPORTER

      val txt : Stdlib.Format.formatter -> unit -> unit

      Report lint info as text. Useful to print to terminal.

      val rdjsonl : Stdlib.Format.formatter -> unit -> unit

      Report lint info as RDJSONL format.

      Originally, it was used with ReviewDog tool to publish Github review. But nowadays we are abandoning it.

      • deprecated
      diff --git a/api/zanuda/Zanuda_core/LINT/module-type-TYPED/index.html b/api/zanuda/Zanuda_core/LINT/module-type-TYPED/index.html index 9cf574e..02229c9 100644 --- a/api/zanuda/Zanuda_core/LINT/module-type-TYPED/index.html +++ b/api/zanuda/Zanuda_core/LINT/module-type-TYPED/index.html @@ -1,2 +1,2 @@ -TYPED (zanuda.Zanuda_core.LINT.TYPED)

      Module type LINT.TYPED

      type input = Tast_iterator.iterator
      include GENERAL with type input := input
      val lint_id : string

      Linter id. Should be unique

      val lint_source : lint_source

      How this lint appeared.

      val level : level
      val run : Compile_common.info -> input -> input

      Run this lint and save result in global store CollectedLints.

      val documentation : string

      Lint's documentation in Markdown.

      Dump lint's documentation as Markdown.

      val describe_as_json : unit -> Yojson.Safe.t

      Dump lint's documentation to as JSON object to use in web-based interfaces.

      +TYPED (zanuda.Zanuda_core.LINT.TYPED)

      Module type LINT.TYPED

      type input = Tast_iterator.iterator
      include GENERAL with type input := input
      val lint_id : string

      Linter id. Should be unique

      val lint_source : lint_source

      How this lint appeared.

      val level : level
      val run : Compile_common.info -> input -> input

      Run this lint and save result in global store CollectedLints.

      val documentation : string

      Lint's documentation in Markdown.

      Dump lint's documentation as Markdown.

      val describe_as_json : unit -> Yojson.Safe.t

      Dump lint's documentation to as JSON object to use in web-based interfaces.

      diff --git a/api/zanuda/Zanuda_core/LINT/module-type-UNTYPED/index.html b/api/zanuda/Zanuda_core/LINT/module-type-UNTYPED/index.html index aa40864..5f68763 100644 --- a/api/zanuda/Zanuda_core/LINT/module-type-UNTYPED/index.html +++ b/api/zanuda/Zanuda_core/LINT/module-type-UNTYPED/index.html @@ -1,2 +1,2 @@ -UNTYPED (zanuda.Zanuda_core.LINT.UNTYPED)

      Module type LINT.UNTYPED

      type input = Ast_iterator.iterator
      include GENERAL with type input := input
      val lint_id : string

      Linter id. Should be unique

      val lint_source : lint_source

      How this lint appeared.

      val level : level
      val run : Compile_common.info -> input -> input

      Run this lint and save result in global store CollectedLints.

      val documentation : string

      Lint's documentation in Markdown.

      Dump lint's documentation as Markdown.

      val describe_as_json : unit -> Yojson.Safe.t

      Dump lint's documentation to as JSON object to use in web-based interfaces.

      +UNTYPED (zanuda.Zanuda_core.LINT.UNTYPED)

      Module type LINT.UNTYPED

      type input = Ast_iterator.iterator
      include GENERAL with type input := input
      val lint_id : string

      Linter id. Should be unique

      val lint_source : lint_source

      How this lint appeared.

      val level : level
      val run : Compile_common.info -> input -> input

      Run this lint and save result in global store CollectedLints.

      val documentation : string

      Lint's documentation in Markdown.

      Dump lint's documentation as Markdown.

      val describe_as_json : unit -> Yojson.Safe.t

      Dump lint's documentation to as JSON object to use in web-based interfaces.

      diff --git a/api/zanuda/Zanuda_core/LINT/module-type-UNUSED_DECLS/index.html b/api/zanuda/Zanuda_core/LINT/module-type-UNUSED_DECLS/index.html index b13c1ad..fcdbaef 100644 --- a/api/zanuda/Zanuda_core/LINT/module-type-UNUSED_DECLS/index.html +++ b/api/zanuda/Zanuda_core/LINT/module-type-UNUSED_DECLS/index.html @@ -1,2 +1,2 @@ -UNUSED_DECLS (zanuda.Zanuda_core.LINT.UNUSED_DECLS)

      Module type LINT.UNUSED_DECLS

      type input = Tast_iterator.iterator
      include GENERAL with type input := input
      val lint_id : string

      Linter id. Should be unique

      val lint_source : lint_source

      How this lint appeared.

      val level : level
      val run : Compile_common.info -> input -> input

      Run this lint and save result in global store CollectedLints.

      val documentation : string

      Lint's documentation in Markdown.

      Dump lint's documentation as Markdown.

      val describe_as_json : unit -> Yojson.Safe.t

      Dump lint's documentation to as JSON object to use in web-based interfaces.

      +UNUSED_DECLS (zanuda.Zanuda_core.LINT.UNUSED_DECLS)

      Module type LINT.UNUSED_DECLS

      type input = Tast_iterator.iterator
      include GENERAL with type input := input
      val lint_id : string

      Linter id. Should be unique

      val lint_source : lint_source

      How this lint appeared.

      val level : level
      val run : Compile_common.info -> input -> input

      Run this lint and save result in global store CollectedLints.

      val documentation : string

      Lint's documentation in Markdown.

      Dump lint's documentation as Markdown.

      val describe_as_json : unit -> Yojson.Safe.t

      Dump lint's documentation to as JSON object to use in web-based interfaces.

      diff --git a/api/zanuda/Zanuda_core/Lint_filesystem/index.html b/api/zanuda/Zanuda_core/Lint_filesystem/index.html index 26c9512..f2a9285 100644 --- a/api/zanuda/Zanuda_core/Lint_filesystem/index.html +++ b/api/zanuda/Zanuda_core/Lint_filesystem/index.html @@ -1,2 +1,2 @@ -Lint_filesystem (zanuda.Zanuda_core.Lint_filesystem)

      Module Zanuda_core.Lint_filesystem

      val check : Dune_project.t list -> unit
      val describe_as_json : unit -> Yojson.Safe.t
      +Lint_filesystem (zanuda.Zanuda_core.Lint_filesystem)

      Module Zanuda_core.Lint_filesystem

      val check : Dune_project.t list -> unit
      val describe_as_json : unit -> Yojson.Safe.t
      diff --git a/api/zanuda/Zanuda_core/Load_dune/index.html b/api/zanuda/Zanuda_core/Load_dune/index.html index 3a0f767..ce2100e 100644 --- a/api/zanuda/Zanuda_core/Load_dune/index.html +++ b/api/zanuda/Zanuda_core/Load_dune/index.html @@ -1,5 +1,5 @@ -Load_dune (zanuda.Zanuda_core.Load_dune)

      Module Zanuda_core.Load_dune

      type w =
      1. | Wrapped of string
      2. | Non_wrapped
      val pp_w : Stdlib.Format.formatter -> w -> unit
      val analyze_dir : +Load_dune (zanuda.Zanuda_core.Load_dune)

      Module Zanuda_core.Load_dune

      type w =
      1. | Wrapped of string
      2. | Non_wrapped
      val pp_w : Stdlib.Format.formatter -> w -> unit
      val analyze_dir : untyped:(string -> unit) -> cmt:(w -> string -> Typedtree.structure -> unit) -> cmti:(w -> string -> Typedtree.signature -> unit) -> diff --git a/api/zanuda/Zanuda_core/Unused_ML_logger/index.html b/api/zanuda/Zanuda_core/Unused_ML_logger/index.html index f15c851..9ad52be 100644 --- a/api/zanuda/Zanuda_core/Unused_ML_logger/index.html +++ b/api/zanuda/Zanuda_core/Unused_ML_logger/index.html @@ -1,2 +1,2 @@ -Unused_ML_logger (zanuda.Zanuda_core.Unused_ML_logger)

      Module Zanuda_core.Unused_ML_logger

      Collect used values from structure files.

      An initial implementation was contributed by GitHub user jegorpopow

      val run : 'a -> Base.string -> Tast_iterator.iterator -> Tast_iterator.iterator
      +Unused_ML_logger (zanuda.Zanuda_core.Unused_ML_logger)

      Module Zanuda_core.Unused_ML_logger

      Collect used values from structure files.

      An initial implementation was contributed by GitHub user jegorpopow

      val run : 'a -> Base.string -> Tast_iterator.iterator -> Tast_iterator.iterator
      diff --git a/api/zanuda/Zanuda_core/Utils/ErrorFormat/index.html b/api/zanuda/Zanuda_core/Utils/ErrorFormat/index.html index dd981f8..54785a0 100644 --- a/api/zanuda/Zanuda_core/Utils/ErrorFormat/index.html +++ b/api/zanuda/Zanuda_core/Utils/ErrorFormat/index.html @@ -1,9 +1,9 @@ -ErrorFormat (zanuda.Zanuda_core.Utils.ErrorFormat)

      Module Utils.ErrorFormat

      val pp : +ErrorFormat (zanuda.Zanuda_core.Utils.ErrorFormat)

      Module Utils.ErrorFormat

      val pp : Caml.Format.formatter -> filename:string -> line:int -> col:'a -> (Caml.Format.formatter -> 'b -> unit) -> - 'c -> + 'b -> unit
      diff --git a/api/zanuda/Zanuda_core/Utils/RDJsonl/index.html b/api/zanuda/Zanuda_core/Utils/RDJsonl/index.html index 3ed2ed7..9060db5 100644 --- a/api/zanuda/Zanuda_core/Utils/RDJsonl/index.html +++ b/api/zanuda/Zanuda_core/Utils/RDJsonl/index.html @@ -1,5 +1,5 @@ -RDJsonl (zanuda.Zanuda_core.Utils.RDJsonl)

      Module Utils.RDJsonl

      val pp : +RDJsonl (zanuda.Zanuda_core.Utils.RDJsonl)

      Module Utils.RDJsonl

      val pp : Caml.Format.formatter -> filename:Base.string -> line:Base.int -> diff --git a/api/zanuda/Zanuda_core/Utils/Report/index.html b/api/zanuda/Zanuda_core/Utils/Report/index.html index c028e55..c98454a 100644 --- a/api/zanuda/Zanuda_core/Utils/Report/index.html +++ b/api/zanuda/Zanuda_core/Utils/Report/index.html @@ -1,15 +1,15 @@ -Report (zanuda.Zanuda_core.Utils.Report)

      Module Utils.Report

      val txt : +Report (zanuda.Zanuda_core.Utils.Report)

      Module Utils.Report

      val txt : loc:Location.t -> filename:Base.String.t -> Stdlib.Format.formatter -> (Stdlib.Format.formatter -> 'a -> unit) -> - 'b -> + 'a -> unit
      val rdjsonl : loc:Location.t -> filename:Base.string -> code:Base.string -> Caml.Format.formatter -> (Caml.Format.formatter -> 'a -> Base.unit) -> - 'b -> + 'a -> Base.unit
      diff --git a/api/zanuda/Zanuda_core/Utils/index.html b/api/zanuda/Zanuda_core/Utils/index.html index 595d691..e73e8e3 100644 --- a/api/zanuda/Zanuda_core/Utils/index.html +++ b/api/zanuda/Zanuda_core/Utils/index.html @@ -1,5 +1,5 @@ -Utils (zanuda.Zanuda_core.Utils)

      Module Zanuda_core.Utils

      Various helper functions.

      val printfn : ('a, Caml.Format.formatter, unit, unit) Stdlib.format4 -> 'b
      module ErrorFormat : sig ... end
      type rdjsonl_code = Base.string * Base.string Base.option
      module RDJsonl : sig ... end
      val cut_build_dir : Base.String.t -> Base.String.t
      module Report : sig ... end
      val string_of_group : LINT.group -> Base.string
      val string_of_level : LINT.level -> Base.string
      val string_of_impl : LINT.impl -> string
      val describe_as_clippy_json : +Utils (zanuda.Zanuda_core.Utils)

      Module Zanuda_core.Utils

      Various helper functions.

      val printfn : ('a, Caml.Format.formatter, unit, unit) Stdlib.format4 -> 'a
      module ErrorFormat : sig ... end
      type rdjsonl_code = Base.string * Base.string Base.option
      module RDJsonl : sig ... end
      val cut_build_dir : Base.String.t -> Base.String.t
      module Report : sig ... end
      val string_of_group : LINT.group -> Base.string
      val string_of_level : LINT.level -> Base.string
      val string_of_impl : LINT.impl -> string
      val describe_as_clippy_json : ?group:LINT.group -> ?level:LINT.level -> ?impl:LINT.impl -> diff --git a/api/zanuda/Zanuda_core/index.html b/api/zanuda/Zanuda_core/index.html index 25ce196..719ddf1 100644 --- a/api/zanuda/Zanuda_core/index.html +++ b/api/zanuda/Zanuda_core/index.html @@ -1,2 +1,2 @@ -Zanuda_core (zanuda.Zanuda_core)

      Module Zanuda_core

      module Collected_decls : sig ... end

      Global storage for defined names. Is used to detect public but not used library fields.

      module Collected_lints : sig ... end

      Global storage for found defects.

      module Config : sig ... end
      module Dune_project : sig ... end

      Specialized data type to deserialize the output of 'dune describe'

      module LINT : sig ... end

      Module types for program tree analyzers

      module Lint_filesystem : sig ... end
      module Load_dune : sig ... end
      module Unused_ML_logger : sig ... end

      Collect used values from structure files.

      module Utils : sig ... end

      Various helper functions.

      +Zanuda_core (zanuda.Zanuda_core)

      Module Zanuda_core

      module Collected_decls : sig ... end

      Global storage for defined names. Is used to detect public but not used library fields.

      module Collected_lints : sig ... end

      Global storage for found defects.

      module Config : sig ... end
      module Dune_project : sig ... end

      Specialized data type to deserialize the output of 'dune describe'

      module LINT : sig ... end

      Module types for program tree analyzers

      module Lint_filesystem : sig ... end
      module Load_dune : sig ... end
      module Unused_ML_logger : sig ... end

      Collect used values from structure files.

      module Utils : sig ... end

      Various helper functions.

      diff --git a/api/zanuda/Zanuda_core__Collected_decls/index.html b/api/zanuda/Zanuda_core__Collected_decls/index.html index 998abc1..a233f73 100644 --- a/api/zanuda/Zanuda_core__Collected_decls/index.html +++ b/api/zanuda/Zanuda_core__Collected_decls/index.html @@ -1,2 +1,2 @@ -Zanuda_core__Collected_decls (zanuda.Zanuda_core__Collected_decls)

      Module Zanuda_core__Collected_decls

      This module is hidden.

      +Zanuda_core__Collected_decls (zanuda.Zanuda_core__Collected_decls)

      Module Zanuda_core__Collected_decls

      This module is hidden.

      diff --git a/api/zanuda/Zanuda_core__Collected_lints/index.html b/api/zanuda/Zanuda_core__Collected_lints/index.html index 5d5f7e5..3781d1d 100644 --- a/api/zanuda/Zanuda_core__Collected_lints/index.html +++ b/api/zanuda/Zanuda_core__Collected_lints/index.html @@ -1,2 +1,2 @@ -Zanuda_core__Collected_lints (zanuda.Zanuda_core__Collected_lints)

      Module Zanuda_core__Collected_lints

      This module is hidden.

      +Zanuda_core__Collected_lints (zanuda.Zanuda_core__Collected_lints)

      Module Zanuda_core__Collected_lints

      This module is hidden.

      diff --git a/api/zanuda/Zanuda_core__Config/index.html b/api/zanuda/Zanuda_core__Config/index.html index 727c4e8..b02f416 100644 --- a/api/zanuda/Zanuda_core__Config/index.html +++ b/api/zanuda/Zanuda_core__Config/index.html @@ -1,2 +1,2 @@ -Zanuda_core__Config (zanuda.Zanuda_core__Config)

      Module Zanuda_core__Config

      This module is hidden.

      +Zanuda_core__Config (zanuda.Zanuda_core__Config)

      Module Zanuda_core__Config

      This module is hidden.

      diff --git a/api/zanuda/Zanuda_core__Dune_project/index.html b/api/zanuda/Zanuda_core__Dune_project/index.html index bfb0acc..032450f 100644 --- a/api/zanuda/Zanuda_core__Dune_project/index.html +++ b/api/zanuda/Zanuda_core__Dune_project/index.html @@ -1,2 +1,2 @@ -Zanuda_core__Dune_project (zanuda.Zanuda_core__Dune_project)

      Module Zanuda_core__Dune_project

      This module is hidden.

      +Zanuda_core__Dune_project (zanuda.Zanuda_core__Dune_project)

      Module Zanuda_core__Dune_project

      This module is hidden.

      diff --git a/api/zanuda/Zanuda_core__LINT/index.html b/api/zanuda/Zanuda_core__LINT/index.html index 5c7fd4a..8bffe64 100644 --- a/api/zanuda/Zanuda_core__LINT/index.html +++ b/api/zanuda/Zanuda_core__LINT/index.html @@ -1,2 +1,2 @@ -Zanuda_core__LINT (zanuda.Zanuda_core__LINT)

      Module Zanuda_core__LINT

      This module is hidden.

      +Zanuda_core__LINT (zanuda.Zanuda_core__LINT)

      Module Zanuda_core__LINT

      This module is hidden.

      diff --git a/api/zanuda/Zanuda_core__Lint_filesystem/index.html b/api/zanuda/Zanuda_core__Lint_filesystem/index.html index 6f94dbe..fe9ca18 100644 --- a/api/zanuda/Zanuda_core__Lint_filesystem/index.html +++ b/api/zanuda/Zanuda_core__Lint_filesystem/index.html @@ -1,2 +1,2 @@ -Zanuda_core__Lint_filesystem (zanuda.Zanuda_core__Lint_filesystem)

      Module Zanuda_core__Lint_filesystem

      This module is hidden.

      +Zanuda_core__Lint_filesystem (zanuda.Zanuda_core__Lint_filesystem)

      Module Zanuda_core__Lint_filesystem

      This module is hidden.

      diff --git a/api/zanuda/Zanuda_core__Load_dune/index.html b/api/zanuda/Zanuda_core__Load_dune/index.html index 7b65659..2ae70a2 100644 --- a/api/zanuda/Zanuda_core__Load_dune/index.html +++ b/api/zanuda/Zanuda_core__Load_dune/index.html @@ -1,2 +1,2 @@ -Zanuda_core__Load_dune (zanuda.Zanuda_core__Load_dune)

      Module Zanuda_core__Load_dune

      This module is hidden.

      +Zanuda_core__Load_dune (zanuda.Zanuda_core__Load_dune)

      Module Zanuda_core__Load_dune

      This module is hidden.

      diff --git a/api/zanuda/Zanuda_core__Unused_ML_logger/index.html b/api/zanuda/Zanuda_core__Unused_ML_logger/index.html index 205db0f..6860f97 100644 --- a/api/zanuda/Zanuda_core__Unused_ML_logger/index.html +++ b/api/zanuda/Zanuda_core__Unused_ML_logger/index.html @@ -1,2 +1,2 @@ -Zanuda_core__Unused_ML_logger (zanuda.Zanuda_core__Unused_ML_logger)

      Module Zanuda_core__Unused_ML_logger

      This module is hidden.

      +Zanuda_core__Unused_ML_logger (zanuda.Zanuda_core__Unused_ML_logger)

      Module Zanuda_core__Unused_ML_logger

      This module is hidden.

      diff --git a/api/zanuda/Zanuda_core__Utils/index.html b/api/zanuda/Zanuda_core__Utils/index.html index 825451e..112bf08 100644 --- a/api/zanuda/Zanuda_core__Utils/index.html +++ b/api/zanuda/Zanuda_core__Utils/index.html @@ -1,2 +1,2 @@ -Zanuda_core__Utils (zanuda.Zanuda_core__Utils)

      Module Zanuda_core__Utils

      This module is hidden.

      +Zanuda_core__Utils (zanuda.Zanuda_core__Utils)

      Module Zanuda_core__Utils

      This module is hidden.

      diff --git a/api/zanuda/_doc-dir/README.md b/api/zanuda/_doc-dir/README.md index 367a638..4e9fe11 100644 --- a/api/zanuda/_doc-dir/README.md +++ b/api/zanuda/_doc-dir/README.md @@ -8,18 +8,21 @@ ## A linter for OCaml+dune projects -A *linter* is a tool that discovers bugs and obscurities in the code. The name was invented in 1978 paper of S. C. Johnson: [Lint, a C Program Checker](http://squoze.net/UNIX/v7/files/doc/15_lint.pdf). +A *linter* is a tool that discovers bugs and obscurities in the code. +The name was invented in 1978 paper of S. C. Johnson: [Lint, a C Program Checker](http://squoze.net/UNIX/v7/files/doc/15_lint.pdf). -At the moment most of implemented lints are inspired by my teaching experience. -But I'm aware that there are other linters like [Camelot](https://github.com/upenn-cis1xx/camelot) for OCaml and [Clippy](https://github.com/rust-lang/rust-clippy) Rust. [This is a list of currently supported analyses.](https://kakadu.github.io/zanuda/lints/index.html) -From techinical point of view, most of the lints study Typedtree, so the input for linter should be a **fully compiled dune project**. There is a support of linters that study untyped tree, but I don't expect them to be widely used. These two abstract trees don't allow to find all possible code quirks. Currently, we delegate job of detecting something like `f(1)(2)(3)` to [ocamlformat](https://github.com/ocaml-ppx/ocamlformat). +From techinical point of view, most of the lints study Typedtree, so the **input** for linter should be a **fully compiled dune project**. +There is a support of linters that study untyped tree, but I don't expect them to be widely used. +These two abstract trees don't allow to find all possible code quirks. +Currently, we delegate job of detecting something like `f(1)(2)(3)` to [ocamlformat](https://github.com/ocaml-ppx/ocamlformat). This linter is inspired by: * [How possible is a clippy-like linter for OCaml?](https://discuss.ocaml.org/t/how-possible-is-a-clippy-like-linter-for-ocaml) * My experience in teaching OCaml at my local university. +But I'm aware that there are other linters like [Camelot](https://github.com/upenn-cis1xx/camelot) for OCaml and [Clippy](https://github.com/rust-lang/rust-clippy) Rust. ##### Usage @@ -59,6 +62,8 @@ Running all tests: ##### See also +* [Rescript Reanalyze](https://github.com/rescript-association/reanalyze) +* [Sem grep](https://github.com/semgrep/semgrep) * [Ocp-lint paper](https://hal.inria.fr/hal-01352013/document) * Lexifi's dead [dead_code_analyzer](https://github.com/LexiFi/dead_code_analyzer) * [Camelot](https://github.com/upenn-cis1xx/camelot) diff --git a/api/zanuda/index.html b/api/zanuda/index.html index 5702cd0..ac41535 100644 --- a/api/zanuda/index.html +++ b/api/zanuda/index.html @@ -1,2 +1,2 @@ -index (zanuda.index)

      Package zanuda 1.0.0

      • My_printtyped These extra functions are an extension of Printtyped module from compiler libs. Maybe in new versions of compiler they will be available out of box.
      • My_untype These extra functions are an extension of Untypeast module from compiler libs. Maybe in new versions of compiler they will be available out of box.
      • Tast_pattern Matching combinators for Typedtree.
      • Zanuda_core

      Package info

      authors
      • Kakadu
      changes-files
      depends
      homepage
      issues
      license
      • LGPL-3.0-only
      license-files
      maintainers
      • kakadu@pm.me
      readme-files
      repo
      • git+https://github.com/Kakadu/zanuda.git
      tags
      • lint
      • test
      version
      • 1.0.0
      +index (zanuda.index)

      Package zanuda 1.0.0

      • My_printtyped These extra functions are an extension of Printtyped module from compiler libs. Maybe in new versions of compiler they will be available out of box.
      • My_untype These extra functions are an extension of Untypeast module from compiler libs. Maybe in new versions of compiler they will be available out of box.
      • Tast_pattern Matching combinators for Typedtree.
      • Zanuda_core

      Package info

      authors
      • Kakadu
      changes-files
      depends
      homepage
      issues
      license
      • LGPL-3.0-only
      license-files
      maintainers
      • kakadu@pm.me
      readme-files
      repo
      • git+https://github.com/Kakadu/zanuda.git
      tags
      • lint
      • test
      version
      • 1.0.0