Closed brunovasconcelostw closed 2 years ago
Hi @brunovasconcelostw : Have you considered using scopes to ignore package-lock.json totally https://thoughtworks.github.io/talisman/docs/configuring-talisman/ignoring/#ignoring-files-by-specifying-language-scope ?
The checksum command and the pre-commit command look for staged version of the file (ie: version you see after git add
)
I see that both pre-commit
hook and the checksum
command give the same output. Example:
That's nice!
I didn't use the scopeconfig
because I was not sure about what it does and what type of files it ignores.
So I preferred to run without this and ignore the files manually.
Is something else the node
scope ignores beside the package-lock.json
?
And about the issue. I noticed it gives the same result for most of the files. But for an unknown reason, when trying to run on package-lock.json (it might be related to the size of the file) it gives a different result, as showed in the screenshot.
note: all the files during the execution were staged.
That's nice! I didn't use the
scopeconfig
because I was not sure about what it does and what type of files it ignores. So I preferred to run without this and ignore the files manually.Is something else the
node
scope ignores beside thepackage-lock.json
?
The node
scope specifically ignores package-lock.json
, yarn.lock
and node_modules/
folder.
Full details of files/folders ignored in a scope is visible in talismanrc/scopes.go
Describe the bug
The checksum presented at the end of a scan is not the same as running the
checksum
command. Thefileignoreconfig
logged at the end of the scan is ignoring the file (because it is wrong)To Reproduce Steps to reproduce the behavior:
{TALISMAN_PATH} -- --githook pre-commit
{TALISMAN_PATH}
-- --checksum package-lock.jsonfileignoreconfig
is different for themExpected behavior When running the
{TALISMAN_PATH} -- --githook [pre-commit|pre-push]
it displays the right checksum for the issued files.Screenshots![Screen Shot 2022-03-22 at 12 23 38](https://user-images.githubusercontent.com/82543890/159519357-b7a653bf-0033-496c-885d-f7624e76ca41.png)
Desktop (please complete the following information):
OS: MacOS Monterey 12.3
Additional information I'm using node-talisman to run as a npm script