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

Change UInt instances to Int #238

Merged

Conversation

aclima93
Copy link
Contributor

@aclima93 aclima93 commented May 26, 2021

Checklist

Motivation and Context

Use the recommended rule-of-thumb on the official documentation and use signed integers instead of unsigned integers.

Description

There aren't many instances of UInt, and the majority of them can be repurposed as signed integers, namely the instances related with Persistence, Logger and Token.

The only exceptions seem to be

  • XCT[Fail|AssertEqual|etc.] methods that use line numbers as a parameter
  • UIColor hexcode methods
  • Data SPKI SHA256 Base64 encoded hashes

@aclima93 aclima93 force-pushed the enhancement/prefer-signed-integers-over-unsigned-integers branch 2 times, most recently from dee897a to 2e38944 Compare May 26, 2021 17:28
@codecov
Copy link

codecov bot commented May 26, 2021

Codecov Report

Merging #238 (a84efaf) into master (aab56a3) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #238   +/-   ##
=======================================
  Coverage   94.94%   94.94%           
=======================================
  Files          96       96           
  Lines        3264     3264           
=======================================
  Hits         3099     3099           
  Misses        165      165           
Impacted Files Coverage Δ
Sources/Logging/Log.swift 100.00% <ø> (ø)
Sources/Logging/Loggers/Log+DummyLogger.swift 100.00% <ø> (ø)
Sources/Logging/Loggers/Log+MultiLogger.swift 97.36% <ø> (ø)
Sources/Logging/Loggers/Logger.swift 100.00% <ø> (ø)
Sources/Logging/Loggers/ModuleLogger.swift 100.00% <ø> (ø)
...istence/PersistencePerformanceMetricsTracker.swift 100.00% <ø> (ø)
Sources/Utils/Token.swift 100.00% <ø> (ø)
...urces/Persistence/DiskMemoryPersistenceStack.swift 88.09% <100.00%> (ø)

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 aab56a3...a84efaf. Read the comment docs.

@aclima93 aclima93 changed the title Change UInt64 instances to Int64 Change UInt instances to Int May 26, 2021
@aclima93 aclima93 marked this pull request as ready for review May 27, 2021 09:28
@aclima93 aclima93 requested review from p4checo, filipe-lemos and a team and removed request for p4checo and filipe-lemos May 27, 2021 09:29
@aclima93 aclima93 force-pushed the enhancement/prefer-signed-integers-over-unsigned-integers branch from 2e38944 to a84efaf Compare May 27, 2021 09:45
Copy link
Member

@p4checo p4checo left a comment

Choose a reason for hiding this comment

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

🚀

@aclima93 aclima93 merged commit 9b72df7 into master May 28, 2021
@aclima93 aclima93 deleted the enhancement/prefer-signed-integers-over-unsigned-integers branch May 28, 2021 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants