Skip to content

Commit 8d8fa03

Browse files
init
0 parents  commit 8d8fa03

160 files changed

Lines changed: 44603 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CONTRIBUTING.md

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
# Contributing to RAZ
2+
3+
Thank you for your interest in contributing to RAZ! This guide will help you report issues and contribute effectively.
4+
5+
## 🐛 Reporting Issues
6+
7+
We have specific issue templates to help you provide the right information:
8+
9+
### Choose the Right Template
10+
11+
- **🐛 [Bug Report](https://github.com/raz-rs/raz/issues/new?template=bug_report.md)** - General bugs and unexpected behavior
12+
- **[Override Issue](https://github.com/raz-rs/raz/issues/new?template=override_issue.md)** - Problems with saving, loading, or applying overrides
13+
- **🔍 [Command Detection](https://github.com/raz-rs/raz/issues/new?template=command_detection.md)** - Wrong commands generated or project type detection issues
14+
- **🆚 [VS Code Extension](https://github.com/raz-rs/raz/issues/new?template=vscode_extension.md)** - Extension-specific problems
15+
- **🐌 [Performance Issue](https://github.com/raz-rs/raz/issues/new?template=performance.md)** - Slow performance or resource usage problems
16+
- **[Feature Request](https://github.com/raz-rs/raz/issues/new?template=feature_request.md)** - New features or enhancements
17+
18+
### Essential Information for Bug Reports
19+
20+
When reporting any issue, please include:
21+
22+
1. **Complete terminal output** - Copy the entire output including the command being executed
23+
2. **Exact reproduction steps** - We need to be able to reproduce the issue
24+
3. **Environment details** - OS, VS Code version, Rust version, etc.
25+
4. **Project context** - Cargo.toml, file structure, cursor position
26+
27+
### 📋 Terminal Output Format
28+
29+
Always include the complete terminal output in this format:
30+
31+
```
32+
* Executing task: /Users/username/.cargo/bin/raz "/path/to/file.rs:line:column"
33+
34+
[Complete output including any errors, warnings, and the actual command executed]
35+
```
36+
37+
This output contains crucial debugging information:
38+
- The exact command being executed
39+
- File path and cursor position
40+
- Any detected overrides
41+
- Error messages and exit codes
42+
43+
## 🔧 Getting Help
44+
45+
### Before Opening an Issue
46+
47+
1. **Check existing issues** - Your issue might already be reported
48+
2. **Read the documentation** - Check the [README](../README.md) and [docs](../docs/)
49+
3. **Try with latest version** - Run `raz --version` and compare with latest release
50+
4. **Test with minimal example** - Can you reproduce with a simple test case?
51+
52+
### Quick Debugging Steps
53+
54+
1. **Test the binary directly:**
55+
```bash
56+
raz --version
57+
raz "/path/to/file.rs:line:column" --dry-run
58+
```
59+
60+
2. **Check saved overrides:**
61+
```bash
62+
raz override list
63+
```
64+
65+
3. **Enable debug logging:**
66+
```bash
67+
RUST_LOG=debug raz "/path/to/file.rs:line:column"
68+
```
69+
70+
4. **VS Code troubleshooting:**
71+
- Check the RAZ output channel (View → Output → RAZ)
72+
- Try restarting VS Code
73+
- Test with other extensions disabled
74+
75+
## 🏗️ Development
76+
77+
### Setting Up Development Environment
78+
79+
1. **Clone the repository:**
80+
```bash
81+
git clone https://github.com/raz-rs/raz.git
82+
cd raz
83+
```
84+
85+
2. **Install dependencies:**
86+
```bash
87+
# Rust toolchain (if not already installed)
88+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
89+
90+
# Build the project
91+
cargo build
92+
```
93+
94+
3. **Run tests:**
95+
```bash
96+
cargo test
97+
```
98+
99+
4. **Install locally for testing:**
100+
```bash
101+
cargo install --path raz-adapters/cli
102+
```
103+
104+
### Project Structure
105+
106+
```
107+
raz/
108+
├── raz-common/ # Shared utilities
109+
├── raz-config/ # Configuration management
110+
├── raz-core/ # Core command generation logic
111+
├── raz-override/ # Override system
112+
├── raz-validation/ # Input validation
113+
├── raz-adapters/
114+
│ ├── cli/ # Command-line interface
115+
│ └── vscode/ # VS Code extension
116+
├── docs/ # Documentation
117+
└── tests/ # Integration tests
118+
```
119+
120+
### Testing Your Changes
121+
122+
1. **Unit tests:**
123+
```bash
124+
cargo test --workspace
125+
```
126+
127+
2. **Integration tests:**
128+
```bash
129+
cargo test --package raz-core
130+
```
131+
132+
3. **Manual testing:**
133+
```bash
134+
# Build and install locally
135+
cargo build --release
136+
cp target/release/raz ~/.cargo/bin/
137+
138+
# Test with various project types
139+
raz "/path/to/test/file.rs:line:column"
140+
```
141+
142+
4. **VS Code extension testing:**
143+
- Open the `raz-adapters/vscode` folder in VS Code
144+
- Press F5 to launch Extension Development Host
145+
- Test the extension in the new window
146+
147+
### Pull Request Guidelines
148+
149+
1. **Create focused PRs** - One feature or fix per PR
150+
2. **Add tests** - Include tests for new functionality
151+
3. **Update documentation** - Update README or docs if needed
152+
4. **Follow code style** - Run `cargo fmt` and `cargo clippy`
153+
5. **Write good commit messages** - Be descriptive and concise
154+
155+
### Code Style
156+
157+
- **Rust code:** Follow standard Rust conventions
158+
- **Use `cargo fmt`** - Format code before committing
159+
- **Use `cargo clippy`** - Fix any warnings
160+
- **Document public APIs** - Add doc comments for public functions
161+
- **Add tests** - Especially for new features and bug fixes
162+
163+
## 🤝 Community
164+
165+
- **Discussions:** [GitHub Discussions](https://github.com/raz-rs/raz/discussions)
166+
- **Issues:** Use the appropriate issue template
167+
- **Discord/Chat:** [Link if available]
168+
169+
## 📄 License
170+
171+
By contributing to RAZ, you agree that your contributions will be licensed under the same license as the project.
172+
173+
---
174+
175+
Thank you for helping make RAZ better! 🚀
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
name: Bug report
3+
about: Report a bug or unexpected behavior in raz
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## Description
10+
<!-- A clear and concise description of what the bug is -->
11+
12+
## Steps to Reproduce
13+
<!-- Please provide the exact steps to reproduce the issue -->
14+
15+
1. Open file: `path/to/file.rs`
16+
2. Press keyboard shortcut: (e.g., Cmd+R, Cmd+Shift+R)
17+
3. Enter override (if applicable):
18+
4. See error
19+
20+
## Terminal Output
21+
<!-- IMPORTANT: Please paste the complete terminal output including the command being executed -->
22+
23+
### First attempt (if applicable):
24+
```
25+
* Executing task: /Users/username/.cargo/bin/raz "/path/to/file.rs:line:column"
26+
27+
[Paste complete terminal output here]
28+
```
29+
30+
### Second attempt / When error occurs:
31+
```
32+
* Executing task: /Users/username/.cargo/bin/raz "/path/to/file.rs:line:column"
33+
34+
[Paste complete terminal output including error messages]
35+
```
36+
37+
## Expected Behavior
38+
<!-- What did you expect to happen? -->
39+
40+
## Actual Behavior
41+
<!-- What actually happened? -->
42+
43+
## Environment
44+
<!-- Please complete the following information -->
45+
46+
- OS: [e.g., macOS 14.5, Ubuntu 22.04, Windows 11]
47+
- VS Code Version: [e.g., 1.85.0]
48+
- Raz Version: [Run `raz --version`]
49+
- Rust Version: [Run `rustc --version`]
50+
- Project Type: [e.g., Cargo workspace, single file, Cargo.toml package]
51+
52+
## Additional Context
53+
<!-- Add any other context about the problem here -->
54+
55+
### Relevant Files
56+
<!-- If applicable, provide relevant file contents -->
57+
58+
<details>
59+
<summary>Cargo.toml (if applicable)</summary>
60+
61+
```toml
62+
[paste Cargo.toml content]
63+
```
64+
</details>
65+
66+
<details>
67+
<summary>Source file content (if small)</summary>
68+
69+
```rust
70+
[paste relevant source code]
71+
```
72+
</details>
73+
74+
### Saved Overrides
75+
<!-- If the issue involves overrides, please include: -->
76+
77+
Output of `raz override list`:
78+
```
79+
[paste output here]
80+
```
81+
82+
### Debug Information
83+
<!-- If you can reproduce with debug logging -->
84+
85+
Run with debug logging: `RUST_LOG=debug raz [your command]`
86+
```
87+
[paste debug output if available]
88+
```
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
---
2+
name: Command Detection Issue
3+
about: Report problems with raz not detecting the right commands or detecting wrong project type
4+
title: '[DETECTION] '
5+
labels: detection, bug
6+
assignees: ''
7+
---
8+
9+
## Detection Issue Type
10+
<!-- Check the type of detection issue -->
11+
12+
- [ ] Wrong project type detected (Cargo vs single file vs script)
13+
- [ ] Missing expected commands
14+
- [ ] Wrong commands generated
15+
- [ ] Framework not detected (Dioxus, Leptos, Tauri, etc.)
16+
- [ ] Test detection issues
17+
- [ ] File role detection issues
18+
19+
## Current Behavior
20+
21+
**Command executed:**
22+
```
23+
* Executing task: /Users/username/.cargo/bin/raz "/path/to/file.rs:line:column"
24+
25+
ℹ Executing [Command Type]: [description]
26+
> [actual command executed]
27+
28+
[Paste complete terminal output]
29+
```
30+
31+
**Available commands seen:**
32+
<!-- If using VS Code command palette or --dry-run -->
33+
```
34+
[List of commands shown]
35+
```
36+
37+
## Expected Behavior
38+
<!-- What commands did you expect to see? -->
39+
40+
**Expected command type:** [e.g., Test, Run, Build, Serve]
41+
**Expected command:**
42+
```bash
43+
[expected command here]
44+
```
45+
46+
## Project Information
47+
48+
<details>
49+
<summary>Project Structure</summary>
50+
51+
```
52+
project-root/
53+
├── Cargo.toml
54+
├── src/
55+
│ ├── main.rs
56+
│ └── lib.rs
57+
└── [other relevant files]
58+
```
59+
</details>
60+
61+
<details>
62+
<summary>Cargo.toml</summary>
63+
64+
```toml
65+
[paste complete Cargo.toml]
66+
```
67+
</details>
68+
69+
<details>
70+
<summary>File being executed</summary>
71+
72+
**File path:** `/path/to/file.rs`
73+
**Cursor position:** Line X, Column Y
74+
75+
```rust
76+
[paste relevant file content, especially around cursor position]
77+
```
78+
</details>
79+
80+
## Environment
81+
- OS: [e.g., macOS 14.5, Ubuntu 22.04, Windows 11]
82+
- Raz Version: [Run `raz --version`]
83+
- Rust Version: [Run `rustc --version`]
84+
- Project Type: [What type of project is this?]
85+
86+
## Framework Information
87+
<!-- If using a specific framework -->
88+
89+
**Framework:** [e.g., Dioxus, Leptos, Tauri, Bevy, Yew]
90+
**Framework Version:** [check Cargo.toml dependencies]
91+
92+
**Framework-specific files:**
93+
- [ ] Dioxus.toml
94+
- [ ] Tauri.toml
95+
- [ ] index.html
96+
- [ ] Other: [specify]
97+
98+
## Debug Information
99+
100+
**Dry run output:**
101+
```bash
102+
# Output of: raz --dry-run "/path/to/file.rs:line:column"
103+
[paste output here]
104+
```
105+
106+
**With verbose logging:**
107+
```bash
108+
# Output of: RUST_LOG=debug raz "/path/to/file.rs:line:column"
109+
[paste debug output if available]
110+
```

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: 💬 Discussions
4+
url: https://github.com/raz-rs/raz/discussions
5+
about: Ask questions, share ideas, and discuss raz with the community
6+
- name: 📖 Documentation
7+
url: https://github.com/raz-rs/raz/blob/main/README.md
8+
about: Read the documentation for usage guides and examples
9+
- name: 🚀 VS Code Extension
10+
url: https://marketplace.visualstudio.com/items?itemName=raz.raz
11+
about: Install the VS Code extension for the best raz experience

0 commit comments

Comments
 (0)