Skip to content

Commit 1c98e90

Browse files
committed
scaffold: Go module and shared tooling baseline
Initialise github.com/apptly-oss/bubblespice with the Go module, a root doc.go, and the tooling shared with other apptly-oss repos: - Makefile driving build/test/coverage, with internal/build/* helper scripts (get_version, gen_index, gen_mk, fix_whitespace, coverage merge, languagetool config). - Lint configs: .golangci.yml, internal/build/revive.toml, .deepsource.toml. - GitHub Actions workflows: build, test, race, codecov, renovate. - Editor and spell-check: .editorconfig, .vscode/, cspell dictionaries (top-level and internal/build). - Project files: README.md, AGENTS.md, LICENCE.txt, renovate.json, .gitignore. Functional packages land in follow-up commits. Signed-off-by: Alejandro Mery <amery@apptly.co>
0 parents  commit 1c98e90

31 files changed

Lines changed: 2008 additions & 0 deletions

.deepsource.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
version = 1
2+
3+
# Exclude specific issues globally
4+
exclude_patterns = [
5+
"**/*.test",
6+
".tmp/**",
7+
]
8+
9+
# Skip specific DeepSource issues
10+
[[issues]]
11+
# Skip "local is undefined in POSIX sh"
12+
id = "SH-1091"
13+
paths = ["**/*.sh"]
14+
15+
[[analyzers]]
16+
name = "shell"
17+
18+
[analyzers.meta]
19+
# Use sh dialect but DeepSource should be smart enough to handle common extensions
20+
dialect = "sh"
21+
22+
[[analyzers]]
23+
name = "go"
24+
25+
[analyzers.meta]
26+
import_root = "github.com/apptly-oss/bubblespice"

.editorconfig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
indent_style = tab
9+
indent_size = 8
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
max_line_length = 80
13+
14+
[*.go]
15+
indent_size = 4
16+
17+
[*.{json,yaml,yml,md}]
18+
indent_style = space
19+
indent_size = 2
20+
21+
[{go.mod,go.sum}]
22+
max_line_length = off

.github/workflows/build.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
branches-ignore:
9+
- '**-wip'
10+
pull_request:
11+
12+
jobs:
13+
make:
14+
runs-on: ubuntu-latest
15+
# Pull requests from the same repository won't trigger this checks as they were already triggered by the push
16+
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository)
17+
strategy:
18+
matrix:
19+
go: [ '1.24', '1.25', '1.26' ]
20+
steps:
21+
- uses: actions/checkout@v6
22+
- uses: actions/setup-go@v6
23+
with:
24+
go-version: ${{ matrix.go }}
25+
cache: true
26+
cache-dependency-path: '**/go.sum'
27+
- name: Build
28+
run: make

.github/workflows/codecov.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Codecov
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
branches-ignore:
9+
- '**-wip'
10+
pull_request:
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
# Pull requests from the same repository won't trigger this checks as they were already triggered by the push
16+
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository)
17+
steps:
18+
- uses: actions/checkout@v6
19+
20+
- name: Set up Go
21+
uses: actions/setup-go@v6
22+
with:
23+
go-version: '1.26'
24+
cache: true
25+
cache-dependency-path: '**/go.sum'
26+
27+
- name: Run tests with coverage
28+
run: make clean-coverage codecov
29+
30+
- name: Upload coverage to Codecov
31+
run: |
32+
# The codecov.sh script was generated by make_codecov.sh
33+
# It uploads each module's coverage file with the appropriate flag
34+
./.tmp/coverage/codecov.sh
35+
env:
36+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/race.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Race Detection
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
branches-ignore:
9+
- '**-wip'
10+
pull_request:
11+
12+
jobs:
13+
race:
14+
runs-on: ubuntu-latest
15+
# Pull requests from the same repository won't trigger this checks as they were already triggered by the push
16+
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository)
17+
steps:
18+
- uses: actions/checkout@v6
19+
20+
- name: Set up Go
21+
uses: actions/setup-go@v6
22+
with:
23+
go-version: '1.26'
24+
cache: true
25+
cache-dependency-path: '**/go.sum'
26+
27+
- name: Run tests with race detection
28+
run: make race GOTEST_FLAGS="-v"

.github/workflows/renovate.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: renovate-config-validator
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
paths:
9+
- 'renovate.json'
10+
pull_request:
11+
paths:
12+
- 'renovate.json'
13+
14+
jobs:
15+
renovate-config-validator:
16+
runs-on: ubuntu-latest
17+
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository)
18+
19+
steps:
20+
- uses: actions/checkout@v6
21+
- uses: actions/setup-node@v6
22+
with:
23+
node-version: '22'
24+
25+
- name: Run renovate-config-validator
26+
run: npx --yes --package renovate -- renovate-config-validator --strict

.github/workflows/test.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
branches-ignore:
9+
- '**-wip'
10+
pull_request:
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
# Pull requests from the same repository won't trigger this checks as they were already triggered by the push
16+
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository)
17+
strategy:
18+
matrix:
19+
go-version: ['1.24', '1.25', '1.26']
20+
steps:
21+
- uses: actions/checkout@v6
22+
23+
- name: Set up Go ${{ matrix.go-version }}
24+
uses: actions/setup-go@v6
25+
with:
26+
go-version: ${{ matrix.go-version }}
27+
cache: true
28+
cache-dependency-path: '**/go.sum'
29+
30+
- name: Run tests
31+
run: make test GOTEST_FLAGS="-v"

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Coverage files (legacy location - now in .tmp/coverage/)
2+
coverage.out
3+
coverage.html
4+
.coverage/
5+
# Build and temporary files
6+
.tmp
7+
*.test

.golangci.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
version: "2"
2+
run:
3+
allow-parallel-runners: true
4+
timeout: 5m
5+
modules-download-mode: readonly
6+
linters:
7+
default: none
8+
enable:
9+
- copyloopvar
10+
- dupl
11+
- errcheck
12+
- goconst
13+
- gocyclo
14+
- govet
15+
- ineffassign
16+
- lll
17+
- misspell
18+
- nakedret
19+
- prealloc
20+
- revive
21+
- staticcheck
22+
- unconvert
23+
- unparam
24+
- unused
25+
settings:
26+
govet:
27+
enable:
28+
- fieldalignment
29+
revive:
30+
rules:
31+
- name: blank-imports
32+
- name: context-as-argument
33+
- name: context-keys-type
34+
- name: dot-imports
35+
- name: error-return
36+
- name: error-strings
37+
- name: error-naming
38+
- name: exported
39+
- name: increment-decrement
40+
- name: var-naming
41+
- name: var-declaration
42+
- name: package-comments
43+
- name: range
44+
- name: receiver-naming
45+
- name: time-naming
46+
- name: unexported-return
47+
- name: indent-error-flow
48+
- name: errorf
49+
- name: empty-block
50+
- name: superfluous-else
51+
- name: unused-parameter
52+
- name: unreachable-code
53+
- name: redefines-builtin-id
54+
- name: bool-literal-in-expr
55+
- name: constant-logical-expr
56+
exclusions:
57+
generated: lax
58+
presets:
59+
- comments
60+
- common-false-positives
61+
- legacy
62+
- std-error-handling
63+
paths:
64+
- third_party$
65+
- builtin$
66+
- examples$
67+
formatters:
68+
enable:
69+
- gofmt
70+
- goimports
71+
exclusions:
72+
generated: lax
73+
paths:
74+
- third_party$
75+
- builtin$
76+
- examples$

.vscode/cspell.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../internal/build/cspell.json

0 commit comments

Comments
 (0)