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

Don't create unused temporary file on every plugin initialization #113

Merged
merged 1 commit into from
Mar 11, 2015

Conversation

gslowikowski
Copy link
Member

ScoverageOptions.dataDir parameter is initialized with value File.createTempFile("scoverage_datadir_not_defined", ".tmp").getParent.

Setting dataDir is required in Scalac plugin parameters (-P:scoverage:dataDir:<pathtodatadir>), if not set exception will be thrown, so ANY initial value is OK because it will be overwritten anyway. Using File.createTempFile to initialize causes temporary scoverage_datadir_not_defined<random_hash>.tmp file creation as a side effect (this file will never be used) so it's not the best choice.

sksamuel added a commit that referenced this pull request Mar 11, 2015
Don't create unused temporary file on every plugin initialization
@sksamuel sksamuel merged commit 052b986 into scoverage:master Mar 11, 2015
@gslowikowski gslowikowski deleted the no-temp-file branch October 1, 2016 21:35
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