Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
5e5ca704
Commit
5e5ca704
authored
2 years ago
by
Patrick Baudin
Browse files
Options
Downloads
Patches
Plain Diff
[lint] prints the number of checked files
parent
92b235d5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/lint/lint.ml
+5
-2
5 additions, 2 deletions
tools/lint/lint.ml
with
5 additions
and
2 deletions
tools/lint/lint.ml
+
5
−
2
View file @
5e5ca704
...
@@ -373,11 +373,12 @@ let check_indent ~indent_formatter ~update file =
...
@@ -373,11 +373,12 @@ let check_indent ~indent_formatter ~update file =
(* Main checks *)
(* Main checks *)
let
check
~
verbose
~
update
file
params
=
let
check
~
count
~
verbose
~
update
file
params
=
if
verbose
then
if
verbose
then
Format
.
printf
"Checking %s@."
file
;
Format
.
printf
"Checking %s@."
file
;
if
Sys
.
is_directory
file
then
()
if
Sys
.
is_directory
file
then
()
else
begin
else
begin
incr
count
;
let
in_chan
=
open_in
file
in
let
in_chan
=
open_in
file
in
let
content
=
read_buffered
in_chan
in
let
content
=
read_buffered
in_chan
in
close_in
in_chan
;
close_in
in_chan
;
...
@@ -469,6 +470,8 @@ let () =
...
@@ -469,6 +470,8 @@ let () =
updates_tbl
external_formatters
;
updates_tbl
external_formatters
;
parse_config
!
config_file
;
parse_config
!
config_file
;
collect
@@
lines_from_in
stdin
;
collect
@@
lines_from_in
stdin
;
Hashtbl
.
iter
(
check
~
verbose
:!
verbose
~
update
:!
update
)
table
;
let
count
=
ref
0
in
Hashtbl
.
iter
(
check
~
count
~
verbose
:!
verbose
~
update
:!
update
)
table
;
Format
.
printf
"Lint %d file(s)@."
!
count
;
if
not
!
res
then
exit
1
if
not
!
res
then
exit
1
end
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment