click-review return code doesn't distinguish Warnings from Errors

Bug #1523255 reported by Alan Pope ๐Ÿบ๐Ÿง๐Ÿฑ ๐Ÿฆ„
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Click Reviewers tools (obsolete)
Fix Released
Undecided
Jamie Strandboge

Bug Description

Run click-review across a bunch of click packages.
Currently:-

Success (no warning or error) = return code 0
Warnings only = return code 1
Errors only = return code 1
Errors and Warnings = return code 1

There's no way to discern between a package which only has warnings, and one which has errors only or both.

Running click-review from a script should, in my opinion, return 0 for success, perhaps 1 for warning and 2 for error.

alan@deep-thought:/tmp$ click-review /tmp/tmp.W9pkBNdwh1/com.ubuntu.developer.jonobacon.sleepytime_0.4_unknown.click
Errors
------
 - desktop:Icon:sleepytime
 'animal-farm' specified as icon in .desktop file for app 'sleepytime', which is not available in the click package.
 http://askubuntu.com/questions/417369/what-does-desktop-icon-mean/417370
Warnings
--------
 - lint:framework
 'ubuntu-sdk-13.10' is deprecated. Please use a newer framework
 http://askubuntu.com/questions/460512/what-framework-should-i-use-in-my-manifest-file
/tmp/tmp.W9pkBNdwh1/com.ubuntu.developer.jonobacon.sleepytime_0.4_unknown.click: FAIL
alan@deep-thought:/tmp$ echo $?
1

alan@deep-thought:/tmp$ click-review /tmp/tmp.3qlyuYJE8s/com.ubuntu.developer.djain29.unit-converter_0.1.3_all.click
Warnings
--------
 - lint:framework
 'ubuntu-sdk-13.10' is deprecated. Please use a newer framework
 http://askubuntu.com/questions/460512/what-framework-should-i-use-in-my-manifest-file
/tmp/tmp.3qlyuYJE8s/com.ubuntu.developer.djain29.unit-converter_0.1.3_all.click: FAIL
alan@deep-thought:/tmp$ echo $?
1

alan@deep-thought:/tmp$ click-review /tmp/tmp.XiNQEOyM83/com.ubuntu.developer.fcole90.hexgl_1.2_all.click
Errors
------
 - lint:framework
 'ubuntu-sdk-14.10-dev2' is obsolete. Please use a newer framework
 http://askubuntu.com/questions/460512/what-framework-should-i-use-in-my-manifest-file
/tmp/tmp.XiNQEOyM83/com.ubuntu.developer.fcole90.hexgl_1.2_all.click: FAIL
alan@deep-thought:/tmp$ echo $?
1

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

"Running click-review from a script should, in my opinion, return 0 for success, perhaps 1 for warning and 2 for error." I think this is fine. I think I prefer '1' for errors/warning and '2' for just warnings but I can't really articulate why.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Because tracebacks and our existing fatal errors exit with '1', I'm going to:

0: pass
1: fatal error
2: scripts ran but have errors/warnings
3. scripts ran but have warnings

Changed in click-reviewers-tools:
status: New → In Progress
assignee: nobody → Jamie Strandboge (jdstrand)
Changed in click-reviewers-tools:
status: In Progress → Fix Committed
Revision history for this message
Alan Pope ๐Ÿบ๐Ÿง๐Ÿฑ ๐Ÿฆ„ (popey) wrote :

Super! Thanks for fixing this!

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Fixed in 0.39

Changed in click-reviewers-tools:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.