0

I have these files in project root

  • test.sql and test1.sql
  • .talismanrc
fileignoreconfig:
- filename: '*.sql'
  checksum: 29a138ee50018bdc968f352d2a69fa09e17de38fcc400630bb04dd7019e768be
# - filename: abc.sql
#   checksum: e12b607678a6b1821eca6e49f36588d8e89f8e6ed0f8a6abc6ef53b394bdc06b
# - filename: abc1.sql
#   checksum: cdca6d4d3d4c094fbdaeae9b6202fcf39be192454616e1e7d5b6fc2c60d25887

  • .pre-commit-config
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
-   repo: https://github.com/thoughtworks/talisman
    rev: v1.2.0
    hooks:
    # either `commit` or `push` support
    -   id: talisman-commit
    # -   id: talisman-push

I am trying to write ignore rule for .sql file so that I don't need multiple entries in .talismanrc. This is how I generated checksum for '*.sql' talisman --checksum="*.sql" When I try with two different rules it's working but wildcard rule is not working. Am I missing something?

Dinesh Balasubramanian
  • 20,532
  • 7
  • 64
  • 57

1 Answers1

1

I was missing ignore_detectors. After generating checksum using talisman --checksum="*.sql" I got the following

fileignoreconfig:
- filename: '*.sql'
  checksum: 29a148ff50018bdc968f352d2a69fa09e17de38fcc400630bb04dd7019e768be

and I added ignore_detectors. The final .talismanrc files look like this

fileignoreconfig:
- filename: '*.sql'
  checksum: 29a138ee50018bdc968f352d2a69fa09e17de38fcc400630bb04dd7019e768be
  ignore_detectors: [filename]