diff --git a/Contributing.md b/Contributing.md index 6d60065a..29135804 100644 --- a/Contributing.md +++ b/Contributing.md @@ -263,8 +263,6 @@ e.g. ```toml [tool.coverage.coverage_conditional_plugin.rules] -# Yes, the sense of all of these is inverted, because else it ends up -# inverted at *every* use. sys-platform-win32 = "sys_platform != 'win32'" ... ``` @@ -280,6 +278,12 @@ else: # pragma: sys-platform-not-win32 Note the inverted sense of the pragma definitions, as the comments cause `coverage` to *not* consider that code block on this platform. +As of 2022-10-02 and `coverage-conditional-plugin==0.7.0` there is no way to +signal that an entire file should be excluded from coverage reporting on the +current platform. See +[this GitHub issue comment](https://github.com/wemake-services/coverage-conditional-plugin/issues/2#issuecomment-1263918296) +. + --- ## Imports used only in core plugins diff --git a/pyproject.toml b/pyproject.toml index 7086d166..bc3a32b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,8 +15,10 @@ omit = [ "tests/*", "venv/*", "dist.win32/*" ] plugins = [ "coverage_conditional_plugin" ] [tool.coverage.coverage_conditional_plugin.rules] -# Yes, the sense of all of these is inverted, because else it ends up -# inverted at *every* use. +# NB: The name versus content of all of these are inverted because of the way +# they're used. When a pragma cites one it causes that code block to +# **NOT** be considered for code coverage. +# See Contributin.md#test-coverage for more details. sys-platform-win32 = "sys_platform != 'win32'" sys-platform-not-win32 = "sys_platform == 'win32'" sys-platform-darwin = "sys_platform != 'darwin'"