Skip to content

Add Style & Linting - #133

Open
Lightning11wins wants to merge 50 commits into
masterfrom
add-style-linting
Open

Add Style & Linting#133
Lightning11wins wants to merge 50 commits into
masterfrom
add-style-linting

Conversation

@Lightning11wins

@Lightning11wins Lightning11wins commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Add a new, more detailed style guide documenting the new Beeley style in far more detail than the previous document.

TODO

  • Configure and run a linter with these new styles.

GitHub Relationships

@Lightning11wins Lightning11wins self-assigned this Jul 28, 2026
@Lightning11wins Lightning11wins added ai-review Request AI review for PRs. size: medium Might be hard to review, usually less than ~5000 lines. labels Jul 28, 2026
@greptile-apps

greptile-apps Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR replaces the former Beeley style reference with a substantially expanded, mandatory Centrallix coding-style guide and updates related documentation to point to it.

  • Establishes CentrallixCodingStyle.md as the source of truth for new changes.
  • Documents conventions for supported languages, error handling, comments, licensing, and formatting.
  • Updates contributor instructions and legacy documentation links.

Confidence Score: 5/5

The documentation-only PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
AGENTS.md Directs contributors to the new authoritative style guide and clarifies copyright-update expectations.
centrallix-sysdoc/CentrallixCodingStyle.md Adds the comprehensive project coding-style guide covering formatting, language conventions, error handling, documentation, and copyright notices.
centrallix-sysdoc/BeeleyCodingStyle.md Removes the superseded legacy style guide.
centrallix-sysdoc/CodingStandards.md Marks the new guide as authoritative and updates style and module-prefix references.
centrallix-sysdoc/Proposals/ClangFormat.md Updates the formatter proposal to reference the replacement style guide.

Reviews (5): Last reviewed commit: "Merge branch 'master' into add-style-lin..." | Re-trigger Greptile

@Lightning11wins

Copy link
Copy Markdown
Contributor Author

The work isn't done, so we can ignore those issues from Greptile for now. They're concerns for later.

@Lightning11wins
Lightning11wins requested a review from nboard July 28, 2026 16:57
@Lightning11wins
Lightning11wins marked this pull request as draft July 28, 2026 16:57

@nboard nboard left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really promising overall! I may have gotten a bit too much into the weeds on word choice for this early in the project, but hopefully this is helpful overall.

Comment thread centrallix-sysdoc/B2CodingStyle.md Outdated
Comment thread centrallix-sysdoc/B2CodingStyle.md Outdated
Comment thread centrallix-sysdoc/CentrallixCodingStyle.md
Comment thread centrallix-sysdoc/CentrallixCodingStyle.md
Comment thread centrallix-sysdoc/B2CodingStyle.md Outdated
Comment thread centrallix-sysdoc/B2CodingStyle.md Outdated
Comment thread centrallix-sysdoc/B2CodingStyle.md Outdated
Comment thread centrallix-sysdoc/B2CodingStyle.md Outdated
Styles that still need to be decided and documented:
- How Markdown files are styled?
- How Python files are styled. The 26 files in `centrallix-ui-test/tests`. They have no rules today, and several universal rules here do not fit them.
- How should long expressions or multi-line conditions be broken up? Does the line end with or start with the operator, and how far are continuation lines are indented?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO
I would like to vote for starting lines with the &&/|| operators. I feel it makes it immediately obvious when reading the line that it belongs to the expression above it, and makes it so deleting/adding lines effect fewer lines

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but I think I remember cases where this caused issues.

@Lightning11wins Lightning11wins Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I struggled a lot with this code snippet:

const bool font_changed = false
    || style->FontID != context->CurStyle.FontID
    || style->Color != context->CurStyle.Color
    || realComparePrecision(style->FontSize, context->CurStyle.FontSize, PRT_HTMLFM_FONTSIZE_PRECISION) != 0;

I don't really like the false || / true && style I end up using so that we don't have to indent one line differently from every other line.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll make a discussion for this one.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parts of this document that overlap with B2CodingStandards.md should probably be trimmed out (though, this can wait until the document is in a more final form to ensure you don't accidentally cut content from both documents)

@Lightning11wins Lightning11wins Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added to TODOs, I'll revisit this later. You can mark this as resolved.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll revisit this after Greg's review ensures that the standard won't change significantly in the near future.

@Lightning11wins
Lightning11wins marked this pull request as ready for review July 30, 2026 19:16
@Lightning11wins Lightning11wins added the documentation Changes, improvements, or fixes to documentation files. label Jul 30, 2026

@nboard nboard left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great overall! Just a couple of suggestions and continued conversations on 2 of the preexisting discussions.

Comment thread centrallix-sysdoc/CentrallixCodingStyle.md Outdated
Comment thread centrallix-sysdoc/CentrallixCodingStyle.md Outdated
@Lightning11wins

Lightning11wins commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

The next step is to run a linter with these new rules. However, that merge-conflict all open PRs.

@Lightning11wins Lightning11wins added the blocked No more work can be done until other work is completed. label Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Request AI review for PRs. blocked No more work can be done until other work is completed. documentation Changes, improvements, or fixes to documentation files. size: medium Might be hard to review, usually less than ~5000 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants