Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add handling of .skip_lint file(s) #58

Merged
merged 8 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/tools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,11 @@ jobs:
continue-on-error: true
- name: check if all test tools were linted
run: |
set -x
# check if the ToolIDValid linter is called (no of tools - 1 ) times, i.e. is skipped once
if [ "$(grep -c ToolIDValid ToolIDValid) != "2" ]; then
echo "expecting exactly 2 tests for ToolIDValid"; exit 1;
fi
grep tool1 lint_report.txt
grep tool2 lint_report.txt
grep "ERROR: Error 'HTTPConnectionPool" lint_report.txt
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ runs:
# Install the `wheel` package so that when installing other packages which
# are not available as wheels, pip will build a wheel for them, which can be cached.
- name: Install planemo
run: pip install wheel ${{ inputs.planemo-version }}
run: pip install git+https://github.com/bernt-matthias/planemo@linters-list
bernt-matthias marked this conversation as resolved.
Show resolved Hide resolved
shell: bash
- name: Install jq
run: sudo apt-get install jq
Expand Down
4 changes: 3 additions & 1 deletion planemo_ci_actions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,12 @@ fi
# - check if each tool is in a repo (i.e. if `.shed.yml` is present)
if [ "$MODE" == "lint" ]; then
lint_fail=false
touch .lint_skip
mapfile -t REPO_ARRAY < repository_list.txt
for DIR in "${REPO_ARRAY[@]}"; do
if [ "$WORKFLOWS" != "true" ]; then
(planemo shed_lint --tools --ensure_metadata --urls --report_level "$REPORT_LEVEL" --fail_level "$FAIL_LEVEL" --recursive "$DIR" "${ADDITIONAL_PLANEMO_OPTIONS[@]}" | tee -a lint_report.txt) || lint_fail=true
cat .lint_skip >> "$DIR"/.tt_skip
(planemo shed_lint --tools --ensure_metadata --urls --skip_file "$DIR"/.tt_skip --report_level "$REPORT_LEVEL" --fail_level "$FAIL_LEVEL" --recursive "$DIR" "${ADDITIONAL_PLANEMO_OPTIONS[@]}" | tee -a lint_report.txt) || lint_fail=true
else
(planemo workflow_lint --report_level "$REPORT_LEVEL" --fail_level "$FAIL_LEVEL" "$DIR" "${ADDITIONAL_PLANEMO_OPTIONS[@]}" | tee -a lint_report.txt) || lint_fail=true
fi
Expand Down
1 change: 1 addition & 0 deletions test/tools/tool1/.lint_skip
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ToolIDValid
Loading