diff --git a/tools/lint/README.md b/tools/lint/README.md index b5ab4cfe03061fe8370eb9f4cc9a59bd2f25c2b9..5f88f8eb9b9ab0a3b27a8fb8b82d39d77231c4c3 100644 --- a/tools/lint/README.md +++ b/tools/lint/README.md @@ -79,5 +79,5 @@ That means there is an implicit overloadable JSON description: The option `-c <json-confi g-file>` allows to extend and/or overload the default configuration. -When the `available_cmd` field is set to an empty string, that disable the check/update with the related tool. An empty string can also be set to the field `check_cmd` (resp. `update_cmd`) when the related tool does not offer check (resp. update) command. +When the `available_cmd` is set to and empty string, the tool is considered available except if the fields `check_cmd` `update_cmd` are both set to an empty string. diff --git a/tools/lint/dune b/tools/lint/dune index cff48d122fdfd851d113eb40f14a7f5b1bc38f09..8e5852b25acd82545c769b2ffdce491b7f82e9c2 100644 --- a/tools/lint/dune +++ b/tools/lint/dune @@ -20,10 +20,17 @@ ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; automatic versionning from opam file +(rule + (targets version.ml) + (deps frama-c-lint.opam) + (action (system "grep ^version frama-c-lint.opam | sed -e 's/version:/let version=/' > version.ml")) + ) + (executable (public_name frama-c-lint) (name lint) - (modules lint UTF8) + (modules lint version UTF8) (preprocess (pps ppx_deriving_yojson)) (libraries unix yojson ocp-indent.lexer ocp-indent.lib ocp-indent.dynlink) ) diff --git a/tools/lint/frama-c-lint.opam b/tools/lint/frama-c-lint.opam index d7c1d0324a45a9fc6d1733f46d7654b865ca3233..1965b30ff49e4c3289e1f4e69eda47bdec0fe2cc 100644 --- a/tools/lint/frama-c-lint.opam +++ b/tools/lint/frama-c-lint.opam @@ -10,6 +10,7 @@ C files, UTF8 for all text files, newline at EOF, no trailing whitespaces. maintainer: "allan.blanchard@cea.fr" authors: [ "Allan Blanchard" + "Patrick Baudin" ] homepage: "https://frama-c.com/" license: "LGPL-2.1-only" diff --git a/tools/lint/lint.ml b/tools/lint/lint.ml index 91108f9bf0d02e2ca16af13778ec2bf77d8d347d..f4fb550b7146a95da3dca3f38ffb4815ed8e8955 100644 --- a/tools/lint/lint.ml +++ b/tools/lint/lint.ml @@ -430,10 +430,8 @@ let check ~verbose ~update file params = let exec_name = Sys.argv.(0) -let version = "1.0" - let version () = - Format.printf "%s version %s@." (Filename.basename exec_name) version; + Format.printf "%s version %s@." (Filename.basename exec_name) Version.version; exit 0 let update = ref false