Skip to content

Conversation

@thnkslprpt
Copy link
Contributor

@thnkslprpt thnkslprpt commented Apr 14, 2023

Checklist

Describe the contribution

  • Fixes Light coding standards cleanup #1380
    • Light clean-up for some 'easy wins' to improve compliance with some of the rules common to the relevant coding standards:
      • split up multiple declarations on a single line
      • remove redundant definitions (i.e. values that are not used before the variable is assigned a new value)
      • remove trailing whitespace in yaml files
      • add braces to single line if/else blocks
      • remove side-effects from statements where no refactoring or new variables are needed. For example:
        image

Testing performed
GitHub CI actions all passing successfully.

Expected behavior changes
No change to behavior.

This PR will:

  • improve clarity & consistency
  • improve compliance with rules common to all/most of the relevant coding standards
  • reduce technical debt and ease future maintenance
  • result in cleaner builds with fewer alerts/warnings from code scanners

Contributor Info
Avi Weiss @thnkslprpt

uint32 j;

if ((fp = fopen(Filename, "w")))
fp = fopen(Filename, "w");

Check failure

Code scanning / CodeQL

File created without restricting permissions

A file may be created here with mode 0666, which would make it world-writable.
FILE *fp;

if ((fp = fopen(Filename, "w")))
fp = fopen(Filename, "w");

Check failure

Code scanning / CodeQL

File created without restricting permissions

A file may be created here with mode 0666, which would make it world-writable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Light coding standards cleanup

2 participants