Adds checkapi to the tools and a make target to run it.
Fixes#12360
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com>
#### Description
This pull request builds on the work done in #11493
This PR introduces Actionlint as part of the project to enable linting
of GitHub Workflow files. The changes ensure that Actionlint is
installed locally within the project and is automatically run during
pull requests to enforce consistency and best practices for workflow
files.
- Added a `actionlint` target to the Makefile for running Actionlint on
workflow files.
- Added actionlint configuration to `.github/actionlint.yaml`
- update `internal/tools/go.mod` and `internal/tools/go.sum`
- Ignored some shellcheck errors (with comments) since shellcheck isn't
always right.
#### Link to tracking issue
https://github.com/open-telemetry/opentelemetry-collector/issues/9676
#### Fixes
- Addresses potential linting errors in workflow files after changes are
made.
#### Testing
- The workflow has been tested to ensure the changes resolve identified
issues and maintain functionality.
- Verified that `make actionlint` runs correctly using the local binary.
- Confirmed that the GitHub Actions workflow triggers automatically when
relevant files are changed in a pull request.
- Tested for proper error handling and feedback during linting failures.
#### Documentation
No new documentation added, as this change is self-explanatory within
the context of CI.
---------
Co-authored-by: Damien Mathieu <42@dmathieu.com>
### This PR
- adds the githubgen tool as a dependency in internal/tools
- uses githubgen to generate codeowners and issue template files
- updates lots of metadata files by
- taking the existing codeowners file and feeding the info from there
back into the component metadata.yaml files or creating new
metadata.yaml files where none existed yet
- adds distributions.yaml as a basis the mostly already existing
`distributions:` keys in metadata.yaml files (needed for githubgen to
work correctly)
- adds relevant make commands to make the githubgen tool usage mostly
transparent to users
This change is a prerequisite to be able to ping codeowners reliably
with automated tooling as a next step.
Part of #11562
---------
Signed-off-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
#### Description
[gofumpt](https://golangci-lint.run/usage/linters/#gofumpt) is a
stricter format than gofmt, while being backwards compatible.
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
#### Description
All Testifylint rules are now fixed and ensured to be applied with
golangci-lint.
This removes the helper configuration in Makefile and tools module.
This code, copied from the opentelemetry-go repo, allows to generate
schema.go automatically as well, reducing effort needed to generate
semantic convention packages in the future
---------
Signed-off-by: Alex Boten <aboten@lightstep.com>
This is generated from the opentelemetry-configuration repository using
gojsonschema. Updated makefile to support this w/ `make genjsonschema`
Follow up to
https://github.com/open-telemetry/opentelemetry-collector/pull/7678
---------
Signed-off-by: Alex Boten <aboten@lightstep.com>
This is replicating the setup in the contrib repo that doesn't use
go-acc & gcovmerge for coverage. It uses tools built into go 1.20
instead
---------
Signed-off-by: Alex Boten <aboten@lightstep.com>
* [chore] use license shortform
To remain consistent w/ contrib repo, see https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/22052
Signed-off-by: Alex Boten <aboten@lightstep.com>
* make goporto
Signed-off-by: Alex Boten <aboten@lightstep.com>
---------
Signed-off-by: Alex Boten <aboten@lightstep.com>
* chore: adds porto and fixes vanity imports.
* chore: fixes target overriding.
* chore: fixes install of porto.
* chore: includes porto as a tool.
* chore: upgrades porto to check internals.
* chore: rebase and update vanity import.
* chore: removes unnecessary space.
* chore: rollsback vanity import in generated files.
* Add `apidiff` to internal/tools
* Add Makefile target for building apidiff snapshots
* Add Makefile target for comparing API snapshots
* Update apidiff comparison to only output when changes are detected
* Fix missing newline at end of Makefile
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Tidy mods in internal/tools
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>