Skip to content

Conversation

@toby-bro
Copy link
Contributor

@toby-bro toby-bro commented May 1, 2025

Just a tiny PR to make the output a tiny bit more explicit and simple when the user gives in an input dir that has no coverage files in it

before:

[0.037s] [info]: Found 0 coverage files (.gcda)
[0.003s] [info]: Spawned 0 gcov processes, each processing at most 5 coverage files
Traceback (most recent call last):
  File "/usr/local/bin/fastcov", line 1071, in <module>
    main()
  File "/usr/local/bin/fastcov", line 1045, in main
    fastcov_json = getGcovCoverage(args)
                   ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/bin/fastcov", line 891, in getGcovCoverage
    fastcov_json = processGcdas(args, coverage_files, gcov_filter_options)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/bin/fastcov", line 368, in processGcdas
    base_fastcov = fastcov_jsons.pop()
                   ^^^^^^^^^^^^^^^^^^^
IndexError: pop from empty list

after:

[0.038s] [info]: Found 0 coverage files (.gcda)
[0.000s] [error]: No coverage files found in directory '.'

@toby-bro
Copy link
Contributor Author

toby-bro commented May 7, 2025

Sorry I hadn't checked the CI.
Moved the check as requested.
Ran the CI locally, the tests seem to pass now.

@RPGillespie6 RPGillespie6 merged commit 20bab8b into RPGillespie6:master May 7, 2025
1 check passed
@RPGillespie6
Copy link
Owner

Thanks for the fix!

@toby-bro toby-bro deleted the chore/pretty_exit_when_no_files_found branch May 8, 2025 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants