fix: pre-commit errors due to polluted git directory#544
Closed
vlaci wants to merge 1 commit intocachix:masterfrom
Closed
fix: pre-commit errors due to polluted git directory#544vlaci wants to merge 1 commit intocachix:masterfrom
vlaci wants to merge 1 commit intocachix:masterfrom
Conversation
After cachix#396, `reuse` hook no longer works, as it considers untracked files added by `pre-commit`. Before the above PR, the git repository was in `$HOME/src`, so files added in `$HOME` didn't affect the outcome of the hooks themselves. This change re-adds the `src` subdirectory. A failing build output: $ nix build --no-link -L .\#checks.x86_64-linux.pre-commit Running phase: unpackPhase unpacking source archive /nix/store/g1p6g2ylflj4fnzdwlc368737kxk0p9f-source source root is source Running phase: patchPhase Running phase: updateAutotoolsGnuConfigScriptsPhase Running phase: configurePhase no configure script, doing nothing Running phase: buildPhase Running: $ pre-commit run --all-files reuse....................................................................Failed - hook id: reuse - exit code: 1 # MISSING COPYRIGHT AND LICENSING INFORMATION The following files have no copyright and licensing information: * .cache/pre-commit/README * .cache/pre-commit/db.db * .gitconfig # SUMMARY * Bad licenses: 0 * Deprecated licenses: 0 * Licenses without file extension: 0 * Missing licenses: 0 * Unused licenses: 0 * Used licenses: MIT * Read errors: 0 * Files with copyright information: 16 / 19 * Files with license information: 16 / 19 Unfortunately, your project is not compliant with version 3.3 of the REUSE Specification :-( # RECOMMENDATIONS * Fix missing copyright/licensing information: For one or more files, the tool cannot find copyright and/or licensing information. You typically do this by adding 'SPDX-FileCopyrightText' and 'SPDX-License-Identifier' tags to each file. The tutorial explains additional ways to do this: <https://reuse.software/tutorial/>
Member
|
@vlaci, thanks for bringing this up. Before the linked PR, we would also copy the source files into the I've merged #551, which sets HOME to a temporary directory to avoid polluting the working directory. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After #396,
reusehook no longer works, as it considers untracked files added bypre-commit. Before the above PR, the git repository was in$HOME/src, so files added in$HOMEdidn't affect the outcome of the hooks themselves.This change re-adds the
srcsubdirectory.A failing build output: