Skip to content

Commit 76458d0

Browse files
committed
build: add Makefile targets for manifest.json linting
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 8427c6a commit 76458d0

2 files changed

Lines changed: 60 additions & 1 deletion

File tree

tools/make/lib/lint/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ include $(TOOLS_MAKE_LIB_DIR)/lint/git/Makefile
2727
include $(TOOLS_MAKE_LIB_DIR)/lint/javascript/Makefile
2828
include $(TOOLS_MAKE_LIB_DIR)/lint/julia/Makefile
2929
include $(TOOLS_MAKE_LIB_DIR)/lint/license-headers/Makefile
30+
include $(TOOLS_MAKE_LIB_DIR)/lint/manifest_json.mk
3031
include $(TOOLS_MAKE_LIB_DIR)/lint/markdown/Makefile
3132
include $(TOOLS_MAKE_LIB_DIR)/lint/package_json.mk
3233
include $(TOOLS_MAKE_LIB_DIR)/lint/pkgs/Makefile
@@ -51,7 +52,7 @@ include $(TOOLS_MAKE_LIB_DIR)/lint/typescript/Makefile
5152
# @example
5253
# make lint
5354
#/
54-
lint: lint-filenames lint-javascript lint-markdown lint-c lint-python lint-julia lint-r lint-shell lint-typescript lint-conf lint-pkg-json lint-repl-help lint-license-headers lint-editorconfig
55+
lint: lint-filenames lint-javascript lint-markdown lint-c lint-python lint-julia lint-r lint-shell lint-typescript lint-conf lint-pkg-json lint-manifest-json lint-manifest-json-deps lint-repl-help lint-license-headers lint-editorconfig
5556

5657
.PHONY: lint
5758

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#/
2+
# @license Apache-2.0
3+
#
4+
# Copyright (c) 2026 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+
# VARIABLES #
20+
21+
# Define the path of the manifest.json linter executable:
22+
MANIFEST_JSON_LINTER ?= $(TOOLS_PKGS_DIR)/lint/manifest-json/bin/cli
23+
24+
# Define the command-line options to be used when invoking the executable:
25+
MANIFEST_JSON_LINTER_FLAGS ?=
26+
27+
# Define the path of the manifest.json dependency linter executable:
28+
MANIFEST_JSON_DEPS_LINTER ?= $(TOOLS_PKGS_DIR)/lint/manifest-json-deps/bin/cli
29+
30+
# Define the command-line options to be used when invoking the executable:
31+
MANIFEST_JSON_DEPS_LINTER_FLAGS ?=
32+
33+
34+
# RULES #
35+
36+
#/
37+
# Lints `manifest.json` files.
38+
#
39+
# @example
40+
# make lint-manifest-json
41+
#/
42+
lint-manifest-json: $(NODE_MODULES)
43+
$(QUIET) echo 'Linting manifest.json files...'
44+
$(QUIET) NODE_PATH="$(NODE_PATH)" $(NODE) "$(MANIFEST_JSON_LINTER)" $(MANIFEST_JSON_LINTER_FLAGS) "$(ROOT_DIR)"
45+
46+
.PHONY: lint-manifest-json
47+
48+
#/
49+
# Lints `manifest.json` dependencies.
50+
#
51+
# @example
52+
# make lint-manifest-json-deps
53+
#/
54+
lint-manifest-json-deps: $(NODE_MODULES)
55+
$(QUIET) echo 'Linting manifest.json dependencies...'
56+
$(QUIET) NODE_PATH="$(NODE_PATH)" $(NODE) "$(MANIFEST_JSON_DEPS_LINTER)" $(MANIFEST_JSON_DEPS_LINTER_FLAGS) "$(ROOT_DIR)"
57+
58+
.PHONY: lint-manifest-json-deps

0 commit comments

Comments
 (0)