Commit 91cc0a1 1 parent cd916e7 commit 91cc0a1 Copy full SHA for 91cc0a1
File tree 2 files changed +18
-0
lines changed
2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,17 @@ target_go_version="$1"
28
28
# Search for Dockerfiles in the current directory and its subdirectories
29
29
dockerfiles=$( find . -type f -name " *.Dockerfile" -o -name " Dockerfile" )
30
30
31
+ # Exclude non-project files.
32
+ exclusions=(./vendor)
33
+ exclusion_pattern=$( IFS=" |" ; echo " ${exclusions[*]} " )
34
+
31
35
# Check each Dockerfile
32
36
for file in $dockerfiles ; do
37
+ # Skip excluded files
38
+ if echo " $file " | grep -qE " $exclusion_pattern " ; then
39
+ continue
40
+ fi
41
+
33
42
check_go_version " $file " " $target_go_version "
34
43
done
35
44
Original file line number Diff line number Diff line change @@ -39,8 +39,17 @@ target_go_version="$1"
39
39
# Search for YAML files in the current directory and its subdirectories
40
40
yaml_files=$( find . -type f -name " *.yaml" -o -name " *.yml" )
41
41
42
+ # Exclude non-project files.
43
+ exclusions=(./vendor)
44
+ exclusion_pattern=$( IFS=" |" ; echo " ${exclusions[*]} " )
45
+
42
46
# Check each YAML file
43
47
for file in $yaml_files ; do
48
+ # Skip excluded files
49
+ if echo " $file " | grep -qE " $exclusion_pattern " ; then
50
+ continue
51
+ fi
52
+
44
53
check_go_version " $file " " $target_go_version "
45
54
done
46
55
You can’t perform that action at this time.
0 commit comments