Skip to content

Conversation

@stephensmalley
Copy link
Member

Please read CONTRIBUTING.md

Contributing Code

Post the patch for the review to the
SELinux mailing list at
[email protected].

When preparing patches, please follow these guidelines:

  • Patches should apply with git am
  • Must apply against HEAD of the main branch
  • Separate large patches into logical patches
  • Patch descriptions must end with your "Signed-off-by" line. This means your
    code meets the Developer's certificate of origin, see below.

vmojzis and others added 3 commits October 21, 2025 09:23
In case ignore_noent is specified, ignore files removed during
relabeling (race condition between folder read, file read and label
set).

Signed-off-by: Vit Mojzis <[email protected]>
Acked-by: Stephen Smalley <[email protected]>
editorconfig is a standardised way to configure editors for a project.
Based off the Linux kernel .editorconfig file.

Signed-off-by: Rahul Sandhu <[email protected]>
Acked-by: Stephen Smalley <[email protected]>
Add the .clang-format configuration file, taken from the Linux kernel
repository. We don't have any official style guidelines in tree at
present, which makes it a bit unclear how to format C code for new
contributors. As well as this, different parts of the codebase seem to
been formatted with different styles on occasion, so using an automatic
formatter should resolve this.

As well as this, replace all the existing indent targets with a single
toplevel `format` target. Managing all the source files to be formatted
is not pretty to maintain, and doesn't really give us much.

Also define a toplevel `check-format` target to verify that all code is
formatted properly. This only becomes useful in the future once we have
reformatted all existing code, but is wired up for now.

For the future:
1. Reformat all existing code. I understand this is a big change, but
   we may as well get all code formatted if we go down this route;
   afterall, it's not like this will cause any breaking changes.

2. Add a CI target to check that all code is formatted as per the new
   clang-format configuration. The `check-format` target can be used
   for this.

Signed-off-by: Rahul Sandhu <[email protected]>
Acked-by: Stephen Smalley <[email protected]>
@stephensmalley stephensmalley deleted the merge20251021 branch October 21, 2025 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants