You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the ratchet-type checks require two checkouts to work with and compare. If it fails in one, it's OK to fail in the other. This is a bit annoying to set up, especially when trying to run nixpkgs-vet on a local branch. nix-build ci -A nixpkgs-vet can't be branch-aware, thus we have a helper script in ci/nixpkgs-vet.sh.
I propose a different approach, which could be used for treefmt as well, when introducing new formatters, which might not pass on all files, yet:
Keep a list of "known failures" in nixpkgs and pass the ignore list to the check
Throw an error if any of the ignored files actually passes (to then nudge the user towards removing the file from the list)
Bonus points: Provide a --fix mode for that error, so that the ignore file is written to automatically.
This would allow step-by-step introduction of new rules in single checkouts, too. It would allow to easily run the same nixpkgs-vet locally as in CI. And it would allow to see the list of violating files for each tool quickly.
Especially the latter is not easy to do right now. The only way I came up with for nixpkgs-vet would be to compare your current checkout against a mostly empty checkout or so?
Currently, the ratchet-type checks require two checkouts to work with and compare. If it fails in one, it's OK to fail in the other. This is a bit annoying to set up, especially when trying to run nixpkgs-vet on a local branch.
nix-build ci -A nixpkgs-vetcan't be branch-aware, thus we have a helper script inci/nixpkgs-vet.sh.I propose a different approach, which could be used for
treefmtas well, when introducing new formatters, which might not pass on all files, yet:--fixmode for that error, so that the ignore file is written to automatically.This would allow step-by-step introduction of new rules in single checkouts, too. It would allow to easily run the same nixpkgs-vet locally as in CI. And it would allow to see the list of violating files for each tool quickly.
Especially the latter is not easy to do right now. The only way I came up with for nixpkgs-vet would be to compare your current checkout against a mostly empty checkout or so?