0

I am trying to lint only the pushed files but the following yaml file only validates the whole codebase not the pushed file.

trigger:
- development-test

pool:
  vmImage: ubuntu-latest

stages:
- stage: PreDeployment
  jobs:
    - job: Code_Validation
      steps:
      - script: |
          docker pull github/super-linter:latest    
        displayName: Pull github/super-linter docker image
 
      - script: |
          docker run \
            -e VALIDATE_CODE_BASE=false
            -v $(System.DefaultWorkingDirectory):/tmp/lint github/super-linter
        displayName: super-linter validation
Danyal Shahid
  • 136
  • 1
  • 8

1 Answers1

1

Your env VALIDATE_CODE_BASE should be VALIDATE_ALL_CODEBASE

from https://github.com/github/super-linter#environment-variables :

ENV VAR Default Value Notes
... ... ...
VALIDATE_ALL_CODEBASE true Will parse the entire repository and find all files to validate across all types. NOTE: When set to false, only new or edited files will be parsed for validation.
... ... ...
Vince Bowdren
  • 8,326
  • 3
  • 31
  • 56
  • Thank You for pointing out the mistake but VALIDATE_ALL_CODEBASE=false still return the following error:: 2022-03-02 05:35:32 [FATAL] [] ##[error]Bash exited with code '1'. – Danyal Shahid Mar 02 '22 at 05:40