Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

chore: update schema and nixops#976

Merged
dbarrosop merged 2 commits into
mainfrom
update3
Jul 30, 2025
Merged

chore: update schema and nixops#976
dbarrosop merged 2 commits into
mainfrom
update3

Conversation

@dbarrosop
Copy link
Copy Markdown
Member

@dbarrosop dbarrosop commented Jul 29, 2025

PR Type

Enhancement


Description

  • Code formatting improvements with consistent spacing

  • Update linter configuration to version 2

  • Update dependencies and example configurations

  • Fix linter directive from goerr113 to err113


Diagram Walkthrough

flowchart LR
  A["Code Formatting"] --> B["Consistent Spacing"]
  C["Linter Config"] --> D["Version 2 Update"]
  E["Dependencies"] --> F["Version Updates"]
  G["Error Handling"] --> H["Fix err113 Directive"]
Loading

File Walkthrough

Relevant files

@github-actions
Copy link
Copy Markdown
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Version Update

Node.js version updated from 18 to 22 without clear justification or compatibility verification. This could potentially break existing functions or introduce compatibility issues.

Version: ptr(int(22)),
Config Change

Major linter configuration restructure from version 1 to version 2 format. The new configuration structure and disabled linters should be validated to ensure code quality standards are maintained.

version: "2"
linters:
  default: all
  disable:
    - depguard
    - gomoddirectives
    - nlreturn
    - varnamelen
    - wsl
    - noinlineerr
  exclusions:
    generated: lax
    presets:
      - comments
      - common-false-positives
      - legacy
      - std-error-handling
    rules:
      - linters:
          - funlen
          - ireturn
        path: _test\.go
      - linters:
          - lll
        source: '^//go:generate '
      - linters:
          - gochecknoglobals
        text: Version is a global variable
    paths:
      - third_party$
      - builtin$
      - examples$
formatters:
  enable:
    - gci
    - gofmt
    - gofumpt
    - goimports
  exclusions:
    generated: lax
    paths:
      - third_party$
      - builtin$
      - examples$

@github-actions
Copy link
Copy Markdown
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Security
Validate command before execution

The command execution should be validated before starting to prevent potential
security issues. The cmd variable should be checked to ensure it contains a valid
executable path.

clienv/wf_login.go [65]

+if cmd == "" {
+    return fmt.Errorf("no browser command found for platform %s", runtime.GOOS)
+}
 if err := exec.CommandContext(ctx, cmd, args...).Start(); err != nil {
Suggestion importance[1-10]: 6

__

Why: Adding validation for the cmd variable before execution is a good security practice to prevent issues with empty commands, though the current code already handles different platforms appropriately.

Low
Use safer error formatting

The error message format string should be validated to prevent potential format
string vulnerabilities. Consider using a safer error construction approach.

cmd/dev/up.go [287-290]

-return "", "", fmt.Errorf( //nolint:err113
-    "invalid run service format, must be /path/to/config.toml:overlay_name, got %s",
-    value,
-)
+return "", "", fmt.Errorf("invalid run service format, must be /path/to/config.toml:overlay_name, got %q", value)
Suggestion importance[1-10]: 3

__

Why: The suggestion to use %q instead of %s for string formatting is a minor improvement for safety, but the current code is already safe since value is a controlled string parameter.

Low
General
Update Node.js to LTS version

The Node.js version should be updated to a more recent LTS version. Version 22 is
relatively new and may not be stable for production use. Consider using version 20
which is the current LTS.

cmd/config/example.go [122]

-Version: ptr(int(22)),
+Version: ptr(int(20)),
Suggestion importance[1-10]: 4

__

Why: The suggestion to use Node.js version 20 instead of 22 is reasonable for stability, but this appears to be an example configuration file where version 22 might be intentionally used to demonstrate newer features.

Low

@dbarrosop dbarrosop merged commit 5ef30cb into main Jul 30, 2025
8 checks passed
@dbarrosop dbarrosop deleted the update3 branch July 30, 2025 08:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants