As we reevaluate how to best support and maintain Staging Ref in the future, we encourage development teams using this environment to highlight their use cases in the following issue: https://gitlab.com/gitlab-com/gl-infra/software-delivery/framework/software-delivery-framework-issue-tracker/-/issues/36.

Skip to content
Snippets Groups Projects
Commit a97f4884 authored by Archish's avatar Archish
Browse files

Ignored some of the lint issues with reason

parent e638fdaa
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -20,7 +20,7 @@ import (
)
const (
usageText = "usage: personal_access_token <name> <scope1[,scope2,...]> [ttl_days]"
usageText = "Usage: personal_access_token <name> <scope1[,scope2,...]> [ttl_days]"
expiresDateFormat = "2006-01-02"
)
Loading
Loading
@@ -63,7 +63,7 @@ func (c *Command) Execute(ctx context.Context) (context.Context, error) {
func (c *Command) parseTokenArgs() error {
if len(c.Args.SshArgs) < 3 || len(c.Args.SshArgs) > 4 {
return errors.New(usageText)
return errors.New(usageText) // nolint:stylecheck // usageText is customer facing
}
var rectfiedScopes []string
Loading
Loading
Loading
Loading
@@ -178,7 +178,7 @@ func TestExecute(t *testing.T) {
},
{
desc: "With unknown configured scopes",
PATConfig: config.PATConfig{AllowedScopes: []string{"unknown_repository"}},
PATConfig: config.PATConfig{AllowedScopes: []string{"read_reposotory"}}, //nolint:misspell //testing purpose
arguments: &commandargs.Shell{
GitlabKeyId: "default",
SshArgs: []string{cmdname, "newtoken", "read_api,read_repository"},
Loading
Loading
@@ -192,7 +192,7 @@ func TestExecute(t *testing.T) {
PATConfig: config.PATConfig{AllowedScopes: []string{"read_api", "read_repository"}},
arguments: &commandargs.Shell{
GitlabKeyId: "default",
SshArgs: []string{cmdname, "newtoken", "read_api,unknown_repository"},
SshArgs: []string{cmdname, "newtoken", "read_api,read_reposotory"}, //nolint:misspell //testing purpose
},
expectedOutput: "Token: YXuxvUgCEmeePY3G1YAa\n" +
"Scopes: read_api\n" +
Loading
Loading
@@ -200,12 +200,12 @@ func TestExecute(t *testing.T) {
},
{
desc: "With matching unknown requested scopes",
PATConfig: config.PATConfig{AllowedScopes: []string{"read_api", "unknown_repository"}},
PATConfig: config.PATConfig{AllowedScopes: []string{"read_api", "read_reposotory"}}, //nolint:misspell //testing purpose
arguments: &commandargs.Shell{
GitlabKeyId: "invalidscope",
SshArgs: []string{cmdname, "newtoken", "unknown_repository"},
SshArgs: []string{cmdname, "newtoken", "read_reposotory"}, //nolint:misspell //testing purpose
},
expectedError: "Invalid scope: 'unknown_repository'. Valid scopes are: [\"api\", \"create_runner\", \"k8s_proxy\", \"read_api\", \"read_registry\", \"read_repository\", \"read_user\", \"write_registry\", \"write_repository\"]",
expectedError: "Invalid scope: 'read_reposotory'. Valid scopes are: [\"api\", \"create_runner\", \"k8s_proxy\", \"read_api\", \"read_registry\", \"read_repository\", \"read_user\", \"write_registry\", \"write_repository\"]",
},
}
Loading
Loading
Loading
Loading
@@ -53,7 +53,7 @@ describe 'bin/gitlab-shell personal_access_token' do
remote:
remote: ========================================================================
remote:
remote: usage: personal_access_token <name> <scope1[,scope2,...]> [ttl_days]
remote: Usage: personal_access_token <name> <scope1[,scope2,...]> [ttl_days]
remote:
remote: ========================================================================
remote:
Loading
Loading
Loading
Loading
@@ -259,7 +259,6 @@ internal/gitlabnet/lfstransfer/client.go:125: internal/gitlabnet/lfstransfer/cli
internal/gitlabnet/lfstransfer/client.go:214:1: exported: exported method Client.Lock should have comment or be unexported (revive)
internal/gitlabnet/lfstransfer/client.go:271:1: exported: exported method Client.Unlock should have comment or be unexported (revive)
internal/gitlabnet/lfstransfer/client.go:321:1: exported: exported method Client.ListLocksVerify should have comment or be unexported (revive)
internal/gitlabnet/personalaccesstoken/client_test.go:30:5: go-require: do not use require in http handlers (testifylint)
internal/sshd/gssapi_unsupported.go:11:1: exported: exported function NewGSSAPIServer should have comment or be unexported (revive)
internal/sshd/gssapi_unsupported.go:19:6: exported: exported type OSGSSAPIServer should have comment or be unexported (revive)
internal/sshd/gssapi_unsupported.go:23:1: exported: exported method OSGSSAPIServer.AcceptSecContext should have comment or be unexported (revive)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment