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

"pronto run" command not working properly #1

Open
amo-wtag opened this issue Dec 24, 2017 · 6 comments
Open

"pronto run" command not working properly #1

amo-wtag opened this issue Dec 24, 2017 · 6 comments

Comments

@amo-wtag
Copy link

To be informed that I have installed pronto-android-lint runner from below link which is successfully installed in our machine:
https://github.com/appunite/pronto-android_lint

However, when I try to run the pronto from command line using "pronto run" command, its showing nothing but command is executed with no errors.

Command Line info:
NoNames-Mac-mini:android-mobile-app noname$ pronto version
0.9.5
NoNames-Mac-mini:android-mobile-app noname$ pronto verbose-version
0.9.5 (running on ruby 2.4.3 x86_64-darwin17)
NoNames-Mac-mini:android-mobile-app noname$ pronto run
NoNames-Mac-mini:android-mobile-app noname$

Would you please guide me how can I run pronto for my Android project?

@amatalai
Copy link
Member

Hi

By default pronto run analyze diff between current branch and master. Maybe there's no new issues for your branch.

It also worth mention that at the moment this runner doesn't return issues which don't have location in lint result xml, because it's impossible to define if it's new or legacy issue.

@amo-wtag
Copy link
Author

amo-wtag commented Dec 24, 2017

I have checked with "./gradlew lint" command and it returns the issue list: but when I execute the command "pronto run", it doesn't show anything.
Would you help me please?

@amatalai
Copy link
Member

At the moment it's hard to guess what's wrong.

Is path to xml file with lint results set inPRONTO_ANDROID_LINT_RESULT_PATHS env?
Example of ignored issue would also be helpful.

@amo-wtag
Copy link
Author

Thanks for your advice.
I have added the PRONTO_ANDROID_LINT_RESULT_PATHS env and now its all time showing "Pronto::AndroidLintRunner
0 Pronto messages posted to GitHub"

Although the lint-results.xml file contains some issues.

I used the below command in my CircleCI configuration file:
[[ ! -z "${CI_PULL_REQUEST}" ]] && PRONTO_GITHUB_ACCESS_TOKEN=$TEST_GITHUB_TOKEN PRONTO_PULL_REQUEST_ID=$(echo $CI_PULL_REQUEST | grep -o -E '[0-9]+$') pronto run -f github_status github_pr_review text -c origin/master

Would you please help me regarding this?

@amatalai
Copy link
Member

@amo-wtag Could you provide a sample project that reproduces this?

@amo-wtag
Copy link
Author

amo-wtag commented Mar 4, 2018

In android_lint_runner.rb file:

offences.select { |offence| offence[:path].end_with?(patch_path) }
.each do |offence|
puts(offence[:line])
#puts(patch.added_lines)
messages += patch.added_lines
.select { |line|
puts("test #{line} #{line.new_lineno}")
line.new_lineno == offence[:line]
}
.map{ |line| new_message(offence, line) }
end

The android lint result line-num does not match with patch line-num....so, it does not call new_message method that's why its always showing "0 Pronto messages posted to GitHub".

Is it possible to change the pronto-android-lint code as like as Android lint result or just commented out the line, then should be worked?

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

No branches or pull requests

2 participants