Add knip unused code & dependency analyser (#1441)

This commit is contained in:
Michael Telatynski
2024-01-18 10:10:51 +00:00
committed by GitHub
parent ae187445af
commit efde228da6
10 changed files with 697 additions and 351 deletions

View File

@@ -138,6 +138,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: "yarn"
- name: Install Deps

View File

@@ -67,6 +67,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: "yarn"
env:
# Workaround for https://github.com/actions/setup-node/issues/317

View File

@@ -55,6 +55,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: "yarn"
# Does not need branch matching as only analyses this layer

View File

@@ -53,6 +53,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: "yarn"
- name: Install Deps

View File

@@ -96,6 +96,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: "yarn"
# Does not need branch matching as only analyses this layer

View File

@@ -12,6 +12,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: "yarn"
# Does not need branch matching as only analyses this layer
@@ -33,6 +34,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: "yarn"
# Does not need branch matching as only analyses this layer
@@ -50,6 +52,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: "yarn"
# Does not need branch matching as only analyses this layer
@@ -58,3 +61,20 @@ jobs:
- name: Run Linter
run: "yarn lint:workflows"
analyse_dead_code:
name: "Analyse Dead Code"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: "yarn"
- name: Install Deps
run: "yarn install --frozen-lockfile"
- name: Run linter
run: "yarn run lint:knip"