Skip to content

Hide code from coverage#851

Merged
cbmarini merged 3 commits into
form-dev:masterfrom
cbmarini:lcov-excl
Jul 21, 2026
Merged

Hide code from coverage#851
cbmarini merged 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: 65.034% (+1.5%) from 63.504% — 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
cbmarini force-pushed the lcov-excl branch 3 times, most recently from c8af393 to 6c8a622 Compare July 16, 2026 07:25
cbmarini added 3 commits July 21, 2026 17:07
…, 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 `&`.
- 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.
@cbmarini
cbmarini merged commit 2542df9 into form-dev:master Jul 21, 2026
106 checks passed
@cbmarini
cbmarini deleted the lcov-excl branch July 21, 2026 15:59
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