Commit graph

6 commits

Author SHA1 Message Date
Fedor Korotkiy
a0b7eb9c6d Revert "Calculate coverage of private code."
This reverts commit a56f50ac46.
2023-02-22 17:02:44 +04:00
Alexander Vasilyev
a56f50ac46 Calculate coverage of private code.
Create empty coverage profile from problem code to calculate coverage
correctly. For some wierd reasons it will also account for not tested packages.
This change prevents students from adding new code and testing it,
instead of getting good coverage for initial codebase :)
2020-03-27 22:32:10 +03:00
Alexander Vasilyev
54ab7b69d1 Add coverpkg specification.
Currently, packages in coverme without tests created by student
are not checked for coverage, because no there are no test targets
for them at all!

The issue can be fixed by simply creating empty !change files,
but we are engineers, aren't we? :)

Bonus point: it prevents new packages from giving false coverage credit.
For example, mock file generated by gomock will have lots of covered code
almost instantly. However, the task can be hacked by adding new code to
existing packages.
2020-03-27 22:32:10 +03:00
Alexander Vasilyev
545ce5cbe3 Calculate coverage problem-wise, not per package.
This seems to be fair, especially since coverage target is
defined problem-wise. Practical reason: coverme/app can not
be covered sufficiently without testing Start/initRoutes/run;
out of these, only initRoutes can be tested, and testing it
separately is a wierd solution.
2020-03-27 22:32:10 +03:00
Arseny Balobanov
8c9f5151b1 Fix variable shadowing pointed out by linter. 2020-03-19 01:33:16 +03:00
Arseny Balobanov
bb0c91683f Adding forgotten coverage helpers. 2020-03-19 01:29:11 +03:00