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

Address first batch of credo issues found in #53 #62

Merged
merged 6 commits into from
Sep 25, 2018

Conversation

crertel
Copy link
Contributor

@crertel crertel commented Sep 24, 2018

Description

This PR fixes the first handful of issues from credo--namely, some warnings and design complaints (credo's terminology, not mine).

This was done mostly by turning off some of the more obnoxious errors, while occasionally laying hands on code to either delegate (to remove duplication), remove debug spam, or tweak exception handling.

All changes were run through the test suite and came back green, but we don't have 100% coverage so that's of questionable worth. I tried to stick with changes that by inspection should be correct.

Motivation and Context

This fixes partially fixes #53 , since Credo out-of-the-box is super persnickety. If we like the work I did here, I'm happy to finish clearing out the credo complaints (currently ~ 206) so we can start from a cleanish slate going forward.

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    not work as expected)
  • Improvement/refactoring (non-breaking change that doesn't add any feature
    but make things better)

Elaboration on the breaking change: I removed some console spam in the viewport input code. It's a breaking change because that output won't be there if you're looking for it--shouldn't harm anything else though.

Checklist

  • [ x ] Check other PRs and make sure that the changes are not done yet.
  • [ x ] The PR title is no longer than 64 characters.

Chris Ertel added 5 commits September 24, 2018 02:04
…rn of credo warning for inspect since it's a mix task and that's its job.
…andle_captured_input), by removing debug spam inspect. If we still need it, should be properly instrtumented via Logger anyways.
…binary), by ignoring code dupe warning. This is caused by same code structure in body and function head, but there's no more convenient way to factor this. Suggest warning credo folks.
…Transform.Translate) and lib/scenic/primitive/transform/pin.ex:7 #(Scenic.Primitive.Trnasform.Pin), by delegating pin to transform. Identical code, delegation cleanest fix and reduces chance for them to get out of sync.
@crertel crertel changed the title Address first batch of credfo issues found in #53 Address first batch of credo issues found in #53 Sep 24, 2018
@codecov
Copy link

codecov bot commented Sep 24, 2018

Codecov Report

Merging #62 into master will increase coverage by 0.04%.
The diff coverage is 40%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #62      +/-   ##
==========================================
+ Coverage   63.33%   63.38%   +0.04%     
==========================================
  Files          80       80              
  Lines        1961     1958       -3     
==========================================
- Hits         1242     1241       -1     
+ Misses        719      717       -2
Impacted Files Coverage Δ
lib/scenic/math/matrix_utils.ex 100% <ø> (ø) ⬆️
lib/mix/tasks/hash.ex 0% <ø> (ø) ⬆️
lib/scenic/view_port/input.ex 0% <0%> (ø) ⬆️
lib/scenic/cache.ex 77.65% <100%> (ø) ⬆️
lib/scenic/primitive/transform/pin.ex 33.33% <33.33%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7e5193c...ac2168d. Read the comment docs.

@boydm boydm merged commit ac2168d into ScenicFramework:master Sep 25, 2018
@crertel crertel deleted the 53-credo-fixes branch September 25, 2018 02:56
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.

Fix linting errors
2 participants