Reporting Issues
Bug 3748 - Add Uncrustify CI Plugin
Summary: Add Uncrustify CI Plugin
Status: RESOLVED FIXED
Alias: None
Product: Tianocore Feature Requests
Classification: Unclassified
Component: Code (show other bugs)
Version: Current
Hardware: All All
: Lowest normal
Assignee: Michael Kubacki
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-23 15:48 UTC by Michael Kubacki
Modified: 2021-12-23 21:26 UTC (History)
2 users (show)

See Also:
EDK II Code First industry standard specifications: ---
Branch URL:
Release(s) the issue is observed: EDK II Master
The OS the target platform is running: ---
Package: N/A
Release(s) the issues must be fixed: EDK II Master
Tianocore documents:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Kubacki 2021-11-23 15:48:25 UTC
After Uncrustify has been applied to all package C and H files (as tracked in https://bugzilla.tianocore.org/show_bug.cgi?id=3737), a CI plugin should be added to check for future violations.

If violations are found, the number of files with violations will be noted in the CI plugin output.

The plugin is expected to have the following configuration options:

  "Uncrustify": {
      "AuditOnly": False,           # Don't fail the build if there are errors. Just log them.
      "OutputFileDiffs": False      # Output chunks of formatting diffs in the test case log.
                                    # This can significantly slow down the plugin on very large packages.
      "ConfigFilePath": "",         # Custom path to an Uncrustify config file. Path is relative to the package.
      "IgnoreStandardPaths": [],    # Standard Plugin defined paths that should be ignored.
      "AdditionalIncludePaths": []  # Additional paths to check formatting (wildcards supported).
  }
Comment 1 gaoliming 2021-11-23 21:47:22 UTC
Michael will take it.
Comment 3 Michael Kubacki 2021-11-24 16:48:16 UTC
v4: https://edk2.groups.io/g/devel/message/84058
Comment 4 Michael Kubacki 2021-11-24 16:48:56 UTC
The v4 patch is also published to the following branch:
https://github.com/makubacki/edk2/tree/add_uncrustify_ci_plugin_v4
Comment 8 Michael Kubacki 2021-12-08 10:58:02 UTC
Series including Uncrustify formatting changes and the Uncrustify CI plugin was pushed in commits 429309e0c6b74792d679681a8edd0d5ae0ff850c - dc453b51640f945233a1edb062c0c97f88c21e79.

Tianocore wiki patch v1 is on list: https://edk2.groups.io/g/devel/message/84476

Closing this BZ since the CI plugin is now merged.
Comment 9 gaoliming 2021-12-23 21:26:26 UTC
This is a new feature.