Skip to content

Commit 2e4acd7

Browse files
committed
linter fix
1 parent 9321a61 commit 2e4acd7

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

pkg/security/generators/config_doc/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ package main
88

99
import (
1010
"encoding/json"
11+
"errors"
1112
"flag"
1213
"fmt"
1314
"go/ast"
@@ -126,7 +127,7 @@ func buildDocumentedSetting(
126127
) (setting, error) {
127128
description := meta["description"]
128129
if description == "" {
129-
description = meta["descritpion"]
130+
description = meta["description"]
130131
}
131132
if description == "" {
132133
return setting{}, fmt.Errorf("%s setting %q is missing a description", visibility, fieldName)
@@ -310,7 +311,7 @@ func parseConfigKeys(file *ast.File) (map[string]string, error) {
310311
}
311312

312313
if len(output) == 0 {
313-
return nil, fmt.Errorf("couldn't find config keys in NewRuntimeSecurityConfig")
314+
return nil, errors.New("couldn't find config keys in NewRuntimeSecurityConfig")
314315
}
315316

316317
return output, nil
@@ -419,4 +420,3 @@ func findConfigKeyInNode(node ast.Node) string {
419420

420421
return configKey
421422
}
422-

tasks/libs/cws/config_doc_gen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
@dataclass
88
class ConfigSetting:
99
name: str # noqa: F841
10-
config_key: str
10+
config_key: str # noqa: F841
1111
env_var: str
1212
description: str
1313
type: str

0 commit comments

Comments
 (0)