Select all the files with a specific extension Github actions workflow

问题描述 投票:0回答:0

您好,我正在尝试对所有扩展名为 .sql 的文件运行预提交挂钩。我想知道我该怎么做。所有带有 .sql 的文件都在 models/ 目录中,但我在该目录中也有子目录(对这些 sql 文件进行分组)那么获取所有以 .sql 结尾的文件的最佳方法是什么? .这是我的

.pre-commit-config.yml
文件:

repos:
  - repo: https://github.com/sqlfluff/sqlfluff
    rev: 0.9.1
    hooks:
      - id: sqlfluff-fix
        args:
          [
            --exclude-rules,
            'L011,L031',
            --dialect,
            'clickhouse',
            --templater,
            'dbt',
            --fix_even_unparsable,
            'True',
          ]
    files: '*.sql'

我应该分配什么给

files: '*.sql':
^ 而不是这个

在pre-commit documentation,我找不到答案或者在sqlfluff documentation

yaml github-actions pre-commit-hook github-actions-self-hosted-runners
© www.soinside.com 2019 - 2024. All rights reserved.