Skip to content

Add linting for the replace directive in go.mod#41086

Merged
ycombinator merged 2 commits intoelastic:mainfrom
ycombinator:lint-replace
Oct 3, 2024
Merged

Add linting for the replace directive in go.mod#41086
ycombinator merged 2 commits intoelastic:mainfrom
ycombinator:lint-replace

Conversation

@ycombinator
Copy link
Contributor

@ycombinator ycombinator commented Oct 2, 2024

Proposed commit message

This change introduces linting for the replace directive in go.mod. It forbids local replacements (generally used as temporary measures during development) and it adds an allowlist for permanent replacements to restrict the dependencies that may be replaced.

Related: #41084 and #41085

@ycombinator ycombinator requested a review from a team as a code owner October 2, 2024 21:14
@ycombinator ycombinator requested review from faec and rdner October 2, 2024 21:14
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Oct 2, 2024
@ycombinator ycombinator added release-note:skip The PR should be ignored when processing the changelog Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team backport-8.x Automated backport to the 8.x branch with mergify and removed needs_team Indicates that the issue/PR needs a Team:* label labels Oct 2, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@ycombinator ycombinator requested review from leehinman and removed request for faec October 2, 2024 21:14
@ycombinator ycombinator merged commit 28169ee into elastic:main Oct 3, 2024
mergify bot pushed a commit that referenced this pull request Oct 3, 2024
* Forbid local replaces in go.mod

* Restrict replaced dependencies in go.mod to an allowlist

(cherry picked from commit 28169ee)
pierrehilbert pushed a commit that referenced this pull request Oct 4, 2024
* Forbid local replaces in go.mod

* Restrict replaced dependencies in go.mod to an allowlist

(cherry picked from commit 28169ee)

Co-authored-by: Shaunak Kashyap <ycombinator@gmail.com>
@khushijain21 khushijain21 mentioned this pull request Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-8.x Automated backport to the 8.x branch with mergify release-note:skip The PR should be ignored when processing the changelog Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants