chore(lint): replace docker-based precommit (#29)

This commit is contained in:
2025-07-14 16:48:43 +03:00
committed by GitHub
parent c91bfa0ccf
commit 1d2b68f059
3 changed files with 20 additions and 7 deletions

View File

@@ -1,10 +1,9 @@
repos:
- repo: https://github.com/oxsecurity/megalinter
rev: v8.4.2 # Git tag specifying the hook, not mega-linter-runner, version
- repo: https://github.com/golangci/golangci-lint
rev: v1.57.2
hooks:
- id: megalinter-incremental # Faster, less thorough
stages:
- pre-commit
- id: golangci-lint
args: ["--timeout=5m"]
- repo: https://github.com/tekwizely/pre-commit-golang
rev: v1.0.0-rc.1
hooks:

View File

@@ -26,9 +26,23 @@ go build -o gibidify .
## Usage
```bash
./gibidify -source <source_directory> -destination <output_file> [--prefix="..."] [--suffix="..."]
./gibidify \
-source <source_directory> \
-destination <output_file> \
-format markdown|json|yaml \
-concurrency <num_workers> \
--prefix="..." \
--suffix="..."
```
Flags:
- `-source`: directory to scan.
- `-destination`: output file path (optional; defaults to `<source>.<format>`).
- `-format`: output format (`markdown`, `json`, or `yaml`).
- `-concurrency`: number of concurrent workers.
- `--prefix` / `--suffix`: optional text blocks.
## Docker
A Docker image can be built using the provided Dockerfile:

View File

@@ -130,7 +130,7 @@ func setDestination() error {
}
func startWorkers(ctx context.Context, wg *sync.WaitGroup, fileCh chan string, writeCh chan fileproc.WriteRequest) {
for range concurrency {
for i := 0; i < concurrency; i++ {
wg.Add(1)
go func() {
defer wg.Done()