forcedotcom

verification

Verification steps for code changes. Use after ANY code change to ensure quality, or when creating plans because those should include verification steps.

forcedotcom 1,014 451 Updated 3mo ago

Resources

1
GitHub

Install

npx skillscat add forcedotcom/salesforcedx-vscode/verification

Install via the SkillsCat registry.

SKILL.md

Verification

Do each of these steps, in order. Do not move to a step unless all previous are passing. Run these commands from the repo level. If you make any changes, go back to step 1.

  1. npm run compile - See references/compile.md for commands and errors

  2. npm run lint - fix any new errors or warnings

  3. npm run test - See [references/unit-tests.md]

  4. npm run vscode:bundle to ensure the extensions still bundle

  5. If working in packages with test:web/test:desktop scripts:

    • Package-level only (not in root): salesforcedx-vscode-core, salesforcedx-vscode-services (web), salesforcedx-vscode-org-browser, salesforcedx-vscode-metadata, salesforcedx-vscode-apex-testing, playwright-vscode-ext
    • Run from root: npm run test:web -w <package-name> / npm run test:desktop -w <package-name>
    • Skip if not in these packages
    • Run with --retries 0 for fast feedback and less flakes
  6. npx knip - check for dead code related to your changes

  • Fix ALL unused exports - if knip shows unused exports, remove them immediately unless they're used for tests. Exception for ts4023 reasons
  • Don't leave any exports that are only used within the same file
  1. check for dupes npm run check:dupes and then look in jscpd-report to make sure none of your changes are flagged.

Rules

  • Don't change /src AND /test together (except imports/renames)
  • Be aware of wireit caching; You can look in the bundle to see (and also turn off minify if that helps debug)
  • Port 3001 for tests (not 3000 - Docker/Grafana uses that)
  • All commands run from salesforcedx-vscode root; use -w to specify runs for a single package. Never cd into a package.
  • do not say a test/compile/lint failure was "pre-existing" without running the same operation on a previous version of the code before the current un-pushed commits began.

Troubleshooting

  • if knip fails due to ERR_MODULE_NOT_FOUND you can rm -rf ~/.npm/_npx and re-run it. You'll have to agree to it (or pass -y to it)

Plans

When creating plans in plan mode, always include verification steps after the "actual" todos. The verification steps should follow this checklist.

References

  • references/unit-tests.md - Running unit tests
  • references/compile.md - Compilation commands and TS4023 errors
  • @.claude/skills/playwright-e2e/ - Playwright E2E testing guidelines