SUPERAndroidAnalyzer / super

Secure, Unified, Powerful and Extensible Rust Android Analyzer
https://superanalyzer.rocks/
GNU General Public License v3.0
421 stars 59 forks source link

Added SDK version strings #130

Closed Cxarli closed 7 years ago

Cxarli commented 7 years ago

Fixes https://github.com/SUPERAndroidAnalyzer/super/issues/81

Cxarli commented 7 years ago

In reply to "Not sure why we would need this conversion though, the number comes with the data we parse.":

That is because I wanted to have Oreo (26) as output. That way, users would know both the number and the name. Note: I actually just realised that it's much easier to put that in the string since it's a constant.

Razican commented 7 years ago

Well, the idea on adding the string and the API version, that should be a format issue. So the template should receive both the number and the name, and then decide how to show both. I would say that the SdkNumber should have a get_number() method and the as_str() should return only the name of the version.

You can change the handlebars template to print both the name and the number.

Razican commented 7 years ago

Seems that the formatting is not correct, could you run cargo fmt with the latest rustfmt?

Cxarli commented 7 years ago

Fixed :+1:

codecov[bot] commented 7 years ago

Codecov Report

Merging #130 into develop will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #130   +/-   ##
========================================
  Coverage    53.65%   53.65%           
========================================
  Files            6        6           
  Lines         2479     2479           
========================================
  Hits          1330     1330           
  Misses        1149     1149
Impacted Files Coverage Δ
src/main.rs 93.05% <ø> (ø) :arrow_up:

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 e4ede67...c1526fd. Read the comment docs.