My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 65: Ability to run scripts/checkpatch.pl on patches
3 people starred this issue and may be notified of changes. Back to list
Status:  Released
Owner:  ----
Closed:  Mar 2012
Cc:  notbrian...@gmail.com


Sign in to add a comment
 
Reported by code-rev...@gtempaccount.com, Sep 24, 2009
Reported by Brian Swetland <swetland@android.com> on Mon Feb 09 10:30:03 PST 2009
Source: JIRA GERRIT-65
Affected Version: 2.0.3

We'd like to have kernel patches auto-linted to reduce review time

I'd like the backend to do this, ideally -- What would be really cool
would be to generate annotations from the results (which are kinda
compiler warning/error -like).
Sep 24, 2009
#1 code-rev...@gtempaccount.com
Comment by Shawn Pearce <sop@google.com> on Mon Feb 09 10:30:51 PST 2009

I assume Brian means doing the auto-linting during receive-pack, so the
results can be displayed in the UI and/or automatically sent back to the
uploader.
Sep 24, 2009
#2 code-rev...@gtempaccount.com
Comment by Shawn Pearce <sop@google.com> on Mon Feb 09 10:52:39 PST 2009

Since copyright attribution is going to be an important thing, it would be
cool if we could use Gerrit to enforce stuff like:
- New files must have the official copyright header
- If they don't, they must have some other copyright header, and the author
must fill in a field explaining where the file came from and why it has
different copyright
- If the Change modifies the copyright header, explicitly ask about it

It could be fuzzy about this, allowing for dual copyrights.

Maybe this could be implemented using a more general pre-submit pattern
trigger.
Sep 24, 2009
#3 sop+code@google.com
(No comment was entered for this change.)
Status: Accepted
Owner: ---
Sep 24, 2009
#4 sop+code@google.com
(No comment was entered for this change.)
Cc: swetl...@android.com
Feb 4, 2010
#5 nas...@chromium.org
Change Ic2f041a71c744d0938d79b1106c9119d6318731a adds hooks
that can be run from $site_path/hooks for this. You could probably even make that hook 
post a review comment with the results using the ssh approve command.
Feb 4, 2010
Project Member #6 Shane...@gmail.com
This is infact one of the reasons I added the hook support.

As described above, we have a script which in the patchset-created hook, adds new
changes to a database then another script which pulls tasks from the database,
compiles them and runs unit tests on the compiled code.

If the compile fails or any unit tests fail it uses the ssh approve command to set a
category called "Automatic Compile" to an appropriate value (-2 == compile failed, -1
== tests failed, +1 == all ok/compile not required).

The auto compile setting is of type MaxNoBlock (Change
I1516dd7843a852b96a9f3ba7bb42555b6cf67e80) to allow for manual override if needed.

It works pretty well.
Feb 26, 2010
#7 sop@google.com
Closing this as gerrit 2.1.2 will contain both hooks it                         
can execute from $site_path/hooks, but also has an event                        
monitor you can watch over an SSH connection.                                   
                                                                                
http://gerrit.googlecode.com/svn/documentation/2.1.2/cmd-stream-events.html     
http://gerrit.googlecode.com/svn/documentation/2.1.2/config-hooks.html
Status: Fixed
Labels: FixedIn-2.1.2
Mar 27, 2012
#8 sop@google.com
(No comment was entered for this change.)
Status: Released
Sign in to add a comment

Powered by Google Project Hosting