Skip to content
Merged
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
12 changes: 6 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo 🛎
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Lint Code Base 🕵🏻‍♀️
uses: super-linter/super-linter/slim@v7
uses: super-linter/super-linter/slim@v8
env:
LINTER_RULES_PATH: /
VALIDATE_ALL_CODEBASE: false
Expand All @@ -47,20 +47,20 @@ jobs:
strategy:
matrix:
go-version:
- 1.23.6
- 1.24.7
steps:
- name: Checkout Repo 🛎
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Go 🐹
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
cache: true
cache-dependency-path: go.sum

- name: Lint Go Code 🕵🏻‍♂️
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v8
with:
version: latest
only-new-issues: false
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo 🛎
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Setup Go 🐹
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: 1.23.6
go-version: 1.24.7
cache: true
cache-dependency-path: go.sum

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ jobs:
strategy:
matrix:
go-version:
- 1.23.6
- 1.24.7
defaults:
run:
shell: bash
steps:
- name: Checkout Repo 🛎
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Go 🐹
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
cache: true
Expand Down Expand Up @@ -95,14 +95,14 @@ jobs:
strategy:
matrix:
go-version:
- 1.23.6
- 1.24.7
runs-on: ubuntu-latest
steps:
- name: Checkout Repo 🛎
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Go 🐹
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
cache: true
Expand Down
66 changes: 39 additions & 27 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,44 @@
# See https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml
issues:
exclude-rules:
- path: _test\.go
linters:
- dupl
- gosec
- goconst
version: "2"
linters:
enable:
- gosec
- unconvert
- gocyclo
- goconst
- goimports
- gocritic
- govet
- gocyclo
- gosec
- lll
- revive
linters-settings:
errcheck:
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
# default is false: such cases aren't reported by default.
check-blank: true
govet:
enable:
- shadow
gocyclo:
# minimal code complexity to report, 30 by default
min-complexity: 16
maligned:
# print struct with more effective memory layout or not, false by default
suggest-new: true
- unconvert
settings:
errcheck:
check-blank: true
gocyclo:
min-complexity: 15
lll:
line-length: 120

exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- dupl
- goconst
- gosec
path: _test\.go
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- goimports
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
15 changes: 15 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Customization options: https://goreleaser.com/customization/
version: 2
project_name: scribe
before:
hooks:
Expand All @@ -24,6 +25,7 @@ checksum:
algorithm: sha512
changelog:
sort: asc

dockers:
- goos: linux
goarch: amd64
Expand All @@ -39,3 +41,16 @@ dockers:
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--build-arg=PROJECT_NAME={{ .ProjectName }}"
- "--platform=linux/amd64"

# Update to this config in the future.
# dockers_v2:
# - images:
# - "ghcr.io/insightsengineering/{{ .ProjectName }}"
# tags:
# - "latest"
# - "{{ .Version }}"
# labels:
# "org.opencontainers.image.created": "{{ .Date }}"
# "org.opencontainers.image.title": "{{ .ProjectName }}"
# "org.opencontainers.image.revision": "{{ .FullCommit }}"
# "org.opencontainers.image.version": "{{ .Version }}"
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
FROM scratch
ARG PROJECT_NAME="scribe"
# Uncomment when goreleaser config is updated to dockers_v2.
# ARG TARGETPLATFORM
ENV PROJECT_NAME=${PROJECT_NAME}
COPY ${PROJECT_NAME} /
# Change to this when goreleaser config is updated to dockers_v2.
# COPY $TARGETPLATFORM/${PROJECT_NAME} /
WORKDIR /
# hadolint ignore=DL3025
ENTRYPOINT ${PROJECT_NAME}
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ help: ## Show this help menu

devdeps: ## Install development dependencies
@printf "Executing target: [$@] 🎯\n"
@which -a golangci-lint > /dev/null || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH) v1.56.2
@which -a golangci-lint > /dev/null || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH) v2.5.0
@which -a typex > /dev/null || go install github.com/dtgorski/typex@latest
@which -a goreleaser > /dev/null || go install github.com/goreleaser/goreleaser@latest
@# Goreleaser v2.12 requires Go 1.25, so pin to v2.11.2 for now
@which -a goreleaser > /dev/null || go install github.com/goreleaser/goreleaser/v2@v2.11.2
@which -a gocover-cobertura > /dev/null || go install github.com/boumenot/gocover-cobertura@latest
@which -a misspell > /dev/null || go install github.com/client9/misspell/cmd/misspell@latest
@which -a gotestdox > /dev/null || go install github.com/bitfield/gotestdox/cmd/gotestdox@latest
Expand Down Expand Up @@ -60,7 +61,7 @@ format: ## Format source code

lint: devdeps spell ## Lint source code
@printf "Executing target: [$@] 🎯\n"
@golangci-lint run --fast -c .golangci.yml
@golangci-lint run -c .golangci.yml

test: clean tidy devdeps spell ## Run unit tests and generate reports
@printf "Executing target: [$@] 🎯\n"
Expand Down
70 changes: 32 additions & 38 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,83 +1,77 @@
module github.com/insightsengineering/scribe

go 1.23.0

toolchain go1.23.6
go 1.24.7

require (
github.com/cloudfoundry/gosigar v1.3.86
github.com/go-git/go-git/v5 v5.13.2
github.com/cloudfoundry/gosigar v1.3.101
github.com/go-git/go-git/v5 v5.16.2
github.com/gocarina/gocsv v0.0.0-20240520201108-78e41c74b4b1
github.com/insightsengineering/locksmith v0.1.10
github.com/insightsengineering/locksmith v0.1.12
github.com/jamiealquiza/envy v1.1.0
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.8.1
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.10.0
github.com/spf13/cobra v1.10.1
github.com/spf13/viper v1.21.0
github.com/stretchr/testify v1.11.1
go.szostok.io/version v1.2.0
golang.org/x/sys v0.31.0
golang.org/x/sys v0.36.0
gopkg.in/yaml.v3 v3.0.1
)

require (
dario.cat/mergo v1.0.1 // indirect
dario.cat/mergo v1.0.2 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.3.1 // indirect
github.com/Masterminds/semver/v3 v3.4.0 // indirect
github.com/Masterminds/sprig/v3 v3.3.0 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/ProtonMail/go-crypto v1.1.5 // indirect
github.com/ProtonMail/go-crypto v1.3.0 // indirect
github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/clipperhouse/uax29/v2 v2.2.0 // indirect
github.com/cloudflare/circl v1.6.1 // indirect
github.com/cyphar/filepath-securejoin v0.4.1 // indirect
github.com/cyphar/filepath-securejoin v0.5.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/fsnotify/fsnotify v1.8.0 // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.6.2 // indirect
github.com/goccy/go-yaml v1.15.17 // indirect
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
github.com/goccy/go-yaml v1.18.0 // indirect
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/hashicorp/go-version v1.7.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hokaccha/go-prettyjson v0.0.0-20211117102719-0474bc63780f // indirect
github.com/huandu/xstrings v1.5.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/magiconair/properties v1.8.9 // indirect
github.com/kevinburke/ssh_config v1.4.0 // indirect
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
github.com/lucasb-eyer/go-colorful v1.3.0 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/mattn/go-runewidth v0.0.19 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/muesli/termenv v0.15.2 // indirect
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
github.com/pjbgf/sha1cd v0.3.2 // indirect
github.com/muesli/termenv v0.16.0 // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/pjbgf/sha1cd v0.5.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/sagikazarmark/locafero v0.7.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
github.com/sagikazarmark/locafero v0.12.0 // indirect
github.com/sergi/go-diff v1.4.0 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/skeema/knownhosts v1.3.1 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.12.0 // indirect
github.com/spf13/cast v1.7.1 // indirect
github.com/spf13/pflag v1.0.6 // indirect
github.com/spf13/afero v1.15.0 // indirect
github.com/spf13/cast v1.10.0 // indirect
github.com/spf13/pflag v1.0.10 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.36.0 // indirect
golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/text v0.23.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/crypto v0.42.0 // indirect
golang.org/x/net v0.44.0 // indirect
golang.org/x/text v0.29.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
)

Expand Down
Loading
Loading