PolyMC / PolyMC

A custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once (Fork of MultiMC)
https://polymc.org/
GNU General Public License v3.0
1.81k stars 263 forks source link

Clang format the whole codebase. #1509

Open xslendix opened 2 years ago

xslendix commented 2 years ago

Goal

The goal of this is to make development easier. This will allow formatting of code automatically in a bunch of editors on saves, without messing with the file at large.

Motivation

I discovered this issue while adding position changing to the cat. I had to override my editor to not auto-format every time I save which is incredibly annoying.

Specification

A simple find passed into clang-format should fix this issue.

Drawbacks

Some PRs may have trouble merging.

Unresolved Questions

None.

Alternatives Considered

None.

This suggestion is unique

You may use the editor below to elaborate further.

No response

samiscool51 commented 2 years ago

clang is cringe, cmake is chad.

xslendix commented 2 years ago

Clang is a C/C++ compiler based on the LLVM backend. CMake is a build automation tool. They are both completely different things. Clang also supports code formatting, which this PR focuses on. Please think before you go around posting willy-nilly.

ghost commented 1 year ago

But then we can't steal changes from prism launcher

ghost commented 12 months ago

In all seriousness, now that we've diverged enough from both MultiMC and Prism there's not really any reason to keep forwards or backwards compatibility with these codebases.

Unfortunately, this is not as simple as a find -type f -exec... command. We have to discuss and land on agreed-upon conventions for various types of syntax and the clangd-format config. Everyone who contributes needs to be aware of this and we would likely have to micromanage PRs to ensure they are clang-format'ed. I'll make a broader RFC for this at some point.