Skip to content

Commit

Permalink
chore: migrate to justfile
Browse files Browse the repository at this point in the history
  • Loading branch information
haunt98 committed Aug 22, 2024
1 parent 483d0d5 commit e29d739
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 45 deletions.
45 changes: 0 additions & 45 deletions Makefile

This file was deleted.

2 changes: 2 additions & 0 deletions data/nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ require("lazy").setup({
"go",
"javascript",
"json",
"just",
"lua",
"make",
"markdown",
Expand All @@ -451,6 +452,7 @@ require("lazy").setup({
go = { "gofumpt" },
javascript = { "deno_fmt" },
json = { "deno_fmt" },
just = { "just" },
lua = { "stylua" },
markdown = { "deno_fmt" },
proto = { "buf" },
Expand Down
5 changes: 5 additions & 0 deletions data/zsh/bottom-zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ if command -v fnm &>/dev/null; then
eval "$(fnm env --use-on-cd)"
fi

# https://github.com/casey/just
if command -v just &>/dev/null; then
alias jst="just"
fi

# https://github.com/crate-ci/typos
if command -v typos &>/dev/null; then
alias typo="typos --config ~/.config/typos/typos.toml"
Expand Down
37 changes: 37 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
all: tidy format test-color lint build clean

tidy:
go mod tidy

test:
go test -race -failfast ./...

test-color:
# go install github.com/haunt98/go-test-color@latest
go-test-color -race -failfast ./...

coverage:
go test -coverprofile=coverage.out ./...

coverage-cli: coverage
go tool cover -func=coverage.out

coverage-html: coverage
go tool cover -html=coverage.out

lint:
golangci-lint run ./...

format:
# go install github.com/haunt98/gofimports/cmd/gofimports@latest
# go install mvdan.cc/gofumpt@latest
# go install mvdan.cc/sh/v3/cmd/shfmt@latest
gofimports -w --company github.com/make-go-great,github.com/haunt98 .
gofumpt -w -extra .
shfmt -w -s -i 4 ./scripts ./data/zsh

build:
go build ./cmd/dot

clean:
rm -rf dot

0 comments on commit e29d739

Please sign in to comment.