Skip to content

Commit d61142c

Browse files
committed
Add command for computing TypeScript declaration coverage
1 parent 19c19d1 commit d61142c

File tree

3 files changed

+82
-0
lines changed

3 files changed

+82
-0
lines changed

tools/make/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ include $(TOOLS_MAKE_LIB_DIR)/test-cov/Makefile
9999
include $(TOOLS_MAKE_LIB_DIR)/test-fixtures/Makefile
100100
include $(TOOLS_MAKE_LIB_DIR)/tools-test/Makefile
101101
include $(TOOLS_MAKE_LIB_DIR)/tools-test-cov/Makefile
102+
include $(TOOLS_MAKE_LIB_DIR)/types-cov/Makefile
102103
include $(TOOLS_MAKE_LIB_DIR)/wasm/Makefile
103104
include $(TOOLS_MAKE_LIB_DIR)/workshops/Makefile
104105

tools/make/lib/types-cov/Makefile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#/
2+
# @license Apache-2.0
3+
#
4+
# Copyright (c) 2019 The Stdlib Authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#/
18+
19+
# RULES #
20+
21+
#/
22+
# Computes TypeScript declaration coverage.
23+
#
24+
# @example
25+
# make types-cov
26+
#/
27+
types-cov:
28+
$(QUIET) awk 'NR == FNR {num = $$0; next} { print num/$$0*100 }' <($(MAKE) -f $(this_file) list-pkgs-types | wc -l) <($(MAKE) -f $(this_file) list-lib-pkgs | wc -l)
29+
30+
.PHONY: types-cov

tools/make/lib/types-cov/README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<!--
2+
3+
@license Apache-2.0
4+
5+
Copyright (c) 2019 The Stdlib Authors.
6+
7+
Licensed under the Apache License, Version 2.0 (the "License");
8+
you may not use this file except in compliance with the License.
9+
You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing, software
14+
distributed under the License is distributed on an "AS IS" BASIS,
15+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
See the License for the specific language governing permissions and
17+
limitations under the License.
18+
19+
-->
20+
21+
# TypeScript Declaration Coverage
22+
23+
> TypeScript declaration coverage commands.
24+
25+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
26+
27+
<section class="intro">
28+
29+
This directory contains [`make`][make] commands for generating TypeScript declaration coverage reports.
30+
31+
</section>
32+
33+
<!-- /.intro -->
34+
35+
<!-- Section to include notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
36+
37+
<section class="notes">
38+
39+
</section>
40+
41+
<!-- /.notes -->
42+
43+
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
44+
45+
<section class="links">
46+
47+
[make]: https://www.gnu.org/software/make/
48+
49+
</section>
50+
51+
<!-- /.links -->

0 commit comments

Comments
 (0)