Skip to content
Closed
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
48 changes: 48 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Bug Report
description: Report a bug or unexpected behavior
labels: [bug]
body:
- type: textarea
id: description
attributes:
label: Description
description: What happened?
placeholder: A clear description of the bug
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: Steps to Reproduce
description: How can we reproduce this?
placeholder: |
1. Run `stacktower parse ...`
2. See error
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected Behavior
description: What did you expect to happen?
validations:
required: false
- type: input
id: version
attributes:
label: Version
description: Output of `stacktower --version`
placeholder: "v0.1.0"
validations:
required: true
- type: dropdown
id: os
attributes:
label: Operating System
options:
- macOS
- Linux
- Windows
validations:
required: true

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 idea or improvement
labels: [enhancement]
body:
- type: textarea
id: description
attributes:
label: Description
description: What would you like to see?
placeholder: A clear description of the feature
validations:
required: true
- type: textarea
id: use-case
attributes:
label: Use Case
description: Why do you need this? What problem does it solve?
validations:
required: false
- type: textarea
id: alternatives
attributes:
label: Alternatives Considered
description: Have you considered any workarounds or alternatives?
validations:
required: false

11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Description

<!-- What does this PR do? -->

## Checklist

- [ ] Tests pass (`make test`)
- [ ] Code is formatted (`make fmt`)
- [ ] Lints pass (`make lint`)
- [ ] Commit messages follow [Conventional Commits](https://www.conventionalcommits.org/)

11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: gomod
directory: /
schedule:
interval: weekly
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly

17 changes: 4 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,14 @@ jobs:
go-version-file: 'go.mod'
cache: true

- name: Format check
run: |
gofmt -s -l . | tee /tmp/gofmt.out
test ! -s /tmp/gofmt.out

- name: Vet
run: go vet ./...
- name: Lint
uses: golangci/golangci-lint-action@v6
with:
version: latest

- name: Test
run: go test -race -timeout=2m ./...

- name: Staticcheck
uses: dominikh/staticcheck-action@v1
with:
version: latest
install-go: false

- name: Vulncheck
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Commitlint

on:
pull_request:
types: [opened, edited, synchronize]

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check PR title
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
# Conventional commit pattern: type(scope)?: description
pattern='^(feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert)(\([a-z0-9-]+\))?: .+'

if [[ ! "$PR_TITLE" =~ $pattern ]]; then
echo "❌ PR title does not follow conventional commits format"
echo ""
echo "Expected: <type>: <description>"
echo "Got: $PR_TITLE"
echo ""
echo "Valid types: feat, fix, docs, style, refactor, perf, test, chore, ci, build, revert"
echo ""
echo "Examples:"
echo " feat: add new feature"
echo " fix: resolve memory leak"
echo " feat(parser): add ruby support"
exit 1
fi

echo "✅ PR title follows conventional commits: $PR_TITLE"

26 changes: 18 additions & 8 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
version: "2"

run:
timeout: 5m
tests: false
formatters:
enable:
- gofmt
- goimports
settings:
goimports:
local-prefixes:
- github.com/matzehuels/stacktower

linters:
default: none
enable:
- errcheck
- govet
- staticcheck
- unused
- ineffassign
- misspell
- unconvert

issues:
max-issues-per-linter: 0
max-same-issues: 0
settings:
staticcheck:
checks:
- all
- -ST1000 # package comments
- -ST1016 # receiver names
- -QF1003 # tagged switch suggestion
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ fmt:
@goimports -w -local stacktower .

lint:
@go vet ./...
@staticcheck ./...
@golangci-lint run

test:
@go test -race -timeout=2m ./...
Expand Down Expand Up @@ -48,7 +47,7 @@ blog-showcase: build
@./scripts/blog_showcase.sh

install-tools:
@go install honnef.co/go/tools/cmd/staticcheck@latest
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
@go install golang.org/x/tools/cmd/goimports@latest
@go install golang.org/x/vuln/cmd/govulncheck@latest

Expand All @@ -68,7 +67,7 @@ help:
@echo "make - Run checks and build"
@echo "make check - Format, lint, test"
@echo "make fmt - Format code"
@echo "make lint - Run go vet and staticcheck"
@echo "make lint - Run golangci-lint"
@echo "make test - Run tests"
@echo "make cover - Run tests with coverage"
@echo "make build - Build binary"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.24.11
require (
github.com/BurntSushi/toml v1.5.0
github.com/charmbracelet/log v0.4.2
github.com/goccy/go-graphviz v0.2.9
github.com/goccy/go-graphviz v0.2.10
github.com/spf13/cobra v1.10.1
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ github.com/fogleman/gg v1.3.0 h1:/7zJX8F6AaYQc57WQCyN9cAIz+4bCJGO9B+dyW29am8=
github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4=
github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
github.com/goccy/go-graphviz v0.2.9 h1:4yD2MIMpxNt+sOEARDh5jTE2S/jeAKi92w72B83mWGg=
github.com/goccy/go-graphviz v0.2.9/go.mod h1:hssjl/qbvUXGmloY81BwXt2nqoApKo7DFgDj5dLJGb8=
github.com/goccy/go-graphviz v0.2.10 h1:jHu/1I0Iw0xIzzYk96Ous/ZeuD11Rt2oW8juHdIE30g=
github.com/goccy/go-graphviz v0.2.10/go.mod h1:LRlMnNmY17QbN6fLnvOzY7g0rXQjLKAhzxeTHbEUM6w=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
Expand Down
1 change: 1 addition & 0 deletions internal/cli/ordering.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"time"

"github.com/charmbracelet/log"

"github.com/matzehuels/stacktower/pkg/dag"
"github.com/matzehuels/stacktower/pkg/render/tower/ordering"
)
Expand Down
Loading