Skip to content

Commit a9102e5

Browse files
committed
review: mygcl -> custom-gcl
1 parent d81d4d1 commit a9102e5

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
coverage.out
2020
coverage.xml
2121
/custom-golangci-lint
22-
/gcl-custom
23-
.mygcl.yml
24-
.mygcl.yaml
22+
/custom-gcl
23+
.custom-gcl.yml
24+
.custom-gcl.yaml

.mygcl.reference.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version: v1.56.2
44

55
# the name of the custom binary.
66
# Optional.
7-
# Default: gcl-custom
7+
# Default: custom-gcl
88
name: custom-golangci-lint
99

1010
# The directory path used to store the custom binary.

docs/src/docs/plugins/module-plugins.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ An example linter can be found at [here](https://github.com/golangci/example-plu
66

77
## The Automatic Way
88

9-
- define your building configuration into `.mygcl.yml`
9+
- define your building configuration into `.custom-gcl.yml`
1010
- run the command `golangci-lint custom` ( or `golangci-lint custom -v` to have logs)
1111
- define the plugin inside the `linters-settings.custom` section with the type `module`.
1212
- run your custom version of golangci-lint
@@ -17,7 +17,7 @@ Requirements:
1717

1818
### Configuration Example
1919

20-
```yaml title=.mygcl.yml
20+
```yaml title=.custom-gcl.yml
2121
version: v1.57.0
2222
plugins:
2323
# a plugin from a Go proxy

pkg/commands/custom.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/golangci/golangci-lint/pkg/logutils"
1313
)
1414

15-
const envKeepTempFiles = "MYGCL_KEEP_TEMP_FILES"
15+
const envKeepTempFiles = "CUSTOM_GCL_KEEP_TEMP_FILES"
1616

1717
type customCommand struct {
1818
cmd *cobra.Command
@@ -57,7 +57,7 @@ func (c *customCommand) preRunE(_ *cobra.Command, _ []string) error {
5757
func (c *customCommand) runE(_ *cobra.Command, _ []string) error {
5858
ctx := context.Background()
5959

60-
tmp, err := os.MkdirTemp(os.TempDir(), "mygcl")
60+
tmp, err := os.MkdirTemp(os.TempDir(), "custom-gcl")
6161
if err != nil {
6262
return fmt.Errorf("create temporary directory: %w", err)
6363
}

pkg/commands/internal/builder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ func (b Builder) goBuild(ctx context.Context, binaryName string) error {
146146
cmd := exec.CommandContext(ctx, "go", "build",
147147
"-ldflags",
148148
fmt.Sprintf(
149-
"-s -w -X 'main.version=%s-mygcl' -X 'main.date=%s'",
149+
"-s -w -X 'main.version=%s-custom-gcl' -X 'main.date=%s'",
150150
sanitizeVersion(b.cfg.Version), time.Now().UTC().String(),
151151
),
152152
"-o", binaryName,

pkg/commands/internal/configuration.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import (
1010
"gopkg.in/yaml.v3"
1111
)
1212

13-
const base = ".mygcl"
13+
const base = ".custom-gcl"
1414

15-
const defaultBinaryName = "gcl-custom"
15+
const defaultBinaryName = "custom-gcl"
1616

1717
// Configuration represents the configuration file.
1818
type Configuration struct {

0 commit comments

Comments
 (0)