Skip to content

Hide code from coverage#851

Open
cbmarini wants to merge 3 commits into
form-dev:masterfrom
cbmarini:lcov-excl
Open

Hide code from coverage#851
cbmarini wants to merge 3 commits into
form-dev:masterfrom
cbmarini:lcov-excl

Conversation

@cbmarini

@cbmarini cbmarini commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

This PR wraps unfinished features into LCOV_EXCL_START and LCOV_EXCL_STOP to hide them from coverage statistics. At the moment I hid the (unfinished) code for

  • #namespace,
  • #setflag,
  • MultiBracket,
  • the complete diagrams.c file.

What else could be hidden because it is not active at the moment? For example the code in checkpoint.c?

@coveralls

coveralls commented Jun 24, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 64.729% (+1.5%) from 63.186% — cbmarini:lcov-excl into form-dev:master

@tueda

tueda commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

SkipName and ConstructName are called when reading a model for the diagram generator.

Undocumented user-flag feature is working, except for the clearflag statement:

Local F = 1;

#procedure PrintFlag(i,F)
  #if flag(1,F)
    #message flag(1,F) is true
  #else
    #message flag(1,F) is false
  #endif
#endprocedure

#call PrintFlag(1,F)
#setflag 2,F
#call PrintFlag(1,F)
#setflag 1,F
#call PrintFlag(1,F)
#clearflag 1,F
#call PrintFlag(1,F)
setflag 1;
.sort
#call PrintFlag(1,F)
clearflag 1;
.sort
#call PrintFlag(1,F)

.end
~~~flag(1,F) is false
~~~flag(1,F) is false
~~~flag(1,F) is true
~~~flag(1,F) is false
~~~flag(1,F) is true
~~~flag(1,F) is true
    .end

One would expect the last one to be false.

GPT-5.5 suspects that Add3Com(TYPECLEARUSERFLAG,x) in CoClearUserFlag:

Add3Com(TYPECLEARUSERFLAG,x);

should be Add3Com(TYPECLEARUSERFLAG,x-1) as in CoSetUserFlag.

@jodavies

jodavies commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

You could also hide anything to do with the "second stage load balancer", so BalanceRunThread in threads.c and associated code.

cbmarini added 2 commits July 15, 2026 10:41
…, see the new .lcovrc, to hide them from coverage statistics.

This commit hides the following:
- #namespace
- #setflag
- MultiBracket
- Complete checkpoint.c file
- Complete diagrams.c file
- This should go together with the lcov exclusion markers INTERNAL_ERROR_EXCL_START etc.

fix: don't allow MesPrint error markers `@` and `#` in the regular Print statement, similar as already implemented for `&`.
@cbmarini
cbmarini force-pushed the lcov-excl branch 2 times, most recently from 2f1f1bd to c8af393 Compare July 15, 2026 14:32
- in float.c and evaluate.c,
- in names.c, dict.c, threads.c and tools.c for functions that are only called from diagrams.c and checkpoint.c,
- BalanceRunThread and calls to it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants