Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LineEndingPlugin #930

Conversation

kenlautner
Copy link
Contributor

@kenlautner kenlautner commented Jun 19, 2024

Description

Cherry-pick the LineEndingCheck plugin in its entirety.

The commits included from 202311:
8080124
6ddc3a5
59f3382
24a4f42
418f07b

These commits do the following:

Revert the temporary commit disabling the ARM and ARM64 pipeline builds for CI and Basetools. This ensures that all normal Mu CI is run after this point.

Fixed a bug where the plugin would fail if not run from the projects root directory.

For each item, place an "x" in between [ and ] if true. Example: [x].
(you can also check items in the GitHub UI)

  • Impacts functionality?
    • Functionality - Does the change ultimately impact how firmware functions?
    • Examples: Add a new library, publish a new PPI, update an algorithm, ...
  • Impacts security?
    • Security - Does the change have a direct security impact on an application,
      flow, or firmware?
    • Examples: Crypto algorithm change, buffer overflow fix, parameter
      validation improvement, ...
  • Breaking change?
    • Breaking change - Will anyone consuming this change experience a break
      in build or boot behavior?
    • Examples: Add a new library class, move a module to a different repo, call
      a function in a new library class in a pre-existing module, ...
  • Includes tests?
    • Tests - Does the change include any explicit test code?
    • Examples: Unit tests, integration tests, robot tests, ...
  • Includes documentation?
    • Documentation - Does the change contain explicit documentation additions
      outside direct code modifications (and comments)?
    • Examples: Update readme file, add feature readme file, link to documentation
      on an a separate Web page, ...

How This Was Tested

N/A

Integration Instructions

N/A

@kenlautner kenlautner force-pushed the personal/klautner/add_LineEndingCheck_plugin branch from 78a1c04 to 2a1abfe Compare June 21, 2024 00:59
@github-actions github-actions bot added the impact:non-functional Does not have a functional impact label Jun 21, 2024
@kenlautner kenlautner force-pushed the personal/klautner/add_LineEndingCheck_plugin branch from 2a1abfe to 33c6095 Compare June 22, 2024 05:20
@github-actions github-actions bot added the language:python Pull requests that update Python code label Jun 22, 2024
kenlautner and others added 3 commits June 24, 2024 14:57
Adds a simple CI plugin to check file line endings. This is meant to:

1. Supplement the Uncrustify Check plugin which fails if line endings
   are CRLF but does not obviously indicate that error since it is
   non-visible whitespace.

2. Discover line endings issues in files not checked by Uncrustify
   (which only operates against .c and .h files right now).

Signed-off-by: Michael Kubacki <[email protected]>
Updates `logging.warn()` to `logging.warning()` to prevent
deprecation warnings like this:

  .pytool\Plugin\UncrustifyCheck\UncrustifyCheck.py:386:
    DeprecationWarning: The 'warn' function is deprecated, use
    'warning' instead

- [ ] Impacts functionality?
- **Functionality** - Does the change ultimately impact how firmware
functions?
- Examples: Add a new library, publish a new PPI, update an algorithm,
...
- [ ] Impacts security?
- **Security** - Does the change have a direct security impact on an
application,
    flow, or firmware?
  - Examples: Crypto algorithm change, buffer overflow fix, parameter
    validation improvement, ...
- [ ] Breaking change?
- **Breaking change** - Will anyone consuming this change experience a
break
    in build or boot behavior?
- Examples: Add a new library class, move a module to a different repo,
call
    a function in a new library class in a pre-existing module, ...
- [ ] Includes tests?
  - **Tests** - Does the change include any explicit test code?
  - Examples: Unit tests, integration tests, robot tests, ...
- [ ] Includes documentation?
- **Documentation** - Does the change contain explicit documentation
additions
    outside direct code modifications (and comments)?
- Examples: Update readme file, add feature readme file, link to
documentation
    on an a separate Web page, ...

- Review Python code for `log.warn()` usage
- Check logs that reported issue earlier after changee

N/A

Signed-off-by: Michael Kubacki <[email protected]>
@kenlautner kenlautner force-pushed the personal/klautner/add_LineEndingCheck_plugin branch from 33c6095 to 5d01dd8 Compare June 24, 2024 22:02
@codecov-commenter
Copy link

codecov-commenter commented Jun 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (release/202405@5abeae3). Learn more about missing BASE report.

Additional details and impacted files
@@                Coverage Diff                @@
##             release/202405     #930   +/-   ##
=================================================
  Coverage                  ?   38.73%           
=================================================
  Files                     ?      207           
  Lines                     ?    27023           
  Branches                  ?     2105           
=================================================
  Hits                      ?    10467           
  Misses                    ?    16542           
  Partials                  ?       14           
Flag Coverage Δ
MdeModulePkg 17.80% <ø> (?)
MdePkg 54.40% <ø> (?)
NetworkPkg 8.89% <ø> (?)
UefiCpuPkg 30.52% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

This PR has been automatically marked as stale because it has not had activity in 60 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions bot added the state:stale Has not been updated in a long time label Aug 24, 2024
Copy link

This pull request has been automatically been closed because it did not have any activity in 60 days and no follow up within 7 days after being marked stale. Thank you for your contributions.

@github-actions github-actions bot closed this Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact:non-functional Does not have a functional impact language:python Pull requests that update Python code state:stale Has not been updated in a long time
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants