CandyShop / gerrit

Automatically exported from code.google.com/p/gerrit
Apache License 2.0
1 stars 0 forks source link

Ability to run scripts/checkpatch.pl on patches #65

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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).

Original issue reported on code.google.com by code-rev...@gtempaccount.com on 24 Sep 2009 at 7:33

GoogleCodeExporter commented 9 years ago
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.

Original comment by code-rev...@gtempaccount.com on 24 Sep 2009 at 7:52

GoogleCodeExporter commented 9 years ago
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.

Original comment by code-rev...@gtempaccount.com on 24 Sep 2009 at 7:52

GoogleCodeExporter commented 9 years ago

Original comment by sop+code@google.com on 24 Sep 2009 at 10:36

GoogleCodeExporter commented 9 years ago

Original comment by sop+code@google.com on 24 Sep 2009 at 10:53

GoogleCodeExporter commented 9 years ago
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.

Original comment by nas...@chromium.org on 4 Feb 2010 at 6:10

GoogleCodeExporter commented 9 years ago
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.

Original comment by Shane...@gmail.com on 4 Feb 2010 at 6:40

GoogleCodeExporter commented 9 years ago
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

Original comment by sop@google.com on 27 Feb 2010 at 1:40

GoogleCodeExporter commented 9 years ago

Original comment by sop@google.com on 28 Mar 2012 at 2:55