martin-helmich / typo3-typoscript-lint

Find coding errors in your TypoScript files.
MIT License
82 stars 19 forks source link

Add excludeFilter for directories #108

Open syssi opened 3 years ago

syssi commented 3 years ago

I want to lint a TYPO3 extension repository. The directory structure looks like this:

Configuration/TSConfig
Configuration/TypoScript
ext_typoscript_setup.txt
public/
vendor/

If I use the following configuration:

filePatterns:
  - "*.tsconfig"
  - "*.ts"
  - "*.typoscript"
  - "constants.txt"
  - "setup.txt"
  - "ext_typoscript_constants.txt"
  - "ext_typoscript_setup.txt"
  - "ext_conf_template.txt"

paths:
  - .

The linter reports issues at 3rd party code (vendor/ & public/). How to lint the Configuration directory and ext_typoscript_setup.txt file in a single run of typoscript-lint?

syssi commented 3 years ago

This is a dirty work-around:

vendor/bin/typoscript-lint Configuration *.txt *.typoscript

I prefer executing typoscript-lint without any parameters.