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

Support relative paths in the --file option #4250

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Changes from all 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
4 changes: 3 additions & 1 deletion analyzer/codechecker_analyzer/cmd/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import shutil
import sys
from typing import List
from pathlib import Path

from tu_collector import tu_collector

Expand Down Expand Up @@ -891,7 +892,8 @@ def get_affected_file_paths(
"""
file_paths = [] # Use list to keep the order of the file paths.
for file_filter in file_filters:
file_paths.append(file_filter)
file_paths.append(str(Path(file_filter).resolve())
if '*' not in file_filter else file_filter)

if os.path.exists(file_filter) and \
file_filter.endswith(header_file_extensions):
Expand Down
Loading