Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 6.53.x] exclude .git from copyright linter #33360

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

agent-platform-auto-pr[bot]
Copy link
Contributor

Backport 7b0a606 from #33359.


<!--

  • Contributors are encouraged to read our CONTRIBUTING documentation.
  • Both Contributor and Reviewer Checklists are available at https://datadoghq.dev/datadog-agent/guidelines/contributing/#pull-requests.
  • The pull request:
    • Should only fix one issue or add one feature at a time.
    • Must update the test suite for the relevant functionality.
    • Should pass all status checks before being reviewed or merged.
  • Commit titles should be prefixed with general area of pull request's change.
  • Please fill the below sections if possible with relevant information or links.
    -->

What does this PR do?

When doing the copyright linting we collect all files matching *.go. If a branch is named with a name ending with .go, like NDMII-3313-integration-metric-stats.go you end up with a file .git/logs/refs/remotes/origin/NDMII-3313-integration-metric-stats.go that we are trying to lint. This PR exclude the .git folder from the linter.

Motivation

Describe how you validated your changes

<!--
Validate your changes before merge, ensuring that:

  • Your PR is tested by static / unit / integrations / e2e tests
  • Your PR description details which e2e tests cover your changes, if any
  • The PR description contains details of how you validated your changes. If you validated changes manually and not through automated tests, add context on why automated tests did not fit your changes validation.

If you want additional validation by a second person, you can ask reviewers to do it. Describe how to set up an environment for manual tests in the PR description. Manual validation is expected to happen on every commit before merge.

Any manual validation step should then map to an automated test. Manual validation should not substitute automation, minus exceptions not supported by test tooling yet.
-->

Possible Drawbacks / Trade-offs

Additional Notes

<!--

  • Anything else we should know when reviewing?
  • Include benchmarking information here whenever possible.
  • Include info about alternatives that were considered and why the proposed
    version was chosen.
    -->

When doing the copyright linting we collect all files matching *.go. If a branch is named with a name ending with .go, like NDMII-3313-integration-metric-stats.go you end up with a file .git/logs/refs/remotes/origin/NDMII-3313-integration-metric-stats.go that we are trying to lint. This PR exclude the .git folder from the linter.

(cherry picked from commit 7b0a606)
@agent-platform-auto-pr agent-platform-auto-pr bot added changelog/no-changelog qa/no-code-change No code change in Agent code requiring validation backport bot team/agent-devx-infra team/agent-devx-loops short review PR is simple enough to be reviewed quickly labels Jan 24, 2025
@agent-platform-auto-pr agent-platform-auto-pr bot requested review from a team as code owners January 24, 2025 15:16
@chouetz chouetz merged commit b14b072 into 6.53.x Jan 24, 2025
144 of 156 checks passed
@chouetz chouetz deleted the backport-33359-to-6.53.x branch January 24, 2025 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport bot changelog/no-changelog qa/no-code-change No code change in Agent code requiring validation short review PR is simple enough to be reviewed quickly team/agent-devx-infra team/agent-devx-loops
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants