Commit Graph

8 Commits

Author SHA1 Message Date
Matthieu MOREL bf4324d1fa
[chore]: enable extra-rules from gofumpt and paramTypeCombine from go-critic (#13479)
#### Description

Check if code and import statements are formatted, with additional
rules.

* https://golangci-lint.run/usage/formatters/#gofumpt
* https://go-critic.com/overview.html#paramtypecombine

This is the application of golangci-lint fmt ./... , the Makefile has
been update to include this behavior

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2025-07-30 14:57:53 +00:00
Matthieu MOREL 564818fd7f
[chore]: fix testifylint rules (#12791)
#### Description

Fixes testifylint rules which where disabled with golangci-lint v2
upgrade

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-04-02 23:10:07 +00:00
Bogdan Drutu d9b97ffb43
[metadatatest] Generate NewSettings that accepts componenttest.Telemetry (#12216)
This is the last functionality needed to replace
`metadatatest.Telemetry` with `componenttest.Telemetry`.

The `metadatatest.Telemetry` will be deprecated next release to give
time to change contrib since it is a large change.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-01-30 21:42:20 +00:00
Chao Weng c2f1599df9
Generate assert function for each metric in mdatagen (#12179)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Completion of #12167 , cc @bogdandrutu 

Updated one test to verify the change, will update the rest ones after
this PR merges.
<!-- Issue number if applicable -->
#### Link to tracking issue
n/a

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Added

<!--Describe the documentation added.-->
#### Documentation
Added
<!--Please delete paragraphs that you did not use before submitting.-->
2025-01-25 16:52:04 +00:00
Bogdan Drutu bdf3ce4e83
Make scrapercontroler more generic and move closer to the scraperreceiver (#12103)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-01-17 00:28:07 +00:00
Bogdan Drutu c56efd3556
Change metadata class type for scraperhelper, fix metrics tests (#12086)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-01-15 21:40:47 +00:00
Chao Weng 67f00ebcc1
[chore] Use attribute.Int64 instead of attribute.KeyValue in obs_metr… (#12078)
…ics_test

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Update the tests according to comment:
https://github.com/open-telemetry/opentelemetry-collector/pull/12036#discussion_r1910681666

<!-- Issue number if applicable -->
#### Link to tracking issue
n/a

<!--Describe what testing was performed and which tests were added.-->
#### Testing
n/a

<!--Describe the documentation added.-->
#### Documentation
n/a

<!--Please delete paragraphs that you did not use before submitting.-->

Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-01-14 17:16:20 +00:00
Bogdan Drutu af09df1123
Move scraperhelper under scraper in a separate module (#11985)
Fixes
https://github.com/open-telemetry/opentelemetry-collector/issues/11003

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-01-06 17:17:55 +00:00