Skip to content

Generator: report generation with a custom file reader for the source files - #791

Merged
danielpalme merged 1 commit into
danielpalme:mainfrom
jeremy-morren:public-file-reader
Oct 27, 2026
Merged

danielpalme merged 1 commit into
danielpalme:mainfrom
jeremy-morren:public-file-reader

Conversation

@jeremy-morren

Copy link
Copy Markdown

Fixes #790

Changes

  • IFileReader is public.
  • Generator.GenerateReport has an overload taking the parser result and an IFileReader
  • The existing overload taking the parser result creates the local and caching readers, as before.

Tests

GeneratorTest:

  • a custom reader supplies the source of a file that does not exist on disk, and the HTML report shows it;
  • an error from a custom reader is shown in the report;
  • the existing overload still reads the source from disk;
  • a null file reader throws ArgumentNullException.

… files

IFileReader is public, and a GenerateReport overload taking a parser result also takes the file reader
for the source files. Callers can then supply the content of source files from somewhere other than
the file system, e.g. text already read and checked. The other overloads use the local and caching
readers, as before.
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.

Allow a custom file reader for the source files when generating a report

2 participants