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

Some general minor code quality improvements #3293

Merged
merged 6 commits into from Oct 13, 2023
Merged

Some general minor code quality improvements #3293

merged 6 commits into from Oct 13, 2023

Conversation

unp1
Copy link
Member

@unp1 unp1 commented Oct 4, 2023

The issues were:

  • these unnecessary double declarations like
    for (T x: y) {
    var z = x;
    ....
    }
    fixed manually.
  • reducing complexity of some very few if statements by switching the then-and-else branches (fixed automatically, but automatic fix triggered for each case manually)
  • declared but never thrown exceptions (manual fixes)
  • some typos in comments I encountered while fixing (manual fixes)

@codecov
Copy link

codecov bot commented Oct 4, 2023

Codecov Report

Merging #3293 (783c430) into main (e5a80d4) will decrease coverage by 0.02%.
Report is 2 commits behind head on main.
The diff coverage is 41.37%.

❗ Current head 783c430 differs from pull request most recent head aac6798. Consider uploading reports for the commit aac6798 to get more accurate results

@@             Coverage Diff              @@
##               main    #3293      +/-   ##
============================================
- Coverage     37.78%   37.76%   -0.02%     
+ Complexity    16851    16846       -5     
============================================
  Files          2052     2052              
  Lines        125409   125394      -15     
  Branches      21220    21216       -4     
============================================
- Hits          47384    47354      -30     
- Misses        72189    72209      +20     
+ Partials       5836     5831       -5     
Files Coverage Δ
...lkd/key/proof/InstantiationProposerCollection.java 100.00% <100.00%> (ø)
...in/java/de/uka/ilkd/key/proof/ProgVarReplacer.java 50.79% <ø> (ø)
...ey/proof/SVInstantiationExceptionWithPosition.java 26.66% <ø> (ø)
...ain/java/de/uka/ilkd/key/proof/TacletAppIndex.java 80.81% <ø> (ø)
...c/main/java/de/uka/ilkd/key/proof/TacletIndex.java 86.66% <100.00%> (-0.07%) ⬇️
.../uka/ilkd/key/proof/init/DependencyContractPO.java 0.00% <ø> (ø)
...ilkd/key/proof/init/FunctionalBlockContractPO.java 0.00% <ø> (ø)
.../ilkd/key/proof/init/FunctionalLoopContractPO.java 0.00% <ø> (ø)
.../key/proof/init/FunctionalOperationContractPO.java 54.40% <100.00%> (ø)
...de/uka/ilkd/key/proof/init/KeYUserProblemFile.java 74.35% <ø> (ø)
... and 37 more

... and 9 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions
Copy link

github-actions bot commented Oct 4, 2023

Thank you for your contribution.

The test artifacts are available on Artiweb.
The newest artifact is here.

@wadoon wadoon self-requested a review October 5, 2023 08:21
@wadoon
Copy link
Member

wadoon commented Oct 12, 2023

@unp1 Could you state if the changes are done semi-automatically, whether it was applied structurally, or how you selected certain classes? This would help for the review.

@unp1
Copy link
Member Author

unp1 commented Oct 13, 2023

@unp1 Could you state if the changes are done semi-automatically, whether it was applied structurally, or how you selected certain classes? This would help for the review.

Hi,

thanks for the review! The issue detection was done automatically, but targeted by selecting specific analysis. The trigger for this issue was just that I stumbled about unnecessary local variable declarations on a different branch like

The issues were:

  • these unnecessary double declarations like
    for (T x: y) {
    var z = x;
    ....
    }
    fixed manually.
  • reducing complexity of some very few if statements by switching the then-and-else branches (fixed automatically, but automatic fix triggered for each case manually)
  • declared but never thrown exceptions (manual fixes)
  • some typos in comments I encountered while fixing (manual fixes)

Best regards,
Richard

@FliegendeWurst FliegendeWurst added 🛠 Maintenance Code quality and related things w/o functional changes Java Pull requests that update Java code labels Oct 13, 2023
@wadoon wadoon enabled auto-merge October 13, 2023 09:23
@wadoon wadoon added this pull request to the merge queue Oct 13, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Oct 13, 2023
@wadoon wadoon added this pull request to the merge queue Oct 13, 2023
Merged via the queue into main with commit e20549a Oct 13, 2023
12 checks passed
@wadoon wadoon deleted the minorCodeFixes branch October 13, 2023 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Java Pull requests that update Java code 🛠 Maintenance Code quality and related things w/o functional changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants