Add wsl linter and fix

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-05-19 14:51:08 +04:00
parent eedfdcecc8
commit 9156d6a16a
882 changed files with 6068 additions and 574 deletions

View File

@@ -68,6 +68,7 @@ func (c AuthConfig) GetPepperBytes() ([]byte, error) {
if len(decoded) < 32 {
return nil, fmt.Errorf("decoded pepper must be at least 32 bytes long")
}
return decoded, nil
}
@@ -87,6 +88,7 @@ func (c AuthConfig) GetCookieSecretBytes() ([]byte, error) {
if len(decoded) < 32 {
return nil, fmt.Errorf("decoded cookie secret must be at least 32 bytes long")
}
return decoded, nil
}

View File

@@ -57,6 +57,7 @@ func (c *Config) GetSlackSigningSecret() string {
}
}
}
return ""
}
@@ -80,6 +81,7 @@ func (c *ConnectorConfig) UnmarshalJSON(data []byte) error {
if err := json.NewDecoder(bytes.NewReader(tmp.Settings)).Decode(&settings); err != nil {
return fmt.Errorf("cannot unmarshal settings: %w", err)
}
c.Settings = settings
}

View File

@@ -66,14 +66,18 @@ func (c *AgentsConfig) ResolveAgent(agent LLMAgentConfig) LLMAgentConfig {
if agent.Provider == "" {
agent.Provider = c.Default.Provider
}
if agent.ModelName == "" {
agent.ModelName = c.Default.ModelName
}
if agent.Temperature == nil {
agent.Temperature = c.Default.Temperature
}
if agent.MaxTokens == nil {
agent.MaxTokens = c.Default.MaxTokens
}
return agent
}

View File

@@ -92,14 +92,17 @@ func (cfg PgConfig) Options(options ...pg.Option) []pg.Option {
if cfg.CACertBundle != "" {
var certs []*x509.Certificate
pemData := []byte(cfg.CACertBundle)
for len(pemData) > 0 {
var block *pem.Block
block, pemData = pem.Decode(pemData)
if block == nil {
break
}
if block.Type != "CERTIFICATE" {
continue
}

View File

@@ -31,6 +31,7 @@ func (c SAMLConfig) SessionDurationTime() time.Duration {
if c.SessionDuration == 0 {
return 7 * 24 * time.Hour
}
return time.Duration(c.SessionDuration) * time.Second
}