Skip to content

Replace separate lint step with comprehensive quality checks in CI#29

Merged
devill merged 5 commits into
devill:mainfrom
pjurczynski:feature/ci-quality-integration
Jul 10, 2025
Merged

Replace separate lint step with comprehensive quality checks in CI#29
devill merged 5 commits into
devill:mainfrom
pjurczynski:feature/ci-quality-integration

Conversation

@pjurczynski

@pjurczynski pjurczynski commented Jul 9, 2025

Copy link
Copy Markdown
Collaborator

Summary

  • Replace separate lint step with comprehensive quality checks in CI workflow
  • Consolidate quality validation into single step that includes linting plus additional checks
  • Improve CI efficiency by eliminating redundant linting step
  • run quality checks only on files that were touched by the PR

Changes

  • Updated .github/workflows/ci.yml to use npm run quality instead of npm run lint
  • Quality script already includes ESLint plus additional code quality validations
  • Removes duplication between separate lint step and quality checks

Benefits

  • 🔄 Consolidated Quality Gate: Single step for all quality validations
  • 📊 Comprehensive Checks: Includes linting, complexity, duplication, code smells, etc.
  • Improved Efficiency: Eliminates redundant linting step
  • 🎯 Better Coverage: Catches more quality issues beyond just linting

Quality Checks Included

  • ESLint violations and errors
  • Code complexity analysis
  • Duplication detection
  • File size violations
  • Function size violations
  • Code comments detection
  • Feature envy detection
  • Unused method detection

Test Plan

  • Verify CI workflow runs successfully with quality checks
  • Confirm all quality validations are executed
  • Ensure workflow fails appropriately on quality violations
  • Validate that linting is still included in quality checks

🤖 Generated with Claude Code

@pjurczynski
pjurczynski force-pushed the feature/ci-quality-integration branch from 9fab335 to 8e4da3d Compare July 9, 2025 11:30
@pjurczynski
pjurczynski marked this pull request as draft July 9, 2025 11:41
pjurczynski and others added 4 commits July 9, 2025 23:51
The quality script already includes linting along with other comprehensive code quality checks (complexity, duplication, code smells, etc.), so the separate lint step is redundant.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@pjurczynski
pjurczynski force-pushed the feature/ci-quality-integration branch from 8e4da3d to 34a1f46 Compare July 9, 2025 22:08
GitHub Actions uses shallow clones by default (fetch-depth: 1) which only
fetches the latest commit. Our quality check script uses `git diff --name-only
HEAD~1 HEAD` to identify changed files in push events, but HEAD~1 doesn't
exist in a shallow clone with only one commit.

Setting fetch-depth: 2 ensures that both HEAD and HEAD~1 are available,
allowing the script to compare the current commit with its parent to determine
which TypeScript files have changed and need quality checking.

This prevents the "fatal: bad object [SHA]" error that occurs when the script
tries to reference HEAD~1 in a shallow clone environment.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@pjurczynski

Copy link
Copy Markdown
Collaborator Author

#33 confirms that errors are caught as expected.

@pjurczynski
pjurczynski marked this pull request as ready for review July 9, 2025 22:19
@devill
devill merged commit e7b9a98 into devill:main Jul 10, 2025
2 checks passed
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.

2 participants