public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Michael Kubacki" <mikuback@linux.microsoft.com>
To: devel@edk2.groups.io, michael.d.kinney@intel.com
Subject: Re: [edk2-devel] Uncrustify configuration file and file/function templates
Date: Tue, 16 Nov 2021 13:53:58 -0500	[thread overview]
Message-ID: <c19c6a08-04ee-df26-6a88-0fadb34caf72@linux.microsoft.com> (raw)
In-Reply-To: <CO1PR11MB4929387016172B694D2A290CD2999@CO1PR11MB4929.namprd11.prod.outlook.com>

I would prefer to have a single version of the file if possible to 
reduce synchronization issues across the two copies.

It seems that a CI plugin to read the contents of the template files and 
search incoming code for that text wouldn't be too difficult to add as a 
new plugin.

Thanks,
Michael

On 11/16/2021 1:31 PM, Michael D Kinney wrote:
> Hi Michael,
> 
> Should we have 2 versions of the config file?
> 
> One used by automation tools such as CI and git hooks that do not use the
> templates.
> 
> And another one that a developer can optionally use that will add the
> templates for missing file/function headers that the developer then needs
> to fill out.
> 
> One concern I have about the templates is if they get used but a developer
> does not fill in the missing information.  It would be best if a CI check
> rejects a file/function header that has not been filled in.
> 
> Mike
> 
>> -----Original Message-----
>> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Michael Kubacki
>> Sent: Tuesday, November 16, 2021 10:25 AM
>> To: devel@edk2.groups.io; Kinney, Michael D <michael.d.kinney@intel.com>
>> Subject: Re: [edk2-devel] Uncrustify configuration file and file/function templates
>>
>> Hi Mike,
>>
>> Those were just disabled because I typically run a separate invocation
>> of Uncrustify with them enabled to isolate code which is missing
>> file/function headers. My thought was the templates are helpful but we
>> would need to individually identify where they are placed to file TCBZs
>> for maintainers to replace the template with the actual information.
>>
>> In some of my previous poc branches (like
>> https://github.com/makubacki/edk2/commits/uncrustify_poc_3_with_headers), I
>> also pushed a branch with those results.
>>
>> So I do think we would want them enabled in the final config file. We
>> can also review the contents of the templates in the future patch series
>> to see if any changes are recommended.
>>
>> I prefer using a .uncrustify directory to help group related collateral
>> but I don't have a strong opinion there.
>>
>> Thanks,
>> Michael
>>
>> On 11/16/2021 12:16 PM, Michael D Kinney wrote:
>>> Hi Michael,
>>>
>>> In your POC branch (https://github.com/makubacki/edk2/tree/uncrustify_poc_5), I see the
>>> uncrustify.cfg configuration file in the root.
>>>
>>>       https://github.com/makubacki/edk2/blob/uncrustify_poc_5/uncrustify.cfg
>>>
>>> However, in your Wiki, you provide examples where this configuration file is in an
>>> .uncrustify directory
>>>
>>>       https://dev.azure.com/projectmu/Uncrustify/_wiki/wikis/Uncrustify.wiki/1/Project-Mu-(EDK-II)-Fork-Readme
>>>
>>> The uncrustify.cfg files also contains commented out settings for the file header
>>> and function header templates.
>>>
>>>       # cmt_insert_file_header          = default_file_header.txt
>>>       # cmt_insert_func_header          = default_function_header.txt
>>>
>>> Are these disabled on purpose?
>>>
>>> Do we want to enable them?  If so, should the uncrustify configuration file
>>> and the templates go into a .uncrustify directory?
>>>
>>> Thanks,
>>>
>>> Mike
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>
> 
> 
> 
> 
> 
> 

  reply	other threads:[~2021-11-16 18:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-16 17:16 Uncrustify configuration file and file/function templates Michael D Kinney
2021-11-16 18:25 ` [edk2-devel] " Michael Kubacki
2021-11-16 18:31   ` Michael D Kinney
2021-11-16 18:53     ` Michael Kubacki [this message]
2021-11-16 19:18       ` Michael D Kinney
2021-11-16 19:26         ` Michael Kubacki
2021-11-16 23:05           ` Pedro Falcato
2021-11-16 23:20             ` Michael Kubacki
2021-11-16 23:30               ` Pedro Falcato
2021-11-16 23:54                 ` Michael Kubacki
2021-11-17  0:32                   ` Michael D Kinney
2021-11-17  1:46                   ` Pedro Falcato

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c19c6a08-04ee-df26-6a88-0fadb34caf72@linux.microsoft.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox