Matthieu MOREL
1bae8f7347
chore: enable extra-rules from gofumpt ( #7114 )
...
#### Description
Enable extra rules from
[gofumpt](https://golangci-lint.run/usage/formatters/#gofumpt ) that also
fixes paramTypeCombine from go-critic
Also defines `go.opentelemetry.io/otel` as in
https://github.com/open-telemetry/opentelemetry-go-contrib/pull/7637
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
2025-08-03 08:24:33 -07:00
Matthieu MOREL
982391315f
chore: enable gocritic linter ( #7095 )
...
#### Description
Enable and fixes several rules from
[gocritic](https://golangci-lint.run/usage/linters/#gocritic ) linter
---------
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
2025-07-29 09:20:32 -07:00
Mikhail Mazurskiy
5e1c62a2d5
Modernize ( #7089 )
...
Use
https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize
to update code to new style.
---------
Co-authored-by: Flc゛ <four_leaf_clover@foxmail.com >
Co-authored-by: Damien Mathieu <42@dmathieu.com >
2025-07-29 10:19:11 +02:00
Tyler Yahn
7512a2be2e
Add the golines golangci-lint formatter ( #6513 )
...
Ensure consistent line wrapping (<= 120 characters) within the project.
2025-03-30 03:46:44 -07:00
Matthieu MOREL
e98ef1bfdb
[chore]: enable usestdlibvars linter ( #6001 )
...
#### Description
[usestdlibvars](https://golangci-lint.run/usage/linters/#usestdlibvars )
is a linter that detect the possibility to use variables/constants from
the Go standard library.
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
2024-11-25 12:02:46 -08:00
Robert Pająk
7dea232a46
[chore] Simplify the license header ( #4987 )
2024-02-29 07:05:28 +01:00
Ziqi Zhao
096a162418
Add http.method attribute to http server metric ( #3018 )
...
* Add http.method attribute to http server metric
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com >
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com >
* fix lint
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com >
* fix for reviews
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com >
* add changelog entry
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com >
2022-07-19 00:07:18 -04:00
Tyler Yahn
1f5b159161
Use already enabled revive linter and add depguard ( #2883 )
...
* Refactor golangci-lint conf
Order settings alphabetically.
* Add revive settings to golangci conf
* Check blank imports
* Check bool-literal-in-expr
* Check constant-logical-expr
* Check context-as-argument
* Check context-key-type
* Check deep-exit
* Check defer
* Check dot-imports
* Check duplicated-imports
* Check early-return
* Check empty-block
* Check empty-lines
* Check error-naming
* Check error-return
* Check error-strings
* Check errorf
* Stop ignoring context first arg in tests
* Check exported comments
* Check flag-parameter
* Check identical branches
* Check if-return
* Check increment-decrement
* Check indent-error-flow
* Check deny list of go imports
* Check import shadowing
* Check package comments
* Check range
* Check range val in closure
* Check range val address
* Check redefines builtin id
* Check string-format
* Check struct tag
* Check superfluous else
* Check time equal
* Check var naming
* Check var declaration
* Check unconditional recursion
* Check unexported return
* Check unhandled errors
* Check unnecessary stmt
* Check unnecessary break
* Check waitgroup by value
* Exclude deep-exit check in example*_test.go files
2022-05-19 15:15:07 -05:00
Tyler Yahn
a8ea3dbb46
Replace use of old term label with attribute ( #2790 )
...
* Replace use of old term label with attribute
The specification has unified on the term attribute to describe
key-value pairs. There exist still many hold-overs of the use of the
term label. This updates those uses or deprecates exported types and
functions in favor of renamed forms.
* fix infinite recursion
* Remove backticks from attribute set docs
* Remove LabelFilterSelector entirely
* Remove Metadata.Labels instead of deprecate
* Update changelog with public changes
* Revert OC err msg
2022-04-18 07:31:31 -07:00
Tyler Yahn
db7fd1bb51
Add semantic conventions generation Make target ( #2758 )
...
* No wrap RELEASING Semantic Convention Generation section
* Initial generator
* Update template render
* Add exception and schema templates
* Add semconv/internal http unification
* Add http template
* Add licenses header
* Embed the templates
* Update static version in schema tmpl
* Add semconv-generate target to Makefile
Use this target to generate versions of the semconv packages.
* Generate semconv packages
* Update RELEASING to use make semconv-generate
* Add comments to semconvkit
* Make SemVer a method instead of a field
* Remove semconv/v* from codecov
* Fix lint for semconvkit main.go
* Fix documentation of validateHTTPStatusCode
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com >
2022-04-12 13:40:43 -07:00