diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..5c7d528 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +# Replace with real usernames or teams in your organization. +* @dimanikulin/dimanikulin diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..a3f743d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,36 @@ +--- +name: Bug report +about: Report a reproducible bug in the project +title: "[BUG] " +labels: bug +assignees: "" +--- + +## Description + +A clear and concise description of the bug. + +## Steps to reproduce + +1. Go to '...' +2. Run '...' +3. See error + +## Expected behavior + +Describe what you expected to happen. + +## Actual behavior + +Describe what actually happened. + +## Environment + +- OS: +- Compiler: +- CMake version: +- Commit/branch: + +## Logs or screenshots + +Add any relevant output, stack traces, or screenshots. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..550b34b --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,23 @@ +## Summary + +Describe what this PR changes and why. + +## Type of change + +- [ ] Bug fix +- [ ] New feature +- [ ] Refactor +- [ ] Documentation update +- [ ] CI/workflow update + +## Checklist + +- [ ] Code compiles locally +- [ ] Relevant tests added or updated +- [ ] Existing tests pass +- [ ] Documentation updated where needed +- [ ] No unrelated changes included + +## Validation + +List the commands or steps used to verify this change. diff --git a/.github/copilot/copilot-instructions.md b/.github/copilot/copilot-instructions.md new file mode 100644 index 0000000..acb642b --- /dev/null +++ b/.github/copilot/copilot-instructions.md @@ -0,0 +1,27 @@ +# Copilot Instructions + +This repository is a C++ CMake template project. + +## Project focus + +- Keep changes small, explicit, and testable. +- Preserve existing public interfaces unless the task asks for API changes. +- Prefer portable C++ and cross-platform CMake. + +## Coding rules + +- Follow the existing formatting style in the file being edited. +- Avoid broad refactors in bug-fix pull requests. +- Add or update unit tests in `tests/` when behavior changes. +- Keep includes minimal and avoid unused dependencies. + +## Build and test expectations + +- Configure with CMake and build with standard targets. +- Run unit tests via CTest when tests are affected. +- Keep warnings low and do not introduce obvious analyzer issues. + +## Documentation + +- Update README or code comments when behavior or usage changes. +- Keep docs concise and aligned with implementation. diff --git a/.github/instructions/security.instructions.md b/.github/instructions/security.instructions.md new file mode 100644 index 0000000..734e034 --- /dev/null +++ b/.github/instructions/security.instructions.md @@ -0,0 +1,15 @@ +--- +description: "Use when working on authentication, authorization, secrets, input validation, dependency risk, secure defaults, or security-sensitive code paths." +applyTo: "**/*" +--- + +# Security Instructions + +- Do not introduce hardcoded secrets, tokens, passwords, private keys, or sample credentials. +- Prefer secure defaults and fail-closed behavior for configuration, permissions, and feature toggles. +- Validate and sanitize untrusted input at boundaries, including CLI arguments, file paths, environment variables, and network data. +- Avoid unsafe shell execution patterns and command construction from untrusted input. +- Keep filesystem operations explicit and bounded; avoid path traversal risks when joining or normalizing paths. +- Minimize dependency additions. If a new dependency is necessary, prefer well-maintained packages with a clear security posture. +- When changing build, packaging, or CI workflows, avoid expanding privileges or exposing secrets in logs and artifacts. +- Flag security-relevant tradeoffs in the final response, especially when a safer design would require a larger follow-up change. diff --git a/.github/workflows/copilot-review.yml b/.github/workflows/copilot-review.yml new file mode 100644 index 0000000..78bb082 --- /dev/null +++ b/.github/workflows/copilot-review.yml @@ -0,0 +1,30 @@ +name: Copilot Review + +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + +permissions: + contents: read + pull-requests: write + +jobs: + copilot-review: + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest + steps: + - name: Post Copilot review marker + uses: actions/github-script@v7 + with: + script: | + const body = [ + 'Copilot review workflow is enabled for this pull request.', + '', + 'Use this workflow as an integration point for automated review tooling.' + ].join('\n'); + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + body + }); diff --git a/README.md b/README.md index 4e383d8..f780410 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ Any feedback is greatly appreciated! | | **MD templates** | N/A | Attractive main *README* (*Logo*, *Badges*, *Quick Links*, *Tables*, *Diagrams*, *References*) | | | **Static analysis** | Yes | By *CppCheck* GitHub Action and *clang-tidy* | | | **Clean** | Yes | Using *GitHub Actions* CI step | -| | **Code Checks** | Yes | By Python scripts: suspect words, boilerplates, file size, doc level | +| | **Code Checks** | Yes | By Python scripts: suspect words, boilerplates, file size | | | **Building** | Yes | Build with *Ninja* and *CMake,* Use of *Ccache* to speed up the rebuilds | | | **Testing** | Yes | Unit testing with *GTest* and *CTests* (with an option to enable), uploading results to *GitHub* | | | **Coverage** | Yes | Using *GCov* and *LCov*, ziping by *7xip*, uploading report to *GitHub* | @@ -77,6 +77,8 @@ Any feedback is greatly appreciated! | | **MarkDown Lint** | Yes | Using *markdownlint-cli2* | | | **Packaging** | Yes | Stripping binaries, ziping by *7xip*, uploading binaries to *GitHub*, Windows package by *WiX* | | | **Documentation** | Yes | Using *Doxygen*, Source view by *gitdiagram* | +| | **Documentation level** | Yes | Using *py* script | + | | **CI** | Yes | Using *GitHub Actions* CI workflows for *Windows,* *Linux* and *MacOS* operation systems | | | **gitignore** | N/A | Uses well known *ignore file* [from this repo](https://github.com/github/gitignore) | | | **QT** | Yes | Installed on CI only | @@ -316,7 +318,6 @@ You will need to update in boilerplate.txt to start using th - Compares with the max allowed. # Coming features -- documentation_level_check - Package manager support for Mac and Linux - Dockerfile - QT support (CI and local) @@ -324,8 +325,6 @@ You will need to update in boilerplate.txt to start using th - Publishing documentation on GitHub Pages - Git Copilot Skills - https://github.com/skills/expand-your-team-with-copilot/?tab=readme-ov-file, - https://www.linkedin.com/posts/%D1%80%D0%BE%D0%BC%D0%B0%D0%BD-%D0%BA%D0%BE%D0%B2%D0%B0%D0%BB%D1%8C%D1%81%D0%BA%D0%B8%D0%B9-5b736664_%D1%8F%D0%BA%D1%89%D0%BE-%D0%B2%D0%B0%D0%BC-%D0%BD%D0%B5-%D0%B2%D0%B8%D1%81%D1%82%D0%B0%D1%87%D0%B0%D0%BB%D0%BE-%D1%81%D0%BA%D1%96%D0%BB%D0%BE%D0%B2-%D1%82%D0%BE-%D1%94-%D0%B3%D0%B0%D1%80%D0%BD%D1%96-activity-7427966037691617283-HTLd/?utm_source=share&utm_medium=member_ios&rcm=ACoAAAlsWb8BPAbKMyDiy56H2KfpjQJ1GthAUxM, - Git Copilot Coding Agent - https://learn.microsoft.com/en-us/training/modules/github-copilot-code-agent/4-customize-extend-validate-copilot-code-agent -- github/copilot-instructions.md -- github/security.instructions.md - main file https://github.com/TheQtCompanyRnD/agent-skills