Skip to content

Conversation

@satyanvm
Copy link
Contributor

@satyanvm satyanvm commented Dec 6, 2025

What kind of change does this PR introduce?

This PR adds a GitHub Action to check for unused files, exports and dependencies and cleans up existing unused code.

Issue Number:

Fixes #99

Did you add tests for your changes?

N/A

Snapshots/Videos:

N/A

If relevant, did you update the documentation?

N/A

Summary

There are unused code in the repository which this PR cleans up and also adds GitHub Action that checks for unused code on every PR.
#99

Does this PR introduce a breaking change?

No

Other information

I have used Knip tool for checking unused code, it's a widely popular and well maintained tool in the TypeScript/JavaScript community.

Have you read the contributing guide?

Yes

Summary by CodeRabbit

  • New Features

    • Enhanced CI/CD pipeline with automated code quality validation checks to ensure codebase integrity and identify unused dependencies.
  • Refactor

    • Removed multiple utility components from the codebase to streamline the project structure and eliminate unused elements.

✏️ Tip: You can customize this high-level summary in your review settings.

@github-actions
Copy link

github-actions bot commented Dec 6, 2025

Our Pull Request Approval Process

This PR will be reviewed according to our:

  1. Palisadoes Contributing Guidelines

  2. AI Usage Policy

Your PR may be automatically closed if:

  1. Our PR template isn't filled in correctly

  2. You haven't correctly linked your PR to an issue

Thanks for contributing!

@coderabbitai
Copy link

coderabbitai bot commented Dec 6, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Introduces Knip for detecting unused files, dependencies, and exports in the CI pipeline. Adds Knip configuration, a CI workflow step to validate code cleanliness, the knip devDependency, and removes four identified unused React component files.

Changes

Cohort / File(s) Summary
CI/Configuration Setup
.github/workflows/pull-request.yml, knip.json, package.json
Added knip devDependency (^5.71.0), created knip.json with project globs for src and docs directories and ignore rules for Docusaurus, and inserted a new CI step to run npx knip for unused code detection in the Code-Quality-Checks job.
Removed Unused Components
src/utils/ActionButton.tsx, src/utils/HomeCallToAction.tsx, src/utils/Section.tsx, src/utils/TwoColumns.tsx
Deleted four React functional component files that were identified as unused: ActionButton (anchor-based button wrapper), HomeCallToAction (call-to-action fragment with ActionButtons), Section (dynamic element wrapper with variants), and TwoColumns (two-column layout component).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Verify the four removed component files are truly unused across the codebase and no imports remain
  • Confirm the knip.json configuration appropriately targets the project structure and correctly excludes Docusaurus dependencies
  • Validate the new workflow step placement and execution within the CI pipeline
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3241ecf and 609e006.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (7)
  • .github/workflows/pull-request.yml (1 hunks)
  • knip.json (1 hunks)
  • package.json (1 hunks)
  • src/utils/ActionButton.tsx (0 hunks)
  • src/utils/HomeCallToAction.tsx (0 hunks)
  • src/utils/Section.tsx (0 hunks)
  • src/utils/TwoColumns.tsx (0 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@satyanvm satyanvm closed this Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DevDocs: Unused Code Files, Dependencies, Exports cleanup and detection with GitHub Action

1 participant