Skip to content

Commit dfcfefc

Browse files
authored
Update script.sh
1 parent b302d5c commit dfcfefc

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

script.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,25 @@ echo '::endgroup::'
1313
export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}"
1414

1515
echo '::group:: Running dupe-files with reviewdog 🐶 ...'
16+
17+
18+
find $dirname -type f | sed 's_.*/__' | awk -F"__" '{print $1}' | sort | uniq -d |
19+
while read fileName
20+
do
21+
find $dirname -type f | grep "${fileName}" |
22+
while read fname
23+
do
24+
echo "${fname}:1:1: Duplicate filename for prefix ${fileName}" >> .dupe.out
25+
done
26+
done
27+
1628
# shellcheck disable=SC2086
17-
bash check.sh ${INPUT_DIRECTORY:sql} | reviewdog -f=golangci-lint \
29+
cat .dupe.out | reviewdog -f=golangci-lint \
1830
-name="${INPUT_TOOL_NAME}" \
1931
-reporter="${INPUT_REPORTER:-github-pr-check}" \
2032
-filter-mode="${INPUT_FILTER_MODE:-added}" \
2133
-fail-on-error="${INPUT_FAIL_ON_ERROR:-false}" \
2234
-level="${INPUT_LEVEL}" \
2335
${INPUT_REVIEWDOG_FLAGS}
36+
2437
echo '::endgroup::'

0 commit comments

Comments
 (0)