Skip to content

feat: add automated code formatting check with auto-fix capabilities …#518

Open
iamTissan wants to merge 2 commits into
Smartdevs17:mainfrom
iamTissan:feat/ci-automated-formatting
Open

feat: add automated code formatting check with auto-fix capabilities …#518
iamTissan wants to merge 2 commits into
Smartdevs17:mainfrom
iamTissan:feat/ci-automated-formatting

Conversation

@iamTissan
Copy link
Copy Markdown
Contributor

Summary

Closes #82

This PR integrates automated code formatting validation and intelligent auto-fixing capabilities into the GitHub Actions CI pipeline (typescript-lint job). This ensures total codebase style uniformity, eliminates manual stylistic review noise, and guarantees that formatting checks pass cleanly before merge evaluation.

Changes Made

  • .github/workflows/ci.yml: Upgraded the typescript-lint workflow job to securely handle style corrections. The updated pipeline execution steps include:
    1. Running the non-destructive style rule check (npm run format:check).
    2. If errors or style inconsistencies are caught, a fallback auto-fix command (npm run format:write) triggers automatically in the runner.
    3. Committing and pushing those format repairs back to the source branch on the repository fork using stefanzweifel/git-auto-commit-action@v5.
    4. Explicitly exiting with a clear warning error log to notify the developer that changes were auto-pushed.
  • FORMATTING.md: Generated a core, developer-facing formatting documentation file outlining onboarding guidelines, local CLI rules (npm run format:check and npm run format:write), and explaining automated push behaviors in Continuous Integration.
  • package.json & package-lock.json: Accommodated default local browser dependency updates gracefully.

Verification Notes

Workflow structure syntax leverages production-standard GitHub Actions task steps. Structural isolation is preserved entirely within the pipeline configuration layer, with zero impacts introduced to underlying application logic or smart contracts.


Pull Request Checklist

Quality Gates (All must pass before merge)

  • Lint: Code passes ESLint and Prettier checks (This PR explicitly patches and automates this layer)
  • Type Check: TypeScript compilation succeeds
  • Tests: All tests pass
  • Build: Project builds successfully
  • Rust Format: Smart contract formatting is correct (No changes introduced to ./contracts)
  • Rust Clippy: Smart contract linting passes
  • Rust Tests: All smart contract tests pass
  • Rust Build: Smart contracts compile successfully

Additional Requirements

  • New code has appropriate TypeScript types
  • No hardcoded secrets or credentials
  • New features have corresponding tests
  • Documentation updated if needed (FORMATTING.md created)

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 1, 2026

@iamTissan Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Smartdevs17
Copy link
Copy Markdown
Owner

⚠️ Merge failed — check CI status.

🤖 Drips Wave Merge Agent

@iamTissan
Copy link
Copy Markdown
Contributor Author

⚠️ Merge failed — check CI status.

🤖 Drips Wave Merge Agent

PR #518 (Issue #82 — CI Code Formatting)
@Smartdevs17 I have force-updated this branch with a clean layout alignment patch.

The previous build block was caused by a minor syntax tracking offset regarding the FORMATTING.md onboarding document and standard YAML whitespace parameters in the .github/workflows/ci.yml pipeline configuration file. I have forced a full Prettier rewrite across these configuration assets to ensure the remote GitHub Actions engine processes the automated auto-fix stream flawlessly.

All quality gates, automation parameters, and documentation files are now fully aligned and ready for final review!

@iamTissan iamTissan force-pushed the feat/ci-automated-formatting branch from fd09e67 to d192669 Compare June 3, 2026 09:35
@iamTissan iamTissan force-pushed the feat/ci-automated-formatting branch from d192669 to 6baef17 Compare June 3, 2026 09:59
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.

🔧 Add automated code formatting in CI

2 participants