-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
crosslink tidylist
command (#642)
* Add `crosslink tidy` command * Applied suggestions and added test * Fixed linting and license check * Enable schedule validation in test * Renamed "tidy" to "tidylist" --------- Co-authored-by: Pablo Baeyens <[email protected]>
- Loading branch information
1 parent
1bce46e
commit c70d42c
Showing
18 changed files
with
436 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' | ||
change_type: 'enhancement' | ||
|
||
# The name of the component, or a single word describing the area of concern, (e.g. crosslink) | ||
component: crosslink | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: Adds a 'tidy' subcommand to generate 'go mod tidy' schedules | ||
|
||
# One or more tracking issues related to the change | ||
issues: [642] | ||
|
||
# (Optional) One or more lines of additional information to render under the primary note. | ||
# These lines will be padded with 2 spaces and then inserted directly into the document. | ||
# Use pipe (|) for multiline entries. | ||
subtext: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module go.opentelemetry.io/build-tools/crosslink/testroot | ||
|
||
go 1.20 |
5 changes: 5 additions & 0 deletions
5
crosslink/internal/mock_test_data/testTidyListAcyclic/testA/gomod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module go.opentelemetry.io/build-tools/crosslink/testroot/testA | ||
|
||
go 1.20 | ||
|
||
require go.opentelemetry.io/build-tools/crosslink/testroot/testB v1.0.0 |
5 changes: 5 additions & 0 deletions
5
crosslink/internal/mock_test_data/testTidyListAcyclic/testB/gomod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module go.opentelemetry.io/build-tools/crosslink/testroot/testB | ||
|
||
go 1.20 | ||
|
||
require go.opentelemetry.io/build-tools/crosslink/testroot/testC v1.0.0 |
3 changes: 3 additions & 0 deletions
3
crosslink/internal/mock_test_data/testTidyListAcyclic/testC/gomod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module go.opentelemetry.io/build-tools/crosslink/testroot/testC | ||
|
||
go 1.20 |
5 changes: 5 additions & 0 deletions
5
crosslink/internal/mock_test_data/testTidyListCyclic/allow-circular-overpermissive.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# This file lists the modules that are expected to have circular dependencies. | ||
# If it does not match the actual list, `crosslink tidylist` will return an error. | ||
testA | ||
testB | ||
testC |
4 changes: 4 additions & 0 deletions
4
crosslink/internal/mock_test_data/testTidyListCyclic/allow-circular.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# This file lists the modules that are expected to have circular dependencies. | ||
# If it does not match the actual list, `crosslink tidylist` will return an error. | ||
testA | ||
testB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module go.opentelemetry.io/build-tools/crosslink/testroot | ||
|
||
go 1.20 |
5 changes: 5 additions & 0 deletions
5
crosslink/internal/mock_test_data/testTidyListCyclic/testA/gomod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module go.opentelemetry.io/build-tools/crosslink/testroot/testA | ||
|
||
go 1.20 | ||
|
||
require go.opentelemetry.io/build-tools/crosslink/testroot/testB v1.0.0 |
6 changes: 6 additions & 0 deletions
6
crosslink/internal/mock_test_data/testTidyListCyclic/testB/gomod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module go.opentelemetry.io/build-tools/crosslink/testroot/testB | ||
|
||
go 1.20 | ||
|
||
require go.opentelemetry.io/build-tools/crosslink/testroot/testA v1.0.0 | ||
require go.opentelemetry.io/build-tools/crosslink/testroot/testC v1.0.0 |
3 changes: 3 additions & 0 deletions
3
crosslink/internal/mock_test_data/testTidyListCyclic/testC/gomod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module go.opentelemetry.io/build-tools/crosslink/testroot/testC | ||
|
||
go 1.20 |
Oops, something went wrong.