1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2026-06-03 18:35:08 +02:00
Files
opentelemetry-go/.golangci.yml
T
renovate[bot] 2cce189955 chore(deps): update module github.com/mgechev/revive to v1.10.0 (#6841)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[github.com/mgechev/revive](https://redirect.github.com/mgechev/revive)
| `v1.9.0` -> `v1.10.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fmgechev%2frevive/v1.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fmgechev%2frevive/v1.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fmgechev%2frevive/v1.9.0/v1.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fmgechev%2frevive/v1.9.0/v1.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>mgechev/revive (github.com/mgechev/revive)</summary>

###
[`v1.10.0`](https://redirect.github.com/mgechev/revive/releases/tag/v1.10.0)

[Compare
Source](https://redirect.github.com/mgechev/revive/compare/v1.9.0...v1.10.0)

#### What's Changed

- var-naming: detect meaningless package names by
[@&#8203;alexandear](https://redirect.github.com/alexandear) in
[https://github.com/mgechev/revive/pull/1312](https://redirect.github.com/mgechev/revive/pull/1312)
- docs: update golangci-lint configuration to v2 by
[@&#8203;alexandear](https://redirect.github.com/alexandear) in
[https://github.com/mgechev/revive/pull/1318](https://redirect.github.com/mgechev/revive/pull/1318)
- var-name checks each package name only once by
[@&#8203;chavacava](https://redirect.github.com/chavacava) in
[https://github.com/mgechev/revive/pull/1319](https://redirect.github.com/mgechev/revive/pull/1319)
- var-naming: remove regex from code by
[@&#8203;mfederowicz](https://redirect.github.com/mfederowicz) in
[https://github.com/mgechev/revive/pull/1322](https://redirect.github.com/mgechev/revive/pull/1322)
- fix(1323): false positive in get-return rule for HTTP Get handlers by
[@&#8203;chavacava](https://redirect.github.com/chavacava) in
[https://github.com/mgechev/revive/pull/1325](https://redirect.github.com/mgechev/revive/pull/1325)
- chore: enable a few revive rules by
[@&#8203;alexandear](https://redirect.github.com/alexandear) in
[https://github.com/mgechev/revive/pull/1330](https://redirect.github.com/mgechev/revive/pull/1330)
- chore: remove redundant typeparams for Go 1.17 by
[@&#8203;alexandear](https://redirect.github.com/alexandear) in
[https://github.com/mgechev/revive/pull/1331](https://redirect.github.com/mgechev/revive/pull/1331)
- chore: avoid third-party morphy2k/revive-action in CI by
[@&#8203;alexandear](https://redirect.github.com/alexandear) in
[https://github.com/mgechev/revive/pull/1334](https://redirect.github.com/mgechev/revive/pull/1334)
- chore: remove redundant //revive:disable-line by
[@&#8203;alexandear](https://redirect.github.com/alexandear) in
[https://github.com/mgechev/revive/pull/1335](https://redirect.github.com/mgechev/revive/pull/1335)
- fix(deps): update module golang.org/x/sync to v0.14.0 by
[@&#8203;renovate](https://redirect.github.com/renovate) in
[https://github.com/mgechev/revive/pull/1337](https://redirect.github.com/mgechev/revive/pull/1337)
- chore(deps): update module golang.org/x/sys to v0.33.0 by
[@&#8203;renovate](https://redirect.github.com/renovate) in
[https://github.com/mgechev/revive/pull/1336](https://redirect.github.com/mgechev/revive/pull/1336)
- chore(deps): update module golang.org/x/text to v0.25.0 by
[@&#8203;renovate](https://redirect.github.com/renovate) in
[https://github.com/mgechev/revive/pull/1338](https://redirect.github.com/mgechev/revive/pull/1338)
- fix(deps): update module golang.org/x/tools to v0.33.0 by
[@&#8203;renovate](https://redirect.github.com/renovate) in
[https://github.com/mgechev/revive/pull/1339](https://redirect.github.com/mgechev/revive/pull/1339)
- chore(deps): update codeberg.org/chavacava/garif to v0.2.0 by
[@&#8203;miparnisari](https://redirect.github.com/miparnisari) in
[https://github.com/mgechev/revive/pull/1340](https://redirect.github.com/mgechev/revive/pull/1340)
- docs: fix displaying rules table on revive.run by
[@&#8203;alexandear](https://redirect.github.com/alexandear) in
[https://github.com/mgechev/revive/pull/1349](https://redirect.github.com/mgechev/revive/pull/1349)
- Integrate golangci-lint into CI/CD pipeline by
[@&#8203;ArjunRajpal123](https://redirect.github.com/ArjunRajpal123) in
[https://github.com/mgechev/revive/pull/1346](https://redirect.github.com/mgechev/revive/pull/1346)
- chore: remove unused deploy key by
[@&#8203;alexandear](https://redirect.github.com/alexandear) in
[https://github.com/mgechev/revive/pull/1352](https://redirect.github.com/mgechev/revive/pull/1352)
- Remove tablewriter dependency by
[@&#8203;volfgox](https://redirect.github.com/volfgox) in
[https://github.com/mgechev/revive/pull/1351](https://redirect.github.com/mgechev/revive/pull/1351)
- tiny refactoring on friendly, sarif and stylish formatters by
[@&#8203;chavacava](https://redirect.github.com/chavacava) in
[https://github.com/mgechev/revive/pull/1355](https://redirect.github.com/mgechev/revive/pull/1355)
- fix(deps): update module github.com/mgechev/dots to v1.0.0 by
[@&#8203;renovate](https://redirect.github.com/renovate) in
[https://github.com/mgechev/revive/pull/1358](https://redirect.github.com/mgechev/revive/pull/1358)
- Update rule description URLs to point to revive.run by
[@&#8203;volfgox](https://redirect.github.com/volfgox) in
[https://github.com/mgechev/revive/pull/1360](https://redirect.github.com/mgechev/revive/pull/1360)
- chore: add linter for Markdown files by
[@&#8203;alexandear](https://redirect.github.com/alexandear) in
[https://github.com/mgechev/revive/pull/1361](https://redirect.github.com/mgechev/revive/pull/1361)
-
fix([#&#8203;1367](https://redirect.github.com/mgechev/revive/issues/1367)):
struct-tag with validate is missing built-in rules by
[@&#8203;chavacava](https://redirect.github.com/chavacava) in
[https://github.com/mgechev/revive/pull/1368](https://redirect.github.com/mgechev/revive/pull/1368)
- time-date: add rule to check for time.Date usage by
[@&#8203;ccoVeille](https://redirect.github.com/ccoVeille) in
[https://github.com/mgechev/revive/pull/1327](https://redirect.github.com/mgechev/revive/pull/1327)
-
fix([#&#8203;1363](https://redirect.github.com/mgechev/revive/issues/1363)):
package-comments ignores //nolint directives by
[@&#8203;chavacava](https://redirect.github.com/chavacava) in
[https://github.com/mgechev/revive/pull/1366](https://redirect.github.com/mgechev/revive/pull/1366)
- refactor: removes `get` from getters names by
[@&#8203;chavacava](https://redirect.github.com/chavacava) in
[https://github.com/mgechev/revive/pull/1373](https://redirect.github.com/mgechev/revive/pull/1373)
- refactor: test utils functions by removing redundant test instructions
parsing and simplifying asserting functions by
[@&#8203;chavacava](https://redirect.github.com/chavacava) in
[https://github.com/mgechev/revive/pull/1374](https://redirect.github.com/mgechev/revive/pull/1374)
- docs: format code snippets in markdown files by
[@&#8203;alexandear](https://redirect.github.com/alexandear) in
[https://github.com/mgechev/revive/pull/1324](https://redirect.github.com/mgechev/revive/pull/1324)
- fix: avoid false positive for blank identifier by
[@&#8203;ccoVeille](https://redirect.github.com/ccoVeille) in
[https://github.com/mgechev/revive/pull/1376](https://redirect.github.com/mgechev/revive/pull/1376)
- chore: improve time-date decimal tests by
[@&#8203;ccoVeille](https://redirect.github.com/ccoVeille) in
[https://github.com/mgechev/revive/pull/1378](https://redirect.github.com/mgechev/revive/pull/1378)
- new rule to spot unnecessary use of formatting functions by
[@&#8203;chavacava](https://redirect.github.com/chavacava) in
[https://github.com/mgechev/revive/pull/1372](https://redirect.github.com/mgechev/revive/pull/1372)
- refactor: enable gocritic linter; fix lint issues by
[@&#8203;alexandear](https://redirect.github.com/alexandear) in
[https://github.com/mgechev/revive/pull/1375](https://redirect.github.com/mgechev/revive/pull/1375)
- refactor: gofmt testdata by
[@&#8203;alexandear](https://redirect.github.com/alexandear) in
[https://github.com/mgechev/revive/pull/1379](https://redirect.github.com/mgechev/revive/pull/1379)
- refactor: moves code related to AST from rule.utils into astutils
package by [@&#8203;chavacava](https://redirect.github.com/chavacava) in
[https://github.com/mgechev/revive/pull/1380](https://redirect.github.com/mgechev/revive/pull/1380)
- feature: Add nil timezone handling detection to time-date rule by
[@&#8203;ccoVeille](https://redirect.github.com/ccoVeille) in
[https://github.com/mgechev/revive/pull/1377](https://redirect.github.com/mgechev/revive/pull/1377)
- chore: enable thelper linter in golangci-lint by
[@&#8203;ccoVeille](https://redirect.github.com/ccoVeille) in
[https://github.com/mgechev/revive/pull/1386](https://redirect.github.com/mgechev/revive/pull/1386)
- chore: enable dupword linter in golangci-lint by
[@&#8203;ccoVeille](https://redirect.github.com/ccoVeille) in
[https://github.com/mgechev/revive/pull/1385](https://redirect.github.com/mgechev/revive/pull/1385)
- chore: enforce American English spelling in golangci-lint by
[@&#8203;ccoVeille](https://redirect.github.com/ccoVeille) in
[https://github.com/mgechev/revive/pull/1384](https://redirect.github.com/mgechev/revive/pull/1384)
- docs: improve comments for functions; enable godot by
[@&#8203;alexandear](https://redirect.github.com/alexandear) in
[https://github.com/mgechev/revive/pull/1382](https://redirect.github.com/mgechev/revive/pull/1382)
- docs: use contrib.rocks to make contributors section shorter by
[@&#8203;alexandear](https://redirect.github.com/alexandear) in
[https://github.com/mgechev/revive/pull/1381](https://redirect.github.com/mgechev/revive/pull/1381)
- feature: detect time/date out of bounds in time-date rule by
[@&#8203;ccoVeille](https://redirect.github.com/ccoVeille) in
[https://github.com/mgechev/revive/pull/1370](https://redirect.github.com/mgechev/revive/pull/1370)
- refactor: simplifies the implementation of rule call-to-gc by
[@&#8203;chavacava](https://redirect.github.com/chavacava) in
[https://github.com/mgechev/revive/pull/1388](https://redirect.github.com/mgechev/revive/pull/1388)
- feature: rule use-fmt-print by
[@&#8203;chavacava](https://redirect.github.com/chavacava) in
[https://github.com/mgechev/revive/pull/1389](https://redirect.github.com/mgechev/revive/pull/1389)

#### New Contributors

- [@&#8203;miparnisari](https://redirect.github.com/miparnisari) made
their first contribution in
[https://github.com/mgechev/revive/pull/1340](https://redirect.github.com/mgechev/revive/pull/1340)
- [@&#8203;ArjunRajpal123](https://redirect.github.com/ArjunRajpal123)
made their first contribution in
[https://github.com/mgechev/revive/pull/1346](https://redirect.github.com/mgechev/revive/pull/1346)
- [@&#8203;volfgox](https://redirect.github.com/volfgox) made their
first contribution in
[https://github.com/mgechev/revive/pull/1351](https://redirect.github.com/mgechev/revive/pull/1351)

**Full Changelog**:
https://github.com/mgechev/revive/compare/v1.9.0...v1.10.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/open-telemetry/opentelemetry-go).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC4zMy42IiwidXBkYXRlZEluVmVyIjoiNDAuNTAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiU2tpcCBDaGFuZ2Vsb2ciLCJkZXBlbmRlbmNpZXMiXX0=-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn <codingalias@gmail.com>
2025-06-16 12:33:22 -07:00

251 lines
7.0 KiB
YAML

version: "2"
run:
issues-exit-code: 1
tests: true
linters:
default: none
enable:
- asasalint
- bodyclose
- depguard
- errcheck
- errorlint
- godot
- gosec
- govet
- ineffassign
- misspell
- perfsprint
- revive
- staticcheck
- testifylint
- unconvert
- unparam
- unused
- usestdlibvars
- usetesting
settings:
depguard:
rules:
auto/sdk:
files:
- '!internal/global/trace.go'
- ~internal/global/trace_test.go
deny:
- pkg: go.opentelemetry.io/auto/sdk
desc: Do not use SDK from automatic instrumentation.
non-tests:
files:
- '!$test'
- '!**/*test/*.go'
- '!**/internal/matchers/*.go'
deny:
- pkg: testing
- pkg: github.com/stretchr/testify
- pkg: crypto/md5
- pkg: crypto/sha1
- pkg: crypto/**/pkix
otel-internal:
files:
- '**/sdk/*.go'
- '**/sdk/**/*.go'
- '**/exporters/*.go'
- '**/exporters/**/*.go'
- '**/schema/*.go'
- '**/schema/**/*.go'
- '**/metric/*.go'
- '**/metric/**/*.go'
- '**/bridge/*.go'
- '**/bridge/**/*.go'
- '**/trace/*.go'
- '**/trace/**/*.go'
- '**/log/*.go'
- '**/log/**/*.go'
deny:
- pkg: go.opentelemetry.io/otel/internal$
desc: Do not use cross-module internal packages.
- pkg: go.opentelemetry.io/otel/internal/internaltest
desc: Do not use cross-module internal packages.
otlp-internal:
files:
- '!**/exporters/otlp/internal/**/*.go'
deny:
- pkg: go.opentelemetry.io/otel/exporters/otlp/internal
desc: Do not use cross-module internal packages.
otlpmetric-internal:
files:
- '!**/exporters/otlp/otlpmetric/internal/*.go'
- '!**/exporters/otlp/otlpmetric/internal/**/*.go'
deny:
- pkg: go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal
desc: Do not use cross-module internal packages.
otlptrace-internal:
files:
- '!**/exporters/otlp/otlptrace/*.go'
- '!**/exporters/otlp/otlptrace/internal/**.go'
deny:
- pkg: go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal
desc: Do not use cross-module internal packages.
godot:
exclude:
# Exclude links.
- '^ *\[[^]]+\]:'
# Exclude sentence fragments for lists.
- ^[ ]*[-•]
# Exclude sentences prefixing a list.
- :$
misspell:
locale: US
ignore-rules:
- cancelled
perfsprint:
int-conversion: true
err-error: true
errorf: true
sprintf1: true
strconcat: true
revive:
confidence: 0.01
rules:
- name: blank-imports
- name: bool-literal-in-expr
- name: constant-logical-expr
- name: context-as-argument
arguments:
- allowTypesBefore: '*testing.T'
disabled: true
- name: context-keys-type
- name: deep-exit
- name: defer
arguments:
- - call-chain
- loop
- name: dot-imports
- name: duplicated-imports
- name: early-return
arguments:
- preserveScope
- name: empty-block
- name: empty-lines
- name: error-naming
- name: error-return
- name: error-strings
- name: errorf
- name: exported
arguments:
- sayRepetitiveInsteadOfStutters
- name: flag-parameter
- name: identical-branches
- name: if-return
- name: import-shadowing
- name: increment-decrement
- name: indent-error-flow
arguments:
- preserveScope
- name: package-comments
- name: range
- name: range-val-in-closure
- name: range-val-address
- name: redefines-builtin-id
- name: string-format
arguments:
- - panic
- /^[^\n]*$/
- must not contain line breaks
- name: struct-tag
- name: superfluous-else
arguments:
- preserveScope
- name: time-equal
- name: unconditional-recursion
- name: unexported-return
- name: unhandled-error
arguments:
- fmt.Fprint
- fmt.Fprintf
- fmt.Fprintln
- fmt.Print
- fmt.Printf
- fmt.Println
- name: unnecessary-stmt
- name: useless-break
- name: var-declaration
- name: var-naming
arguments:
- ["ID"] # AllowList
- ["Otel", "Aws", "Gcp"] # DenyList
- name: waitgroup-by-value
testifylint:
enable-all: true
disable:
- float-compare
- go-require
- require-error
exclusions:
generated: lax
presets:
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- revive
path: schema/v.*/types/.*
text: avoid meaningless package names
# TODO: Having appropriate comments for exported objects helps development,
# even for objects in internal packages. Appropriate comments for all
# exported objects should be added and this exclusion removed.
- linters:
- revive
path: .*internal/.*
text: exported (method|function|type|const) (.+) should have comment or be unexported
# Yes, they are, but it's okay in a test.
- linters:
- revive
path: _test\.go
text: exported func.*returns unexported type.*which can be annoying to use
# Example test functions should be treated like main.
- linters:
- revive
path: example.*_test\.go
text: calls to (.+) only in main[(][)] or init[(][)] functions
# It's okay to not run gosec and perfsprint in a test.
- linters:
- gosec
- perfsprint
path: _test\.go
# Ignoring gosec G404: Use of weak random number generator (math/rand instead of crypto/rand)
# as we commonly use it in tests and examples.
- linters:
- gosec
text: 'G404:'
# Ignoring gosec G402: TLS MinVersion too low
# as the https://pkg.go.dev/crypto/tls#Config handles MinVersion default well.
- linters:
- gosec
text: 'G402: TLS MinVersion too low.'
paths:
- third_party$
- builtin$
- examples$
issues:
max-issues-per-linter: 0
max-same-issues: 0
formatters:
enable:
- gofumpt
- goimports
- golines
settings:
goimports:
local-prefixes:
- go.opentelemetry.io
golines:
max-len: 120
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$