-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
213 additions
and
1,276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
root = "." | ||
testdata_dir = "testdata" | ||
tmp_dir = "tmp" | ||
|
||
[build] | ||
args_bin = [] | ||
bin = "scc" | ||
cmd = "make build" | ||
delay = 1000 | ||
exclude_dir = ["assets", "tmp", "vendor", "testdata", "ui"] | ||
exclude_file = [] | ||
exclude_regex = ["_test.go"] | ||
exclude_unchanged = false | ||
follow_symlink = false | ||
full_bin = "" | ||
include_dir = [] | ||
include_ext = ["go", "tpl", "tmpl", "html"] | ||
include_file = [] | ||
kill_delay = "0s" | ||
log = "build-errors.log" | ||
poll = false | ||
poll_interval = 0 | ||
post_cmd = [] | ||
pre_cmd = [] | ||
rerun = false | ||
rerun_delay = 500 | ||
send_interrupt = false | ||
stop_on_error = false | ||
|
||
[color] | ||
app = "" | ||
build = "yellow" | ||
main = "magenta" | ||
runner = "green" | ||
watcher = "cyan" | ||
|
||
[log] | ||
main_only = false | ||
time = false | ||
|
||
[misc] | ||
clean_on_exit = false | ||
|
||
[screen] | ||
clear_on_rebuild = false | ||
keep_scroll = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
echo "Backend linting" | ||
golangci-lint run | ||
if [ $? -ne 0 ]; then | ||
echo "golangci-lint failed. Please fix the errors before committing." | ||
exit 1 | ||
fi |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: golangci-lint | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: read | ||
|
||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.23.1 | ||
|
||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
version: v1.60 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: sqlc | ||
on: [push] | ||
|
||
jobs: | ||
diff: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: sqlc-dev/setup-sqlc@v3 | ||
with: | ||
sqlc-version: '1.26.0' | ||
- run: sqlc diff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
run: | ||
timeout: 5m | ||
modules-download-mode: readonly | ||
|
||
linters: | ||
enable: | ||
- bodyclose # checks whether HTTP response body is closed successfully | ||
- copyloopvar # detects copy loop variable | ||
- errcheck # checks for unchecked errors in go programs | ||
- errname # checks that sentinel errors are prefixed with the `Err` and error types are suffixed with the `Error` | ||
- gochecknoinits # checks that no init functions are present in Go code | ||
- goimports # check import statements are formatted correctly | ||
- gosimple # checks for code simplifications in Go code | ||
- govet # runs the go vet tool | ||
- importas # enforces consistent import aliases | ||
- ineffassign # detects when assignments to existing variables are not used | ||
- noctx # finds sending http request without context.Context | ||
- paralleltest # detects missing usage of t.Parallel() method in go tests | ||
- prealloc # finds slice declarations that could potentially be preallocated | ||
- revive # checks for golang coding style | ||
- rowserrcheck # checks whether Err of rows is checked successfully | ||
- sqlclosecheck # checks that sql.Rows and sql.Stmt are closed | ||
- staticcheck # Applies static code analysis | ||
- tenv # detects using os.Setenv instead of t.Setenv | ||
- testpackage # makes you use a separate _test package | ||
- thelper # detects golang test helpers without t.Helper() call and checks consistency of test helpers | ||
- unconvert # removes unnecessary type conversions | ||
- unparam # removes unused function parameters | ||
- unused # finds unused variables | ||
fast: true | ||
|
||
issues: | ||
exclude-use-default: false | ||
max-issues-per-linter: 0 | ||
max-same-issues: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
golang 1.22.0 | ||
golang 1.23.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,20 @@ | ||
# Screen Cammie Chat | ||
|
||
Go 1.22.0 | ||
Displays the cammie chat along with some other statistics. | ||
|
||
- `go mod tidy` | ||
## Development | ||
|
||
- `go run .` of `go build .` | ||
Check [.tool-versions](.tool-versions) for the current used version of golang | ||
|
||
- Install pre-commit hooks `git config --local core.hooksPath .githooks/`. | ||
- Install goose `go install github.com/pressly/goose/v3/cmd/goose@latest`. | ||
- Install sqlc `go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest` | ||
- Install air `go install github.com/air-verse/air@latest` | ||
|
||
## Build | ||
|
||
- `make` | ||
|
||
## Run | ||
|
||
- `make run` |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.