chore: update license

This commit is contained in:
Bruno Carlin 2025-02-08 03:21:07 +01:00
parent 5526815bb5
commit b78541fa58
3 changed files with 35 additions and 75 deletions

View file

@ -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

View file

@ -241,7 +241,7 @@ linters-settings:
# Settings passed to gocritic. # Settings passed to gocritic.
# The settings key is the name of a supported gocritic checker. # 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: settings:
# Must be valid enabled check name. # Must be valid enabled check name.
captLocal: captLocal:
@ -272,24 +272,19 @@ linters-settings:
# Size in bytes that makes the warning trigger. # Size in bytes that makes the warning trigger.
# Default: 512 # Default: 512
sizeThreshold: 512 sizeThreshold: 512
# Whether to check test functions # whether to check test functions (default true)
# Default: true
skipTestFuncs: true skipTestFuncs: true
rangeValCopy: rangeValCopy:
# Size in bytes that makes the warning trigger. # size in bytes that makes the warning trigger (default 128)
# Default: 128
sizeThreshold: 128 sizeThreshold: 128
# Whether to check test functions. # whether to check test functions (default true)
# Default: true
skipTestFuncs: true skipTestFuncs: true
tooManyResultsChecker: # ruleguard:
# Maximum number of results. # # path to a gorules file for the ruleguard checker
# Default: 5 # rules: ''
maxResults: 2 # truncateCmp:
truncateCmp: # # whether to skip int/uint/uintptr types (default true)
# Whether to skip int/uint/uintptr types. # skipArchDependent: true
# Default: true
skipArchDependent: false
underef: underef:
# Whether to skip (*x).method() calls where x is a pointer receiver. # Whether to skip (*x).method() calls where x is a pointer receiver.
# Default: true # Default: true
@ -306,24 +301,15 @@ linters-settings:
# List of regexps for excluding particular comment lines from check. # List of regexps for excluding particular comment lines from check.
# Default: [] # Default: []
exclude: exclude:
# Exclude todo and fixme comments. # example: exclude comments which contain numbers
- "^fixme:|^FIXME:" # - '[0-9]+'
- "^todo:|^TODO:" # check that each sentence starts with a capital letter
# Check that each sentence ends with a period.
# Default: true
period: true
# Check that each sentence starts with a capital letter.
# Default: false
capital: true capital: true
godox: godox:
# Report any comments starting with keywords, this is useful for TODO or FIXME comments that # 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. # might be left in the code accidentally and should be resolved before merging
# Default: ["TODO", "BUG", "FIXME"] keywords: # default keywords are TODO, BUG, and FIXME, these can be overwritten by this setting
keywords:
- BUG
- FIXME
- TODO
- NOTE - NOTE
- OPTIMIZE # marks code that should be optimized before merging - OPTIMIZE # marks code that should be optimized before merging
- HACK # marks hack-around that should be removed before merging - HACK # marks hack-around that should be removed before merging
@ -370,11 +356,8 @@ linters-settings:
# List of allowed modules. # List of allowed modules.
# Default: [] # Default: []
modules: modules:
- github.com/alexedwards/argon2id
- github.com/google/uuid
- github.com/hashicorp/hcl/v2 - github.com/hashicorp/hcl/v2
- github.com/pelletier/go-toml/v2 - github.com/pelletier/go-toml/v2
- github.com/pressly/goose/v3
- github.com/stretchr/testify - github.com/stretchr/testify
- modernc.org/sqlite - modernc.org/sqlite
# List of allowed module domains. # List of allowed module domains.
@ -384,26 +367,24 @@ linters-settings:
- code.bcarlin.xyz - code.bcarlin.xyz
- code.bcarlin.net - code.bcarlin.net
- code.waarp.fr - code.waarp.fr
blocked: {} blocked:
# List of blocked modules. # List of blocked modules.
# Default: [] # Default: []
#modules: modules:
# Blocked module. # Blocked module.
# - github.com/uudashr/go-module: - github.com/mattn/go-sqlite3:
# # Recommended modules that should be used instead. (Optional) recommendations:
# recommendations: - modernc.org/sqlite
# - golang.org/x/mod reason: "sqlite is pure-go"
# # Reason why the recommended module should be used. (Optional)
# reason: "`mod` is the official go.mod parser library."
# List of blocked module version constraints. # List of blocked module version constraints.
# Default: [] # Default: []
#versions: versions:
# # Blocked module with version constraint. # Blocked module with version constraint.
# - github.com/mitchellh/go-homedir: - github.com/mitchellh/go-homedir:
# # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons. # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons.
# version: "< 1.1.0" version: "< 1.1.0"
# # Reason why the version constraint exists. (Optional) # Reason why the version constraint exists. (Optional)
# reason: "testing if blocked version constraint works." 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. # Set to true to raise lint issues for packages that are loaded from a local path via replace directive.
# Default: false # Default: false
#local_replace_directives: 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. # Run `GL_DEBUG=govet golangci-lint run --enable=govet` to see default, all available analyzers, and enabled analyzers.
# Default: [] # Default: []
disable: [] disable:
- fieldalignment
# Settings per analyzer. # Settings per analyzer.
settings: settings:
# Analyzer name, run `go tool vet help` to see all analyzers. # Analyzer name, run `go tool vet help` to see all analyzers.
@ -1565,7 +1547,7 @@ linters-settings:
rules: rules:
# Any struct tag type can be used. # Any struct tag type can be used.
# Support string case: `camel`, `pascal`, `kebab`, `snake`, `upperSnake`, `goCamel`, `goPascal`, `goKebab`, `goSnake`, `upper`, `lower`, `header` # Support string case: `camel`, `pascal`, `kebab`, `snake`, `upperSnake`, `goCamel`, `goPascal`, `goKebab`, `goSnake`, `upper`, `lower`, `header`
json: goCamel json: snake
yaml: goCamel yaml: goCamel
xml: goCamel xml: goCamel
toml: goSnake toml: goSnake
@ -1849,7 +1831,7 @@ linters-settings:
- c convey.C - c convey.C
- i int - i int
- T any - T any
- op string - ok bool
whitespace: whitespace:
# Enforces newlines (or comments) after every multi-line if statement. # Enforces newlines (or comments) after every multi-line if statement.

View file

@ -1,6 +1,6 @@
MIT License 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 Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal