Giter Club home page Giter Club logo

android-lint-entropy-reducer's People

Contributors

tir38 avatar yazgoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

android-lint-entropy-reducer's Issues

Build Variants

Should this script run separately for each Gradle build variant?

report just the *new* errors and warnings

Per advice from @matthew-compton,

It would be great if this script kept track of errors or warnings introduced by this PR then that would make it easier for a developer to fix just the Lint errors that he/she created.

Right now the developer would just have to fix any Lint errors totalling the number he/she added.

Issues with Android build tools 2.3.0

Android has updated it’s HTML file output in Android build tools 2.3.0. Now instead of displaying “0 errors and x warnings” it will display “Lint Report: x warnings”. This causes the following error as error_warning_string is now null as it no longer matches.

./Resources/lint-up.rb:74:in `<main>': undefined method `match' for nil:NilClass (NoMethodError)

Errors and warnings need to be checked independently in order for this tool to work correctly. I have fixed this on my side but since this is a private repository I can't create a pull request.

Here are my changes if anyone else if having this issue.

# find error/warning count string in HTML report
error_string = ""
warning_string = ""
File.open lint_report do |file|
  error_string = file.find { |line| line =~ /[0-9]* errors/ }
  warning_string = file.find { |line| line =~ /[0-9]* warnings/ }
end

# find number of errors
current_error_count = error_string.match(/[0-9]*/)[0].to_i
puts "found errors: " + current_error_count.to_s

# find number of warnings
if CHECK_WARNINGS == true
    current_warning_count = warning_string.match(/[0-9]*/)[0].to_i
    puts "found warnings: " + current_warning_count.to_s
end
# write new results to file (will overwrite existing, or create new)
File.write(previous_lint_report, "DO NOT TOUCH; GENERATED BY TRAVIS\n" + error_string + " and " + warning_string)

file involved in merge conflicts

Sometimes (not sure how yet) the lint-results.xml file is involved in a merge conflict. Maybe add a note about how to fix it.

stop updating global git user info

We shouldn't be updating global git user info anyways. Just in case something goes wrong with re-setting user info, we don't want to have screwed up somebody's entire git setup. We should switch to local user info.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.