Skip to content

Commit c2798f1

Browse files
authored
Merge pull request #1 from fummicc1/feature/github-actions-setup
Add GitHub Actions CI/CD pipeline
2 parents 0753dd3 + c7347a3 commit c2798f1

File tree

9 files changed

+1125
-2
lines changed

9 files changed

+1125
-2
lines changed
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
name: Bug Report
2+
description: File a bug report to help us improve swift-complexity
3+
title: "[Bug]: "
4+
labels: ["bug", "triage"]
5+
assignees: []
6+
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Thanks for taking the time to fill out this bug report! 🐛
12+
13+
- type: textarea
14+
id: description
15+
attributes:
16+
label: Bug Description
17+
description: A clear and concise description of what the bug is.
18+
placeholder: Tell us what happened!
19+
validations:
20+
required: true
21+
22+
- type: textarea
23+
id: reproduction
24+
attributes:
25+
label: Steps to Reproduce
26+
description: Steps to reproduce the behavior
27+
placeholder: |
28+
1. Run command '...'
29+
2. Analyze file '...'
30+
3. See error
31+
validations:
32+
required: true
33+
34+
- type: textarea
35+
id: expected
36+
attributes:
37+
label: Expected Behavior
38+
description: A clear and concise description of what you expected to happen.
39+
validations:
40+
required: true
41+
42+
- type: textarea
43+
id: actual
44+
attributes:
45+
label: Actual Behavior
46+
description: A clear and concise description of what actually happened.
47+
validations:
48+
required: true
49+
50+
- type: textarea
51+
id: swift-code
52+
attributes:
53+
label: Swift Code Sample
54+
description: If applicable, provide the Swift code that causes the issue
55+
render: swift
56+
57+
- type: textarea
58+
id: command
59+
attributes:
60+
label: Command Used
61+
description: The exact swift-complexity command that was executed
62+
render: bash
63+
64+
- type: textarea
65+
id: output
66+
attributes:
67+
label: Output/Error Messages
68+
description: Any output or error messages you received
69+
render: shell
70+
71+
- type: dropdown
72+
id: platform
73+
attributes:
74+
label: Platform
75+
description: What platform are you running on?
76+
options:
77+
- macOS (Apple Silicon)
78+
- macOS (Intel)
79+
- Linux (Ubuntu)
80+
- Linux (Other)
81+
validations:
82+
required: true
83+
84+
- type: input
85+
id: os-version
86+
attributes:
87+
label: OS Version
88+
description: What version of your operating system? (e.g., macOS 14.1, Ubuntu 22.04)
89+
placeholder: macOS 14.1 or Ubuntu 22.04
90+
validations:
91+
required: true
92+
93+
- type: input
94+
id: swift-version
95+
attributes:
96+
label: Swift Version
97+
description: What version of Swift? (run `swift --version`)
98+
placeholder: Swift 6.1
99+
validations:
100+
required: true
101+
102+
- type: input
103+
id: tool-version
104+
attributes:
105+
label: swift-complexity Version
106+
description: What version of swift-complexity? (run `swift run swift-complexity --version`)
107+
placeholder: 1.0.0
108+
109+
- type: checkboxes
110+
id: checks
111+
attributes:
112+
label: Pre-submission Checks
113+
description: Please confirm the following
114+
options:
115+
- label: I have searched existing issues to ensure this is not a duplicate
116+
required: true
117+
- label: I have tested with the latest version of swift-complexity
118+
required: true
119+
- label: I have provided all the required information above
120+
required: true
121+
122+
- type: textarea
123+
id: additional
124+
attributes:
125+
label: Additional Context
126+
description: Add any other context about the problem here (screenshots, etc.)
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: Feature Request
2+
description: Suggest a new feature or enhancement for swift-complexity
3+
title: "[Feature]: "
4+
labels: ["enhancement", "triage"]
5+
assignees: []
6+
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Thanks for taking the time to suggest a new feature! 🚀
12+
13+
- type: textarea
14+
id: summary
15+
attributes:
16+
label: Feature Summary
17+
description: A clear and concise description of the feature you'd like to see added.
18+
placeholder: I would like swift-complexity to...
19+
validations:
20+
required: true
21+
22+
- type: textarea
23+
id: motivation
24+
attributes:
25+
label: Motivation
26+
description: Why is this feature needed? What problem does it solve?
27+
placeholder: This feature would be useful because...
28+
validations:
29+
required: true
30+
31+
- type: textarea
32+
id: solution
33+
attributes:
34+
label: Proposed Solution
35+
description: How would you like this feature to work?
36+
placeholder: I think the feature should work like...
37+
validations:
38+
required: true
39+
40+
- type: dropdown
41+
id: category
42+
attributes:
43+
label: Feature Category
44+
description: What category does this feature fall into?
45+
options:
46+
- Complexity Metrics (new metrics)
47+
- Output Formats (JSON, XML, etc.)
48+
- CLI Interface (new options/flags)
49+
- Performance Improvements
50+
- Integration (CI/CD, editors, etc.)
51+
- Documentation
52+
- Other
53+
validations:
54+
required: true
55+
56+
- type: textarea
57+
id: examples
58+
attributes:
59+
label: Usage Examples
60+
description: Provide examples of how this feature would be used
61+
render: bash
62+
63+
- type: textarea
64+
id: alternatives
65+
attributes:
66+
label: Alternative Solutions
67+
description: Have you considered any alternative solutions or workarounds?
68+
69+
- type: dropdown
70+
id: priority
71+
attributes:
72+
label: Priority
73+
description: How important is this feature to you?
74+
options:
75+
- Low (nice to have)
76+
- Medium (would improve workflow)
77+
- High (blocking current work)
78+
validations:
79+
required: true
80+
81+
- type: checkboxes
82+
id: implementation
83+
attributes:
84+
label: Implementation
85+
description: Are you willing to help implement this feature?
86+
options:
87+
- label: I'm willing to submit a pull request for this feature
88+
- label: I can help with testing once implemented
89+
- label: I can provide additional requirements/feedback
90+
91+
- type: textarea
92+
id: additional
93+
attributes:
94+
label: Additional Context
95+
description: Add any other context, mockups, or examples about the feature request here

.github/pull_request_template.md

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
# Pull Request
2+
3+
## Overview
4+
5+
Brief description of what this PR accomplishes and why it's needed.
6+
7+
## Type of Change
8+
9+
Please check all that apply:
10+
11+
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
12+
- [ ] ✨ New feature (non-breaking change which adds functionality)
13+
- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
14+
- [ ] 📚 Documentation update
15+
- [ ] 🔧 Refactoring (no functional changes)
16+
- [ ] 🧪 Test improvements
17+
- [ ] ⚡ Performance improvements
18+
- [ ] 🔨 Build/CI improvements
19+
- [ ] 🌍 Cross-platform compatibility changes
20+
21+
## Related Issues
22+
23+
Closes #(issue number)
24+
Related to #(issue number)
25+
26+
## Changes Made
27+
28+
### Core Changes
29+
-
30+
-
31+
32+
### Tests
33+
-
34+
-
35+
36+
### Documentation
37+
-
38+
-
39+
40+
## Testing
41+
42+
### Test Plan
43+
- [ ] Unit tests pass
44+
- [ ] Integration tests pass
45+
- [ ] Manual testing completed
46+
- [ ] Complexity analysis on self passes
47+
48+
### Test Commands
49+
```bash
50+
# Commands used to test this change
51+
swift test
52+
swift run swift-complexity Sources --threshold 15
53+
```
54+
55+
## Complexity Analysis
56+
57+
### Self-Analysis Required
58+
59+
- [ ] Complexity analysis run on changed files
60+
- [ ] No functions exceed threshold (15)
61+
- [ ] New complex code is justified and documented
62+
63+
Run swift-complexity on your changes:
64+
```bash
65+
# Analyze changed files for complexity
66+
swift run swift-complexity [changed-files] --threshold 15 --format text
67+
68+
# For comprehensive analysis
69+
swift run swift-complexity Sources --threshold 15 --recursive --format json
70+
```
71+
72+
**Results**: (paste results here or indicate no high-complexity functions added)
73+
74+
**Justification for complex functions**: (if any functions exceed threshold)
75+
76+
## Cross-Platform Compatibility
77+
78+
### Platform Testing
79+
80+
- [ ] Changes tested on macOS (Apple Silicon)
81+
- [ ] Changes tested on macOS (Intel)
82+
- [ ] Changes tested on Linux (Ubuntu 22.04+)
83+
- [ ] Platform-specific code properly conditionally compiled
84+
85+
### Platform Considerations
86+
87+
- [ ] No platform-specific dependencies added
88+
- [ ] Linux compatibility maintained
89+
- [ ] macOS-specific features properly isolated (e.g., swift-format)
90+
91+
## Performance Impact
92+
93+
- [ ] No performance impact
94+
- [ ] Performance improved
95+
- [ ] Performance regression (with justification)
96+
97+
**Details**: (if applicable)
98+
99+
## Breaking Changes
100+
101+
- [ ] No breaking changes
102+
- [ ] Breaking changes (describe below)
103+
104+
**Breaking Changes Description**: (if applicable)
105+
106+
## Screenshots/Output
107+
108+
(If applicable, add screenshots or example output)
109+
110+
## Checklist
111+
112+
### Code Quality
113+
- [ ] Code follows the project's style guidelines
114+
- [ ] Self-review of code completed
115+
- [ ] Code is self-documenting with clear variable/function names
116+
- [ ] Complex logic is commented where necessary
117+
118+
### Testing
119+
- [ ] Tests added for new functionality
120+
- [ ] Existing tests updated as needed
121+
- [ ] All tests pass locally
122+
- [ ] Edge cases considered and tested
123+
124+
### Documentation
125+
- [ ] Documentation updated (if needed)
126+
- [ ] README updated (if needed)
127+
- [ ] CLAUDE.md updated (if architecture changes)
128+
- [ ] API documentation updated (if applicable)
129+
130+
### Dependencies
131+
132+
- [ ] No new dependencies added
133+
- [ ] New dependencies justified and documented
134+
- [ ] Package.swift updated appropriately
135+
- [ ] Cross-platform compatibility verified for new dependencies
136+
137+
### CI/CD
138+
139+
- [ ] CI pipeline passes (macOS & Linux)
140+
- [ ] No new linting warnings introduced
141+
- [ ] Code formatting validation passes (swift-format on macOS)
142+
- [ ] Documentation linting passes (markdownlint)
143+
- [ ] Self-complexity analysis in CI passes
144+
- [ ] Release workflow compatibility maintained (if applicable)
145+
146+
## Additional Notes
147+
148+
(Any additional information that reviewers should know)
149+
150+
---
151+
152+
## For Reviewers
153+
154+
### Review Checklist
155+
156+
- [ ] **Complexity Analysis**: Results are reasonable and justified
157+
- [ ] **Cross-Platform**: Changes work on both macOS and Linux
158+
- [ ] **Test Coverage**: Adequate test coverage for new functionality
159+
- [ ] **Documentation**: Updated appropriately for changes
160+
- [ ] **CI/CD**: All automated checks pass
161+
- [ ] **Architecture**: Changes align with project goals and patterns
162+
- [ ] **Performance**: No unexpected performance regressions
163+
- [ ] **Dependencies**: New dependencies are justified and secure
164+
165+
### Key Areas to Focus On
166+
167+
1. **Code Quality**: Maintainable, readable, and follows project conventions
168+
2. **Platform Compatibility**: Proper handling of macOS/Linux differences
169+
3. **Complexity Management**: New code doesn't unnecessarily increase complexity
170+
4. **Test Quality**: Tests are comprehensive and meaningful
171+
5. **Documentation**: Changes are properly documented for users and developers

0 commit comments

Comments
 (0)