Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Cross-compilation linker configuration.
# Linux linkers are provided by the following Debian/Ubuntu packages:
# aarch64-linux-gnu-gcc → gcc-aarch64-linux-gnu
# i686-linux-gnu-gcc → gcc-i686-linux-gnu

[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"

[target.i686-unknown-linux-gnu]
linker = "i686-linux-gnu-gcc"
59 changes: 59 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"name": "analyzer-cli",
"build": {
"context": "..",
"dockerfile": "../containers/devcontainer/Dockerfile"
},
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=cached",
"workspaceFolder": "/workspace",
"remoteUser": "vscode",
// Mount the host container-engine socket into the container so that docker/podman
// CLI commands inside the devcontainer talk to the host daemon.
//
// Docker users : no extra setup required (the default path is used).
// Podman users : export CONTAINER_SOCKET_PATH to your Podman socket path
// BEFORE opening the devcontainer, e.g.:
// export CONTAINER_SOCKET_PATH=/run/user/1000/podman/podman.sock
// With rootless Podman the path is usually:
// $XDG_RUNTIME_DIR/podman/podman.sock
// Enable the socket if needed:
// systemctl --user enable --now podman.socket
"mounts": [
"source=${localEnv:CONTAINER_SOCKET_PATH:/var/run/docker.sock},target=/var/run/docker.sock,type=bind"
],
// Always expose a Docker-API-compatible DOCKER_HOST inside the container.
// Both the Docker CLI and the Podman CLI support this variable.
"containerEnv": {
"DOCKER_HOST": "unix:///var/run/docker.sock"
},
"postCreateCommand": "bash /usr/local/share/analyzer-devcontainer/post-create.sh",
"customizations": {
"vscode": {
"extensions": [
// Rust
"rust-lang.rust-analyzer",
"tamasfe.even-better-toml",
"vadimcn.vscode-lldb",
"fill-labs.dependi",
// Editor UX
"usernamehw.errorlens",
"eamodio.gitlens",
// Config / markup files
"redhat.vscode-yaml",
// CI + containers
"github.vscode-github-actions",
"ms-azuretools.vscode-docker",
// AI assistance
"github.copilot",
"github.copilot-chat"
],
"settings": {
"terminal.integrated.defaultProfile.linux": "bash",
"rust-analyzer.check.command": "clippy",
// Podman users: set this to "podman" so the Docker VS Code extension
// uses the Podman CLI instead of the docker binary.
"docker.dockerPath": "docker"
}
}
}
}
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
target/
.git/
.github/
.copilot/
dist/
coverage/
**/*.log
**/*.tmp
**/*.temp
**/.DS_Store
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2

[*.rs]
indent_size = 4

[*.{md,toml,json,yml,yaml}]
indent_size = 2

[*.ps1]
end_of_line = crlf

[*.{bat,cmd}]
end_of_line = crlf
14 changes: 14 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
* text=auto eol=lf

*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf

*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.pdf binary
*.zip binary
*.gz binary
*.tar binary
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @exein-io
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Bug report
description: Report a reproducible problem in the CLI.
title: "[Bug]: "
labels:
- bug
body:
- type: markdown
attributes:
value: |
Thanks for filing a bug report. Please provide enough detail for us to reproduce the issue.

- type: textarea
id: description
attributes:
label: What happened?
description: Describe the current behavior and the expected behavior.
validations:
required: true

- type: textarea
id: reproduction
attributes:
label: Reproduction steps
description: Include commands, flags, and sanitized sample inputs.
validations:
required: true

- type: input
id: version
attributes:
label: Analyzer CLI version
placeholder: e.g. v0.2.0
validations:
required: true

- type: textarea
id: environment
attributes:
label: Environment
description: OS, shell, Rust version if building from source, and any other relevant details.
validations:
required: true
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Security report
url: https://github.com/exein-io/analyzer-cli/security/advisories/new
about: Please use private reporting for security issues.
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Feature request
description: Suggest an improvement for the CLI or release workflow.
title: "[Feature]: "
labels:
- enhancement
body:
- type: textarea
id: problem
attributes:
label: Problem statement
description: What user or business problem does this solve?
validations:
required: true

- type: textarea
id: proposal
attributes:
label: Proposed solution
description: Describe the desired behavior, commands, or UX.
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives considered
description: List workarounds or other options you evaluated.
13 changes: 13 additions & 0 deletions .github/agents/release-manager.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: Release Manager
description: Prepares GitFlow-friendly releases, checks versioning, and keeps GitHub workflows aligned.
---

You are responsible for release readiness.

## Focus areas

- Review `GitVersion.yml`, `Cargo.toml`, and `.github/workflows/`.
- Ensure release assets cover supported targets.
- Verify branch strategy, tags, and release notes remain coherent.
- Summarize release risks before shipping.
18 changes: 18 additions & 0 deletions .github/agents/rust-cli-maintainer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Rust CLI Maintainer
description: Maintains the Rust command-line application, preserving CLI stability and quality gates.
---

You are the maintainer for a Rust CLI.

## Responsibilities

- Implement or refactor features in `src/`.
- Keep `clap` command definitions coherent and backwards compatible where possible.
- Update `README.md` for any visible behavior change.
- Validate with `cargo fmt`, `cargo clippy`, and `cargo test --locked`.

## Constraints

- Do not introduce broad fallback logic that hides failures.
- Prefer targeted edits and existing patterns over new abstractions.
13 changes: 13 additions & 0 deletions .github/agents/security-reviewer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: Security Reviewer
description: Reviews changes for CLI, workflow, and dependency security regressions.
---

You perform targeted security reviews.

## Focus areas

- secrets exposure in workflows, docs, and examples
- unsafe shell or release automation patterns
- error handling paths that leak credentials or hide failures
- dependency and supply-chain concerns in GitHub Actions changes
25 changes: 25 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Analyzer CLI Copilot instructions

This repository contains a Rust command-line application for Exein Analyzer.

## What matters most

- Preserve CLI compatibility and existing command names unless the task explicitly requires change.
- Keep `README.md`, release automation, and user-facing docs aligned with code changes.
- Prefer small, explicit Rust functions with `anyhow` or typed errors already used by the codebase.
- Do not swallow errors or silently ignore failed API interactions.
- Favor maintainable terminal UX: readable defaults, JSON support for automation, and clear progress/output messages.

## Validation expectations

Before considering work complete, prefer running:

- `cargo fmt --all -- --check`
- `cargo clippy --all-targets -- -D warnings`
- `cargo test --locked`

## Repository conventions

- `Cargo.lock` is committed.
- The repository follows GitFlow branch naming and GitVersion semantic versioning.
- Workflow changes should stay compatible with GitHub Actions on Linux, macOS, and Windows where applicable.
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2
updates:
- package-ecosystem: cargo
directory: /
schedule:
interval: weekly
open-pull-requests-limit: 10
groups:
rust-dependencies:
patterns:
- "*"

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
open-pull-requests-limit: 10
5 changes: 5 additions & 0 deletions .github/hooks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copilot hooks

This folder contains optional hook bundles inspired by the patterns used in Awesome Copilot.

Hooks are intentionally kept opt-in. Review them before enabling them in your local Copilot client.
15 changes: 15 additions & 0 deletions .github/hooks/rust-quality-gate/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Rust quality gate
description: Run the repository quality checks after AI-driven edits.
tags: [rust, quality, copilot, hooks]
---

# Rust quality gate

This optional hook runs the Rust validation trio after Copilot or agent edits:

- `cargo fmt --all -- --check`
- `cargo clippy --all-targets -- -D warnings`
- `cargo test --locked`

Use it locally when you want fast feedback after AI-assisted changes.
12 changes: 12 additions & 0 deletions .github/hooks/rust-quality-gate/hooks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"hooks": {
"postToolUse": [
{
"type": "command",
"bash": "bash .github/hooks/rust-quality-gate/post-tool-use.sh",
"timeoutSec": 300
}
]
}
}
10 changes: 10 additions & 0 deletions .github/hooks/rust-quality-gate/post-tool-use.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -euo pipefail

if [[ ! -f Cargo.toml ]]; then
exit 0
fi

cargo fmt --all -- --check
cargo clippy --all-targets -- -D warnings
cargo test --locked
10 changes: 10 additions & 0 deletions .github/instructions/docs.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
applyTo: "**/*.md"
---

# Documentation instructions

- Keep documentation concise, practical, and copy-paste friendly.
- Use fenced code blocks with the right language hint.
- Prefer imperative instructions and concrete examples over generic prose.
- Keep repository docs aligned with actual commands, branch names, and workflow files.
11 changes: 11 additions & 0 deletions .github/instructions/rust.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
applyTo: "src/**/*.rs"
---

# Rust source instructions

- Follow existing `clap` patterns for commands, flags, and subcommands.
- Prefer explicit types and builder-free clarity over clever abstractions.
- Keep I/O and API errors visible to users with actionable context.
- Reuse existing client, config, and output modules before introducing new helpers.
- When adding new commands or flags, update `README.md`.
11 changes: 11 additions & 0 deletions .github/instructions/workflows.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
applyTo: ".github/workflows/**/*.yml"
---

# GitHub Actions instructions

- Use least-privilege permissions.
- Prefer `actions/checkout@v4` with `fetch-depth: 0` only when history is required.
- Keep workflows deterministic and compatible with GitFlow and tag-based releases.
- Use `cargo ... --locked` in CI when dependencies are expected to be reproducible.
- Add concise step names and preserve readable summaries.
14 changes: 14 additions & 0 deletions .github/mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"servers": {
"awesome-copilot": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/microsoft/mcp-dotnet-samples/awesome-copilot:latest"
]
}
}
}
Loading