Skip to content

chore: set up CI for prettier#5665

Closed
mvadari wants to merge 22 commits intoXRPLF:developfrom
mvadari:autolint2
Closed

chore: set up CI for prettier#5665
mvadari wants to merge 22 commits intoXRPLF:developfrom
mvadari:autolint2

Conversation

@mvadari
Copy link
Collaborator

@mvadari mvadari commented Aug 11, 2025

High Level Overview of Change

This PR adds CI support for prettier to run on Markdown/JS/JSON/YAML files, and also adds it to the pre-commit.

Context of Change

Followup PR from #5657 (see #5657 (comment))

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Performance (increase or change in throughput and/or latency)
  • Tests (you added tests for code that already exists, or your new feature included in this PR)
  • Documentation update
  • Chore (no impact to binary, e.g. .gitignore, formatting, dropping support for older tooling)
  • Release

API Impact

None

@mvadari mvadari requested a review from bthomee August 11, 2025 16:43
@mvadari mvadari added CI Continuous Integration Functionality Trivial Simple change with minimal effect, or already tested. Only needs one approval. labels Aug 11, 2025
@codecov
Copy link

codecov bot commented Aug 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.8%. Comparing base (d8628d4) to head (b7a03f6).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #5665     +/-   ##
=========================================
- Coverage     78.8%   78.8%   -0.0%     
=========================================
  Files          814     814             
  Lines        71305   71304      -1     
  Branches      8344    8349      +5     
=========================================
- Hits         56196   56190      -6     
- Misses       15109   15114      +5     

see 6 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

echo "${SUGGESTION}"
exit 1

- name: Use Node.js ${{ env.NODE_VERSION }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you add this as a separate job, instead of making it part of the clang-format job?

I also propose that we create a separate ghcr.io/xrplf/ci/tools-rippled-prettier Docker image for this job, so you don't have to do any setting up at all.

Copy link
Collaborator Author

@mvadari mvadari Aug 11, 2025

Choose a reason for hiding this comment

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

Created a separate CI that just uses a Github runner (for now at least)

Comment on lines +2 to +14
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterEnum: false
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do these changes affect prettier in any way?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, but they'll affect both JSON and C++ clang-format (I think - the clang-format docs aren't great at telling you which options affect which languages)

@intelliot
Copy link
Contributor

Should we add mention of this in CONTRIBUTING.md?

@mvadari
Copy link
Collaborator Author

mvadari commented Aug 18, 2025

Added in #5661

@mvadari mvadari closed this Aug 18, 2025
@mvadari mvadari deleted the autolint2 branch February 4, 2026 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Continuous Integration Functionality Trivial Simple change with minimal effect, or already tested. Only needs one approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants