RepoSense
RepoSense copied to clipboard
Make ErrorSummary non-static by removing singleton design pattern
What feature(s) would you like to see in RepoSense
Currently, ErrorSummary
implements the singleton design pattern (and has done so since the beginning). Looking through the PR that first implemented ErrorSummary
#743, the justification was that the "feature could be extended to report other issues, such as invalid file name that couldn't be analyzed, etc". This was indeed done in #1509, where the faulty repo link is reported to the user in the frontend.
Is the feature request related to a problem?
ErrorSummary
have to be made non-static if we want to parallelize/have concurrent runs of RepoSense. For example, for systemtest, there exist a @BeforeEach
method that clears the static error set. This made it such that only sequential runs of the tests were 100% valid.
If possible, describe the solution
If applicable, describe alternatives you've considered
N/A.
Additional context
I am currently working on parallelizing ConfigSystemTest as well, and I believe the only way to parallelize it is to make these classes non-static, due to thread interference. Related to https://github.com/reposense/RepoSense/issues/1873.
Refer to https://github.com/reposense/RepoSense/pull/1947#issuecomment-1466624134 before starting work on this.