On 12 Jan 2024, at 11:19, Simon Horman wrote:

> On Thu, Jan 11, 2024 at 12:08:53AM +0100, Eelco Chaudron wrote:
>> This patch identifies new static analysis issues during a GitHub action
>> run and reports them. The process involves analyzing the changes introduced
>> in the current commit and comparing them to those in the preceding commit.
>>
>> However, there are two cases when the GitHub push action runner does not
>> provide enough details to determine the preceding commit. These cases are
>> a new branch or a forced push. The strategy for these exceptions is to
>> find the first common commit on any upstream branch, and use that.
>>
>> An example error output might look like this:
>>
>>   error level: +0 -0 no changes
>>   warning level: +2 +0
>>     New issue "deadcode.DeadStores Value stored to 'remote' is never read" 
>> (1 occurrence)
>>      file:///home/runner/work/ovs/ovs/vswitchd/ovs-vswitchd.c:86
>>     New issue "unix.Malloc Potential leak of memory pointed to by 'remote'" 
>> (1 occurrence)
>>      file:///home/runner/work/ovs/ovs/vswitchd/ovs-vswitchd.c:95
>>   note level: +0 -0 no changes
>>   all levels: +2 +0
>>
>> Signed-off-by: Eelco Chaudron <[email protected]>
>> ---
>>
>> changes in v2:
>>   - When it's a new branch, it compares it to the HEAD of the default branch.
>>
>> changes in v3:
>>   - Include the clang version as part of the cache
>>   - Change the way it looks for the 'default' branch so it will work
>>     for patch branches.
>>   - Also compare to the base branch for forced commits.
>>
>> changes in v4:
>>   - No longer look for a default branch, but consume all patches
>>     from the current author.
>>
>> changes in v5:
>>   - Addressed Ilya's comments.
>>   - Checkout upstream branch and find common point to base delta on.
>
> Thanks, this new logic seems to be working [1].
> It seems to be the best approach so far.
>
> Acked-by: Simon Horman <[email protected]>
>
> [1] https://github.com/ovsrobot/ovs/actions/runs/7481945508/job/20364544571

Thanks for the review, applied as:

* d662eee09 ci: Add clang-analyze to GitHub actions.

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to