mirror of
				https://github.com/containers/podman.git
				synced 2025-10-31 10:00:01 +08:00 
			
		
		
		
	 c7827957a4
			
		
	
	c7827957a4
	
	
	
		
			
			- move the ginkgo deps into test/tools which is more consitent with the other tools there, listing in dependencies always causes errors with linters - do not install it globally on the system, instead we use it in a subdir of this project Signed-off-by: Paul Holzinger <pholzing@redhat.com>
		
			
				
	
	
		
			25 lines
		
	
	
		
			670 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			670 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/usr/bin/env bash
 | |
| 
 | |
| # Need to run linter twice to cover all the build tags code paths
 | |
| set -e
 | |
| 
 | |
| declare -A BUILD_TAGS
 | |
| BUILD_TAGS[default]="apparmor,seccomp,selinux"
 | |
| BUILD_TAGS[abi]="${BUILD_TAGS[default]},systemd"
 | |
| BUILD_TAGS[tunnel]="${BUILD_TAGS[default]},remote"
 | |
| 
 | |
| declare -A SKIP_DIRS
 | |
| SKIP_DIRS[abi]=""
 | |
| # TODO: add "remote" build tag to pkg/api
 | |
| SKIP_DIRS[tunnel]="pkg/api"
 | |
| 
 | |
| [[ $1 == run ]] && shift
 | |
| 
 | |
| for i in tunnel abi; do
 | |
|   echo ""
 | |
|   echo Running golangci-lint for "$i"
 | |
|   echo Build Tags          "$i": ${BUILD_TAGS[$i]}
 | |
|   echo Skipped directories "$i": ${SKIP_DIRS[$i]}
 | |
|   ./bin/golangci-lint run --build-tags=${BUILD_TAGS[$i]} --skip-dirs=${SKIP_DIRS[$i]} "$@"
 | |
| done
 |