Skip to content

Commit d18c4db

Browse files
kylebonnicijhedberg
authored andcommitted
CI: dts-linter: Move package.json to ./scripts/ci
Move package.json and package-lock.json to ./scripts/ci Signed-off-by: Kyle Bonnici <[email protected]>
1 parent 02a99c6 commit d18c4db

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

.github/workflows/compliance.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,10 @@ jobs:
6666
node-version: "lts/*"
6767
cache: npm
6868
check-latest: true
69+
cache-dependency-path: ./scripts/ci/package-lock.json
6970

7071
- name: Install Node dependencies
71-
run: npm ci
72+
run: npm --prefix ./scripts/ci ci
7273

7374
- name: Run Compliance Tests
7475
continue-on-error: true

doc/contribute/style/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ standards. You can also run it manually like this:
9898
For individual files
9999
.. code-block:: bash
100100
101-
npx dts-linter --format --file board.dts --file board_pinctrl.dtsi --patchFile diff.patch
101+
npx --prefix ./scripts/ci dts-linter --format --file board.dts --file board_pinctrl.dtsi --patchFile diff.patch
102102
git apply diff.patch
103103
104104
You can omit ``--file`` and this will format all files under the directory where the command
@@ -108,7 +108,7 @@ should look for files. This option is also used to make the paths relative in th
108108
You can also fix in place with
109109
.. code-block:: bash
110110
111-
npx dts-linter --formatFixAll
111+
npx --prefix ./scripts/ci dts-linter --formatFixAll
112112
113113
114114
Editor Integration

scripts/ci/check_compliance.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ def ensure_npx(self) -> bool:
504504
try:
505505
# --no prevents npx from fetching from registry
506506
subprocess.run(
507-
[self.NPX_EXECUTABLE, "--no", 'dts-linter', "--", "--version"],
507+
[self.NPX_EXECUTABLE, "--prefix", "./scripts/ci", "--no", 'dts-linter', "--", "--version"],
508508
stdout=subprocess.DEVNULL,
509509
stderr=subprocess.DEVNULL,
510510
check=True,
@@ -560,9 +560,9 @@ def run(self):
560560
temp_patch_files.append(temp_patch)
561561

562562
cmd = [
563-
"npx", "--no", "dts-linter", "--",
564-
"--outputFormat", "json",
565-
"--format",
563+
"npx", "--prefix", "./scripts/ci", "--no",
564+
"dts-linter", "--", "--outputFormat",
565+
"json", "--format",
566566
"--patchFile", temp_patch,
567567
]
568568
for file in batch:
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)