Skip to content

Commit

Permalink
feat: option to control the limits
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Dec 2, 2024
1 parent 10cd2c7 commit 418c03b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/bench-pr-new-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
env:
PR_NUMBER: ${{ fromJson(github.event.issue.body).pr }}
LINTER: ${{ fromJson(github.event.issue.body).linter }}
MAX_ISSUES_PER_LINTER: ${{ fromJson(github.event.issue.body).maxIssuesPerLinter }}
MAX_LINES_PER_RUN: ${{ fromJson(github.event.issue.body).maxLinesPerRun }}
TARGET_DIR: /tmp/target
HYPERFINE_VERSION: 1.18.0
strategy:
Expand Down Expand Up @@ -106,7 +108,7 @@ jobs:
run: |
cd ${TARGET_DIR}
golangci-lint cache clean
golangci-lint run -v --issues-exit-code=0 --max-issues-per-linter 50 --max-same-issues 10 --timeout=20m --show-stats --out-format colored-line-number,line-number:run.txt --enable-only ${LINTER}
golangci-lint run -v --issues-exit-code=0 --max-issues-per-linter ${MAX_ISSUES_PER_LINTER:-50} --max-same-issues 10 --timeout=20m --show-stats --out-format colored-line-number,line-number:run.txt --enable-only ${LINTER}
# We use:
# - goconst as a reference of a fast linter.
Expand All @@ -129,7 +131,7 @@ jobs:
echo '<details>' >> ${REPORT_DEST}
echo >> ${REPORT_DEST}
echo '```' >> ${REPORT_DEST}
cat run.txt | head -n 500 >> ${REPORT_DEST}
cat run.txt | head -n ${MAX_LINES_PER_RUN:-500} >> ${REPORT_DEST}
echo '```' >> ${REPORT_DEST}
echo >> ${REPORT_DEST}
fi
Expand Down

0 comments on commit 418c03b

Please sign in to comment.