Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 14, 2025

This PR adds a comprehensive .github/copilot-instructions.md file that provides detailed guidance for GitHub Copilot coding agents working with the cpp-linter-hooks repository.

What's Included

The instructions cover all essential development workflows with validated commands and precise timing information:

🚀 Setup & Build Process

  • Complete dependency installation steps (pip install .[dev] ~10s, clang tools ~2s)
  • Build and test processes with explicit timeout warnings (test suite: 5.5 minutes - NEVER CANCEL)
  • Python linting validation (ruff check ., ruff format --check .)

🧪 Testing & Validation

  • Full test suite execution with coverage reporting
  • Manual hook testing scenarios with working examples:
# Create malformed C++ file and test formatting
echo '#include <stdio.h>
int main() {for (;;) break; printf("Hello world!\n");return 0;}' > /tmp/test.c
clang-format-hook --version 21 --verbose /tmp/test.c

🛠 Hook Functionality

  • Direct testing of clang-format-hook and clang-tidy-hook commands
  • Workarounds for version checking issues and network timeouts in sandboxed environments
  • Project structure navigation and key file locations

📋 Comprehensive Reference

  • Repository structure with explanations of key directories (cpp_linter_hooks/, tests/, testing/)
  • Entry points and command references
  • Common troubleshooting scenarios
  • CI/CD pipeline notes with timeout specifications

Validation

Every command, timing estimate, and workflow described in the instructions has been thoroughly tested and validated to ensure reliability. The instructions follow the imperative tone requirement and include explicit "NEVER CANCEL" warnings for long-running operations.

This provides coding agents with complete, accurate guidance to work effectively with the codebase from a fresh clone, eliminating the need for extensive exploration or trial-and-error approaches.

Fixes #110.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@codecov
Copy link

codecov bot commented Sep 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.44%. Comparing base (d56ca2a) to head (b6c75c0).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #111   +/-   ##
=======================================
  Coverage   94.44%   94.44%           
=======================================
  Files           3        3           
  Lines         108      108           
=======================================
  Hits          102      102           
  Misses          6        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…ands and timing

Co-authored-by: shenxianpeng <3353385+shenxianpeng@users.noreply.github.com>
Copilot AI changed the title [WIP] ✨ Set up Copilot instructions Add comprehensive GitHub Copilot instructions for cpp-linter-hooks development Sep 14, 2025
Copilot AI requested a review from shenxianpeng September 14, 2025 17:20
Copilot finished work on behalf of shenxianpeng September 14, 2025 17:20
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Sep 15, 2025
@sonarqubecloud
Copy link

@shenxianpeng shenxianpeng deleted the copilot/fix-110 branch September 16, 2025 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ Set up Copilot instructions

2 participants