Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,7 @@
settings.formatter.oxfmt = {
command = "${pkgs.oxfmt}/bin/oxfmt";
options = [ "--no-error-on-unmatched-pattern" ];
includes = [
"*.md"
"*.yml"
"*.yaml"
"*.json"
"*.ts"
"*.tsx"
"*.js"
"*.jsx"
"*.html"
"*.css"
];
includes = [ "*" ];
excludes = [
"CHANGELOG.md"
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wildcard pattern in includes will match all git-tracked files, but the excludes list is incomplete. The change will cause oxfmt to be invoked on file types that should be excluded:

  1. Auto-generated lock files (flake.lock, uv.lock) which shouldn't be manually formatted
  2. Vendor/third-party code (vendor/**) which can cause merge conflicts when updated
  3. Files already handled by other formatters (*.py by ruff, *.nix by nixfmt)

The original explicit file extension list avoided these issues by only including specific file types. If keeping the wildcard pattern, the excludes list should be expanded to prevent processing these files. Consider:

excludes = [
  "CHANGELOG.md"
  "*.lock"
  "*.py"
  "*.nix"
  "vendor/**"
];

This maintains the simplicity of the wildcard while avoiding unnecessary processing and potential issues.

Suggested change
"CHANGELOG.md"
"CHANGELOG.md"
"*.lock"
"*.py"
"*.nix"
"vendor/**"

Copilot uses AI. Check for mistakes.
];
Expand Down
Loading