Initial commit

This commit is contained in:
Kamil 'Kamaś' Bruchal 2026-06-17 18:53:54 +02:00
commit 7828e11046
8 changed files with 82 additions and 0 deletions

43
.golangci.yml Normal file
View File

@ -0,0 +1,43 @@
version: "2"
linters:
default: standard # errcheck, govet, staticcheck, unused, ineffassign
enable:
# --- general additions ---
- gocritic
- revive
- errorlint
- gosec
- unconvert
- misspell
# --- HTTP / API-client (Sheets + Telegram) ---
- bodyclose # unclosed response Body -> fd/conn leak
- noctx # request built without context
- errchkjson # unmarshalable types into json.Marshal
- canonicalheader # non-canonical net/http.Header keys
# --- context discipline (the real delta for this workload) ---
- contextcheck # don't drop the inherited ctx for Background/TODO
- fatcontext # nested/repeated ctx wrapping inside loops
- containedctx # ctx stored in a struct field (anti-pattern)
# --- uncomment if you persist bot state in SQL ---
# - rowserrcheck
# - sqlclosecheck
settings:
errcheck:
check-type-assertions: true
misspell:
locale: US
exclusions:
rules:
- path: _test\.go
linters:
- gosec
- errcheck
formatters:
enable:
- gofmt
- goimports
# - gofumpt

21
.markdownlint-cli2.yaml Normal file
View File

@ -0,0 +1,21 @@
# markdownlint-cli2 configuration
# https://github.com/DavidAnson/markdownlint-cli2
globs:
- "**/*.md"
ignores:
- "vendor/**"
- "node_modules/**"
config:
# Allow long lines — documentation often has URLs and tables
MD013: false
# Allow duplicate headings in different sections
MD024:
siblings_only: true
# Allow trailing punctuation in headings
MD026:
punctuation: ".,;:!"
# Allow inline HTML when needed
MD033: false

18
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,18 @@
repos:
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.22.0
hooks:
- id: markdownlint-cli2
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.1
hooks:
- id: go-fmt
- id: golangci-lint
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-merge-conflict

0
Dockerfile Normal file
View File

0
README.md Normal file
View File

0
fetch-sheet.go Normal file
View File

0
main.go Normal file
View File

0
scheduler.go Normal file
View File