Skip to content

(#8) - Remove a result XML file if a source file no longer exist#74

Open
pollyvolk wants to merge 5 commits into
polystat:masterfrom
pollyvolk:file
Open

(#8) - Remove a result XML file if a source file no longer exist#74
pollyvolk wants to merge 5 commits into
polystat:masterfrom
pollyvolk:file

Conversation

@pollyvolk

@pollyvolk pollyvolk commented Dec 1, 2022

Copy link
Copy Markdown
Contributor

#8
How it was:
A user runs Polystat with --files sources --tmp result, and there is a file sources/test.eo. The result of the analysis will be saved to result/test.xml. If the user renames or deletes the file sources/test.eo and runs the same command again, Polystat will print the previous correct result, taking it from result/test.xml, not throwing an exception.

After changes:
In the same case Polystat will throw a FileNotFoundException.
It throws an exception several times for each running Analysis.

@codecov-commenter

codecov-commenter commented Dec 1, 2022

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 54.30%. Comparing base (acc7c35) to head (2aa39fb).
⚠️ Report is 18 commits behind head on master.

Files with missing lines Patch % Lines
src/main/java/org/polystat/Program.java 50.00% 0 Missing and 1 partial ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff              @@
##             master      #74      +/-   ##
============================================
+ Coverage     53.96%   54.30%   +0.34%     
- Complexity       32       34       +2     
============================================
  Files             8        8              
  Lines           265      267       +2     
  Branches         24       25       +1     
============================================
+ Hits            143      145       +2     
+ Misses          119      118       -1     
- Partials          3        4       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pollyvolk

Copy link
Copy Markdown
Contributor Author

@mximp Please, review

@mximp

mximp commented Dec 5, 2022

Copy link
Copy Markdown
Contributor

@pollyvolk please always place reference to an issue within PR's description.

Comment thread src/main/java/org/polystat/Program.java Outdated
final String name = parts[1];
final Path xml = this.temp.resolve(String.format("%s.xml", name));
final Path src = this.sources.resolve(String.format("%s.eo", name));
final Path xml = this.temp.resolve(String.format("%s.xml", name)).toAbsolutePath();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pollyvolk what caused the path to be changed to absolute? Were there issues with previous version of the code?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mximp You are right, this change is redundant, I will remove it

@mximp

mximp commented Dec 5, 2022

Copy link
Copy Markdown
Contributor

@yegor256 please merge

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.

3 participants