generated from admin/template
This commit is contained in:
@@ -33,19 +33,19 @@ jobs:
|
|||||||
https://github.com/detekt/detekt/releases/download/v1.23.6/detekt-cli-1.23.6-all.jar
|
https://github.com/detekt/detekt/releases/download/v1.23.6/detekt-cli-1.23.6-all.jar
|
||||||
|
|
||||||
- name: Run Detekt
|
- name: Run Detekt
|
||||||
|
id: detekt
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
set +e
|
set +e
|
||||||
|
|
||||||
java -jar detekt-cli.jar \
|
java -jar detekt-cli.jar \
|
||||||
--input . \
|
--input . \
|
||||||
|
--base-path . \
|
||||||
--report txt:detekt-report.txt \
|
--report txt:detekt-report.txt \
|
||||||
--report checkstyle:detekt-checkstyle.xml
|
--report checkstyle:detekt-checkstyle.xml \
|
||||||
|
> detekt-console-output.txt 2>&1
|
||||||
|
|
||||||
echo $? > detekt-exit-code.txt
|
echo $? > detekt-exit-code.txt
|
||||||
|
|
||||||
# Detekt может завершить процесс с кодом 2,
|
|
||||||
# но следующий шаг должен всё равно выполниться.
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
- name: Show readable Detekt report
|
- name: Show readable Detekt report
|
||||||
@@ -106,8 +106,12 @@ jobs:
|
|||||||
line_number=$(echo "$location" | cut -d: -f2)
|
line_number=$(echo "$location" | cut -d: -f2)
|
||||||
column_number=$(echo "$location" | cut -d: -f3)
|
column_number=$(echo "$location" | cut -d: -f3)
|
||||||
|
|
||||||
|
repo_url="${{ gitea.server_url }}/${{ gitea.repository }}"
|
||||||
|
file_url="$repo_url/src/commit/${{ gitea.sha }}/$file#L$line_number"
|
||||||
|
|
||||||
echo "🔴 [$rule]"
|
echo "🔴 [$rule]"
|
||||||
echo " 📍 $file:$line_number:$column_number"
|
echo " 📍 $file:$line_number:$column_number"
|
||||||
|
echo " 🔗 $file_url"
|
||||||
echo " 💬 $message"
|
echo " 💬 $message"
|
||||||
else
|
else
|
||||||
echo "🔴 $line"
|
echo "🔴 $line"
|
||||||
|
|||||||
Reference in New Issue
Block a user