You've already forked goreleaser
							
							
				mirror of
				https://github.com/goreleaser/goreleaser.git
				synced 2025-10-30 23:58:09 +02:00 
			
		
		
		
	chore(lint): enable revive
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
This commit is contained in:
		| @@ -6,3 +6,4 @@ linters: | ||||
|     - unconvert | ||||
|     - unparam | ||||
|     - wastedassign | ||||
|     - revive | ||||
|   | ||||
| @@ -426,6 +426,6 @@ func TestGiteaReleaseURLTemplate(t *testing.T) { | ||||
| 	urlTpl, err := client.ReleaseURLTemplate(ctx) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	expectedUrl := "https://gitea.com/owner/name/releases/download/{{ .Tag }}/{{ .ArtifactName }}" | ||||
| 	require.Equal(t, expectedUrl, urlTpl) | ||||
| 	expectedURL := "https://gitea.com/owner/name/releases/download/{{ .Tag }}/{{ .ArtifactName }}" | ||||
| 	require.Equal(t, expectedURL, urlTpl) | ||||
| } | ||||
|   | ||||
| @@ -78,8 +78,8 @@ func TestGitHubReleaseURLTemplate(t *testing.T) { | ||||
| 	urlTpl, err := client.ReleaseURLTemplate(ctx) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	expectedUrl := "https://github.com/owner/name/releases/download/{{ .Tag }}/{{ .ArtifactName }}" | ||||
| 	require.Equal(t, expectedUrl, urlTpl) | ||||
| 	expectedURL := "https://github.com/owner/name/releases/download/{{ .Tag }}/{{ .ArtifactName }}" | ||||
| 	require.Equal(t, expectedURL, urlTpl) | ||||
| } | ||||
|  | ||||
| func TestGitHubCreateReleaseWrongNameTemplate(t *testing.T) { | ||||
|   | ||||
| @@ -27,6 +27,6 @@ func TestGitLabReleaseURLTemplate(t *testing.T) { | ||||
| 	urlTpl, err := client.ReleaseURLTemplate(ctx) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	expectedUrl := "https://gitlab.com/owner/name/-/releases/{{ .Tag }}/downloads/{{ .ArtifactName }}" | ||||
| 	require.Equal(t, expectedUrl, urlTpl) | ||||
| 	expectedURL := "https://gitlab.com/owner/name/-/releases/{{ .Tag }}/downloads/{{ .ArtifactName }}" | ||||
| 	require.Equal(t, expectedURL, urlTpl) | ||||
| } | ||||
|   | ||||
| @@ -20,7 +20,7 @@ func Notice(ctx *context.Context, property string) { | ||||
| 	NoticeCustom(ctx, property, "`{{ .Property }}` should not be used anymore, check {{ .URL }} for more info") | ||||
| } | ||||
|  | ||||
| // Notice warns the user about the deprecation of the given property. | ||||
| // NoticeCustom warns the user about the deprecation of the given property. | ||||
| func NoticeCustom(ctx *context.Context, property, tmpl string) { | ||||
| 	ctx.Deprecated = true | ||||
| 	cli.Default.Padding += 3 | ||||
|   | ||||
| @@ -36,6 +36,8 @@ func (m *MockData) UnmarshalJSON(b []byte) error { | ||||
| 	return json.Unmarshal(b, (*t)(m)) | ||||
| } | ||||
|  | ||||
| // MarshalMockEnv mocks marshal. | ||||
| // | ||||
| // nolint: interfacer | ||||
| func MarshalMockEnv(data *MockData) string { | ||||
| 	b, err := data.MarshalJSON() | ||||
|   | ||||
| @@ -17,12 +17,12 @@ func (t Writer) Write(p []byte) (n int, err error) { | ||||
| 	return len(p), nil | ||||
| } | ||||
|  | ||||
| // Writer writes with log.Error. | ||||
| // ErrorWriter writes with log.Error. | ||||
| type ErrorWriter struct { | ||||
| 	ctx *log.Entry | ||||
| } | ||||
|  | ||||
| // NewWriter creates a new log writer. | ||||
| // NewErrWriter creates a new log writer. | ||||
| func NewErrWriter(ctx *log.Entry) ErrorWriter { | ||||
| 	return ErrorWriter{ctx: ctx} | ||||
| } | ||||
|   | ||||
| @@ -990,7 +990,7 @@ func TestRunPipeScoopWithSkip(t *testing.T) { | ||||
| 			Builds: []config.Build{ | ||||
| 				{Binary: "test"}, | ||||
| 			}, | ||||
| 			Dist: folder, | ||||
| 			Dist:        folder, | ||||
| 			ProjectName: "run-pipe", | ||||
| 			Scoop: config.Scoop{ | ||||
| 				Bucket: config.RepoRef{ | ||||
| @@ -999,8 +999,8 @@ func TestRunPipeScoopWithSkip(t *testing.T) { | ||||
| 				}, | ||||
| 				Description: "A run pipe test formula", | ||||
| 				Homepage:    "https://github.com/goreleaser", | ||||
| 				Name: "run-pipe", | ||||
| 				SkipUpload: "true", | ||||
| 				Name:        "run-pipe", | ||||
| 				SkipUpload:  "true", | ||||
| 			}, | ||||
| 		}, | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user