Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dex
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hdacloud
dex
Commits
c7fd9620
Unverified
Commit
c7fd9620
authored
4 months ago
by
Mark Sagi-Kazar
Browse files
Options
Downloads
Patches
Plain Diff
chore: fix linter config and violations
Signed-off-by:
Mark Sagi-Kazar
<
mark.sagikazar@gmail.com
>
parent
d066d8ea
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.golangci.yml
+13
-10
13 additions, 10 deletions
.golangci.yml
connector/saml/saml.go
+1
-1
1 addition, 1 deletion
connector/saml/saml.go
server/introspectionhandler.go
+1
-1
1 addition, 1 deletion
server/introspectionhandler.go
with
15 additions
and
12 deletions
.golangci.yml
+
13
−
10
View file @
c7fd9620
run
:
run
:
timeout
:
4m
timeout
:
4m
skip-dirs
:
-
storage/ent/db
# generated ent code
linters-settings
:
linters-settings
:
depguard
:
depguard
:
rules
:
rules
:
deprecated
:
deprecated
:
deny
:
deny
:
-
pkg
:
"
io/ioutil"
-
pkg
:
"
io/ioutil"
desc
:
"
The
'io/ioutil'
package
is
deprecated.
Use
corresponding
'os'
or
'io'
functions
instead."
desc
:
"
The
'io/ioutil'
package
is
deprecated.
Use
corresponding
'os'
or
'io'
functions
instead."
gci
:
gci
:
local-prefixes
:
github.com/dexidp/dex
sections
:
-
standard
-
default
-
prefix(github.com/dexidp/dex)
goimports
:
goimports
:
local-prefixes
:
github.com/dexidp/dex
local-prefixes
:
github.com/dexidp/dex
linters
:
linters
:
disable-all
:
true
disable-all
:
true
enable
:
enable
:
-
depguard
-
depguard
-
dogsled
-
dogsled
-
exhaustive
-
exhaustive
-
exportloopref
-
gci
-
gci
-
gochecknoinits
-
gochecknoinits
-
gocritic
-
gocritic
...
@@ -92,3 +91,7 @@ linters:
...
@@ -92,3 +91,7 @@ linters:
# - nestif
# - nestif
# - testpackage
# - testpackage
# - wsl
# - wsl
issues
:
exclude-dirs
:
-
storage/ent/db
# generated ent code
This diff is collapsed.
Click to expand it.
connector/saml/saml.go
+
1
−
1
View file @
c7fd9620
...
@@ -467,7 +467,7 @@ func (p *provider) validateStatus(status *status) error {
...
@@ -467,7 +467,7 @@ func (p *provider) validateStatus(status *status) error {
if
statusMessage
!=
nil
&&
statusMessage
.
Value
!=
""
{
if
statusMessage
!=
nil
&&
statusMessage
.
Value
!=
""
{
errorMessage
+=
" -> "
+
statusMessage
.
Value
errorMessage
+=
" -> "
+
statusMessage
.
Value
}
}
return
fmt
.
Errorf
(
errorMessage
)
return
errors
.
New
(
errorMessage
)
}
}
return
nil
return
nil
}
}
...
...
This diff is collapsed.
Click to expand it.
server/introspectionhandler.go
+
1
−
1
View file @
c7fd9620
...
@@ -170,7 +170,7 @@ func (s *Server) getTokenFromRequest(r *http.Request) (string, TokenTypeEnum, er
...
@@ -170,7 +170,7 @@ func (s *Server) getTokenFromRequest(r *http.Request) (string, TokenTypeEnum, er
return
""
,
0
,
newIntrospectBadRequestError
(
fmt
.
Sprintf
(
"HTTP method is
\"
%s
\"
, expected
\"
POST
\"
."
,
r
.
Method
))
return
""
,
0
,
newIntrospectBadRequestError
(
fmt
.
Sprintf
(
"HTTP method is
\"
%s
\"
, expected
\"
POST
\"
."
,
r
.
Method
))
}
else
if
err
:=
r
.
ParseForm
();
err
!=
nil
{
}
else
if
err
:=
r
.
ParseForm
();
err
!=
nil
{
return
""
,
0
,
newIntrospectBadRequestError
(
"Unable to parse HTTP body, make sure to send a properly formatted form request body."
)
return
""
,
0
,
newIntrospectBadRequestError
(
"Unable to parse HTTP body, make sure to send a properly formatted form request body."
)
}
else
if
r
.
PostForm
==
nil
||
len
(
r
.
PostForm
)
==
0
{
}
else
if
len
(
r
.
PostForm
)
==
0
{
return
""
,
0
,
newIntrospectBadRequestError
(
"The POST body can not be empty."
)
return
""
,
0
,
newIntrospectBadRequestError
(
"The POST body can not be empty."
)
}
else
if
!
r
.
PostForm
.
Has
(
"token"
)
{
}
else
if
!
r
.
PostForm
.
Has
(
"token"
)
{
return
""
,
0
,
newIntrospectBadRequestError
(
"The POST body doesn't contain 'token' parameter."
)
return
""
,
0
,
newIntrospectBadRequestError
(
"The POST body doesn't contain 'token' parameter."
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment