From b78541fa58eefa633dcdd08df6b6da8f70f888c5 Mon Sep 17 00:00:00 2001 From: Bruno Carlin Date: Sat, 8 Feb 2025 03:21:07 +0100 Subject: [PATCH] chore: update license --- .forgejo/workflows/test.yml | 22 ---------- .golangci.yml | 86 +++++++++++++++---------------------- LICENSE | 2 +- 3 files changed, 35 insertions(+), 75 deletions(-) delete mode 100644 .forgejo/workflows/test.yml diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml deleted file mode 100644 index 3829101..0000000 --- a/.forgejo/workflows/test.yml +++ /dev/null @@ -1,22 +0,0 @@ -on: [push] -jobs: - linting: - runs-on: docker - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: stable - - uses: https://github.com/golangci/golangci-lint-action@v6 - tests: - runs-on: docker - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: stable - - name: Install dependencies - run: go get . - - name: Run tests - run: go test - diff --git a/.golangci.yml b/.golangci.yml index 4b9cac7..e110350 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -241,7 +241,7 @@ linters-settings: # Settings passed to gocritic. # The settings key is the name of a supported gocritic checker. - # The list of supported checkers can be find in https://go-critic.com/overview. + # The list of supported checkers can be find in https://go-critic.github.io/overview. settings: # Must be valid enabled check name. captLocal: @@ -272,24 +272,19 @@ linters-settings: # Size in bytes that makes the warning trigger. # Default: 512 sizeThreshold: 512 - # Whether to check test functions - # Default: true + # whether to check test functions (default true) skipTestFuncs: true rangeValCopy: - # Size in bytes that makes the warning trigger. - # Default: 128 + # size in bytes that makes the warning trigger (default 128) sizeThreshold: 128 - # Whether to check test functions. - # Default: true + # whether to check test functions (default true) skipTestFuncs: true - tooManyResultsChecker: - # Maximum number of results. - # Default: 5 - maxResults: 2 - truncateCmp: - # Whether to skip int/uint/uintptr types. - # Default: true - skipArchDependent: false + # ruleguard: + # # path to a gorules file for the ruleguard checker + # rules: '' + # truncateCmp: + # # whether to skip int/uint/uintptr types (default true) + # skipArchDependent: true underef: # Whether to skip (*x).method() calls where x is a pointer receiver. # Default: true @@ -306,24 +301,15 @@ linters-settings: # List of regexps for excluding particular comment lines from check. # Default: [] exclude: - # Exclude todo and fixme comments. - - "^fixme:|^FIXME:" - - "^todo:|^TODO:" - # Check that each sentence ends with a period. - # Default: true - period: true - # Check that each sentence starts with a capital letter. - # Default: false + # example: exclude comments which contain numbers + # - '[0-9]+' + # check that each sentence starts with a capital letter capital: true godox: - # Report any comments starting with keywords, this is useful for TODO or FIXME comments that - # might be left in the code accidentally and should be resolved before merging. - # Default: ["TODO", "BUG", "FIXME"] - keywords: - - BUG - - FIXME - - TODO + # report any comments starting with keywords, this is useful for TODO or FIXME comments that + # might be left in the code accidentally and should be resolved before merging + keywords: # default keywords are TODO, BUG, and FIXME, these can be overwritten by this setting - NOTE - OPTIMIZE # marks code that should be optimized before merging - HACK # marks hack-around that should be removed before merging @@ -370,11 +356,8 @@ linters-settings: # List of allowed modules. # Default: [] modules: - - github.com/alexedwards/argon2id - - github.com/google/uuid - github.com/hashicorp/hcl/v2 - github.com/pelletier/go-toml/v2 - - github.com/pressly/goose/v3 - github.com/stretchr/testify - modernc.org/sqlite # List of allowed module domains. @@ -384,26 +367,24 @@ linters-settings: - code.bcarlin.xyz - code.bcarlin.net - code.waarp.fr - blocked: {} + blocked: # List of blocked modules. # Default: [] - #modules: - # Blocked module. - # - github.com/uudashr/go-module: - # # Recommended modules that should be used instead. (Optional) - # recommendations: - # - golang.org/x/mod - # # Reason why the recommended module should be used. (Optional) - # reason: "`mod` is the official go.mod parser library." + modules: + # Blocked module. + - github.com/mattn/go-sqlite3: + recommendations: + - modernc.org/sqlite + reason: "sqlite is pure-go" # List of blocked module version constraints. # Default: [] - #versions: - # # Blocked module with version constraint. - # - github.com/mitchellh/go-homedir: - # # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons. - # version: "< 1.1.0" - # # Reason why the version constraint exists. (Optional) - # reason: "testing if blocked version constraint works." + versions: + # Blocked module with version constraint. + - github.com/mitchellh/go-homedir: + # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons. + version: "< 1.1.0" + # Reason why the version constraint exists. (Optional) + reason: "testing if blocked version constraint works." # Set to true to raise lint issues for packages that are loaded from a local path via replace directive. # Default: false #local_replace_directives: false @@ -568,7 +549,8 @@ linters-settings: # ). # Run `GL_DEBUG=govet golangci-lint run --enable=govet` to see default, all available analyzers, and enabled analyzers. # Default: [] - disable: [] + disable: + - fieldalignment # Settings per analyzer. settings: # Analyzer name, run `go tool vet help` to see all analyzers. @@ -1565,7 +1547,7 @@ linters-settings: rules: # Any struct tag type can be used. # Support string case: `camel`, `pascal`, `kebab`, `snake`, `upperSnake`, `goCamel`, `goPascal`, `goKebab`, `goSnake`, `upper`, `lower`, `header` - json: goCamel + json: snake yaml: goCamel xml: goCamel toml: goSnake @@ -1849,7 +1831,7 @@ linters-settings: - c convey.C - i int - T any - - op string + - ok bool whitespace: # Enforces newlines (or comments) after every multi-line if statement. diff --git a/LICENSE b/LICENSE index 3e5298d..fbf5f7f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 go +Copyright (c) 2020-2025 Bruno Carlin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal