Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: qa unused function #17

Open
wants to merge 48 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
c5739e1
chore: add knip to dev dependencies
gitcoindev Nov 27, 2023
a7557b6
chore: add knip script to package.json
gitcoindev Nov 27, 2023
f04b30b
chore: add knip configuration file
gitcoindev Nov 27, 2023
c226f29
chore: add knip github action workflow
gitcoindev Nov 27, 2023
b48d0a4
Merge pull request #15 from gitcoindev/feat-knip-ci
gitcoindev Nov 27, 2023
29337f2
feat: knip qa
gitcoindev Nov 27, 2023
e907e18
chore: switch to knip-reporter fork
gitcoindev Nov 27, 2023
d5c0163
chore: switch to knip-reporter fork
gitcoindev Nov 27, 2023
15b5e44
Update knip.yml
gitcoindev Nov 27, 2023
74a4f3d
Update knip.yml
gitcoindev Nov 27, 2023
7604840
chore: add checkout step to run knip workflow
gitcoindev Nov 27, 2023
f5c8b25
chore: add checkout step to run knip workflow
gitcoindev Nov 27, 2023
4321576
Merge branch 'development' into knip-qa
gitcoindev Nov 27, 2023
58e354f
chore: yarn install in knip workflow
gitcoindev Nov 27, 2023
2f9dba4
chore: add knip ci cmd
gitcoindev Nov 27, 2023
f74c8d6
chore: typescript dev back to 4.9.5
gitcoindev Nov 27, 2023
69b699d
chore: switch to actions supported 2.43.0
gitcoindev Nov 27, 2023
e46b53f
chore: switch to actions supported 2.43.0
gitcoindev Nov 27, 2023
48943a8
Revert "chore: switch to actions supported 2.43.0"
gitcoindev Nov 27, 2023
dc132a6
chore: knip ci exit code skipped in github action
gitcoindev Nov 27, 2023
027c099
chore: use default github actions permissions
gitcoindev Nov 27, 2023
e08cfea
chore: yarn install knip
gitcoindev Nov 27, 2023
cd65487
chore: set permission to knip
gitcoindev Nov 27, 2023
4b78f02
Merge pull request #16 from gitcoindev/knip-qa
gitcoindev Nov 27, 2023
eb81e52
test: qa unused function
gitcoindev Nov 27, 2023
c7be67d
chore: switch to upstream knip-reporter
gitcoindev Nov 27, 2023
5541505
test: catch me 3
gitcoindev Nov 27, 2023
e0a4417
chore: enable extended output on 2.43.0
gitcoindev Nov 27, 2023
86b52a9
chore: knip use 1.2.2
gitcoindev Nov 27, 2023
31bbe00
chore: bump [email protected]
gitcoindev Nov 27, 2023
ab46929
chore: bump knip-reporter to v1.2.4
gitcoindev Nov 28, 2023
61169fd
chore: bump knip-reporter to v1.2.5
gitcoindev Nov 28, 2023
481465b
chore: bump knip-reporter to v1.2.6
gitcoindev Nov 28, 2023
3dadb79
chore: bump knip-reporter to v1.2.6
gitcoindev Nov 28, 2023
8307485
chore: bump knip-reporter to v1.2.8
gitcoindev Nov 28, 2023
a6a4a32
chore: bump knip-reporter to v1.2.9
gitcoindev Nov 28, 2023
dee528d
chore: switch knip workflow to Node LTS and upstream knip reporter
gitcoindev Dec 13, 2023
35f9f18
chore: switch knip script in package.json to `json` default in v3
gitcoindev Dec 13, 2023
917a501
chore: upgrade knip to latest release v3.7.1
gitcoindev Dec 13, 2023
37d7444
chore: enable warning level annotations in knip reporter
gitcoindev Dec 13, 2023
603044a
chore: remove tree command used for debugging
gitcoindev Dec 13, 2023
4abb39e
chore: ignore_result to true to show warnings
gitcoindev Dec 13, 2023
5248548
chore: revert back to gitcoindev/[email protected]
gitcoindev Dec 13, 2023
cf651d8
Revert "chore: revert back to gitcoindev/[email protected]"
gitcoindev Dec 13, 2023
037127b
chore: upgrade typescript dev dependency to 5.0.4
gitcoindev Dec 13, 2023
892ca81
chore: bump ts-jest to 29.1.0 with typescript 5 support
gitcoindev Dec 13, 2023
ea185d5
chore: upgrade jest to 29 and types/node dev dependencies
gitcoindev Dec 13, 2023
d2583a6
chore: knip ingore_results set to false
gitcoindev Dec 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/knip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Knip

on:
pull_request:

permissions: write-all

jobs:
run-knip:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20.10.x

- name: tree
run: |
pwd
yarn install

- name: Post the knip results
uses: Codex-/knip-reporter@v2
with:
verbose: true
comment_id: ${{ github.workflow }}-reporter
command_script_name: knip-ci
annotations: true
ignore_results: false
11 changes: 11 additions & 0 deletions knip.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type { KnipConfig } from "knip";

const config: KnipConfig = {
entry: ["src/index.ts"],
project: ["src/**/*.ts"],
ignore: ["src/types/config.ts"],
ignoreExportsUsedInFile: true,
ignoreDependencies: [],
};

export default config;
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
"clean": "rimraf ./dist ./lib ./node_modules",
"format:check": "prettier -c src/**/*.ts",
"format": "prettier --write src",
"knip": "knip",
"knip-ci": "knip --no-exit-code --reporter json",
"lint": "eslint --ext .ts ./src",
"start:serverless": "tsx src/adapters/github/github-actions.ts",
"start:watch": "nodemon --exec 'yarn start'",
Expand Down Expand Up @@ -72,17 +74,18 @@
"@types/jest": "^28.1.0",
"@types/libsodium-wrappers": "^0.7.10",
"@types/lodash": "^4.14.197",
"@types/node": "^14.18.37",
"@types/node": "^18.0.0",
"@types/source-map-support": "^0.5.6",
"eslint": "^8.43.0",
"jest": "^26.6.3",
"jest": "^29.0.0",
"knip": "^3.7.1",
"nock": "^13.0.5",
"rimraf": "3.0.2",
"smee-client": "^1.2.2",
"source-map-support": "^0.5.21",
"supabase": "^1.38.1",
"ts-jest": "^26.4.4",
"typescript": "^4.9.5"
"ts-jest": "^29.1.0",
"typescript": "^5.0.4"
},
"engines": {
"node": ">=18"
Expand Down
15 changes: 15 additions & 0 deletions src/handlers/payout/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,21 @@
};
};

export const unusedAction = async () => {

Check failure on line 334 in src/handlers/payout/action.ts

View workflow job for this annotation

GitHub Actions / knip-reporter-annotations-check

src/handlers/payout/action.ts#L334

'unusedAction' is an unused export
// catch me!
await addLabelToIssue("unusedAction");
};

export const unusedAction2 = async () => {

Check failure on line 339 in src/handlers/payout/action.ts

View workflow job for this annotation

GitHub Actions / knip-reporter-annotations-check

src/handlers/payout/action.ts#L339

'unusedAction2' is an unused export
// catch me!
await addLabelToIssue("unusedAction2");
};

export const unusedAction3 = async () => {

Check failure on line 344 in src/handlers/payout/action.ts

View workflow job for this annotation

GitHub Actions / knip-reporter-annotations-check

src/handlers/payout/action.ts#L344

'unusedAction3' is an unused export
// catch me 3!
await addLabelToIssue("unusedAction3");
};

export const handleIssueClosed = async (
creatorReward: RewardsResponse,
assigneeReward: RewardsResponse,
Expand Down
Loading
Loading