Super-linter: Exclude folder from lint operations

Created on 5 Jul 2020  路  5Comments  路  Source: github/super-linter

Hi

is it possible to somehow exclude entire directory from linting?
during my workflow except checking out the current repository i also checking out another repository which includes personal github actions.
i want to exclude this directory from super linter operation as i dont want it to be analyzed for all repos.

any way to achieve this?
10x!

enhancement help wanted

Most helpful comment

@zkoppert yea i can, its just that i need these files later on the workflow.
its just the usually the first steps of a workflow is checkout .
but i end up checking out a smaller repository and ignore the specific things i dont want through the yml ignore file.

its still would have been nice to tell the linter which folder to analyze or which to exclude

All 5 comments

It doesn't appear to be possible at this moment from what I can tell. I think it'd be very powerful if this tool allowed you to specify your own regex per-linter in its rule file, though that's probably more for a feature request.

You could write a script to remove the files that you don't want linted and run that before the linter runs. That may work.
That would mean adding this to your workflow file before the linter section:

 - name: Remove files before linting
      run: ./scripts/removeFiles.sh

@zkoppert yea i can, its just that i need these files later on the workflow.
its just the usually the first steps of a workflow is checkout .
but i end up checking out a smaller repository and ignore the specific things i dont want through the yml ignore file.

its still would have been nice to tell the linter which folder to analyze or which to exclude

This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 馃 label or comment on the issue.

PR attempt to solve this issue : #684

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DawidJanczak picture DawidJanczak  路  5Comments

zkoppert picture zkoppert  路  3Comments

bazzadp picture bazzadp  路  3Comments

jasonkarns picture jasonkarns  路  5Comments

kilasuit picture kilasuit  路  5Comments