Skip to content

Added rustfmt.toml and enforced it in CMake#779

Open
niko091 wants to merge 3 commits into
metacall:developfrom
niko091:rustfmt
Open

Added rustfmt.toml and enforced it in CMake#779
niko091 wants to merge 3 commits into
metacall:developfrom
niko091:rustfmt

Conversation

@niko091
Copy link
Copy Markdown
Contributor

@niko091 niko091 commented Apr 20, 2026

Description

Added rustfmt to the rs_loader

Enforced fmt in both rs_port and rs_loader

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)
  • This change requires a documentation update
  • Documentation update

Checklist:

  • I have performed a self-review of my own code.
  • My changes generate no new warnings.

@viferga
Copy link
Copy Markdown
Member

viferga commented Apr 27, 2026

It's not working, please don't PR untested code...:

2026-04-22T23:02:20.6199329Z Diff in /usr/local/metacall/source/loaders/rs_loader/rust/compiler/src/memory.rs at line 56:
2026-04-22T23:02:20.6200496Z          }
2026-04-22T23:02:20.6201101Z      }
2026-04-22T23:02:20.6201533Z  }
2026-04-22T23:02:20.6201950Z +
2026-04-22T23:02:20.6850132Z �[91mgmake[2]: *** [source/loaders/rs_loader/rust/CMakeFiles/rs_loader_impl_fmt.dir/build.make:71

@viferga viferga marked this pull request as draft April 27, 2026 21:30
@niko091 niko091 marked this pull request as ready for review May 4, 2026 08:57
@niko091 niko091 marked this pull request as draft May 4, 2026 09:03
@niko091 niko091 marked this pull request as ready for review May 4, 2026 09:07
@niko091
Copy link
Copy Markdown
Contributor Author

niko091 commented May 4, 2026

Sorry for the mistake, now I fixed it

@viferga
Copy link
Copy Markdown
Member

viferga commented May 7, 2026

@niko091 have you changed all line endings from:
source/loaders/rs_loader/rust/compiler/src/memory.rs ?

is that needed? can you restore it if it's not?

@viferga viferga marked this pull request as draft May 7, 2026 07:56
@niko091
Copy link
Copy Markdown
Contributor Author

niko091 commented May 7, 2026

@viferga, I have reverted the changes, but I've noticed that most of the rs_loader files end with LF and some ends with CRLF.

git ls-files --eol
i/lf    w/lf    attr/                 	.cargo/config
i/lf    w/lf    attr/                 	.gitignore
i/lf    w/lf    attr/                 	.vscode/launch.json.in
i/lf    w/lf    attr/                 	.vscode/settings.json.in
i/lf    w/lf    attr/                 	CMakeLists.txt
i/lf    w/lf    attr/                 	Cargo.toml
i/lf    w/lf    attr/                 	compiler/Cargo.toml
i/lf    w/lf    attr/                 	compiler/src/api/class.rs
i/lf    w/lf    attr/                 	compiler/src/api/function.rs
i/lf    w/lf    attr/                 	compiler/src/api/mod.rs
i/crlf  w/crlf  attr/                 	compiler/src/api/object.rs
i/lf    w/lf    attr/                 	compiler/src/ast.rs
i/crlf  w/crlf  attr/                 	compiler/src/file.rs
i/lf    w/lf    attr/                 	compiler/src/lib.rs
i/crlf  w/crlf  attr/                 	compiler/src/memory.rs
i/lf    w/lf    attr/                 	compiler/src/middle.rs
i/crlf  w/crlf  attr/                 	compiler/src/package.rs
i/crlf  w/crlf  attr/                 	compiler/src/registrator.rs
i/crlf  w/crlf  attr/                 	compiler/src/wrapper/class.rs
i/lf    w/lf    attr/                 	compiler/src/wrapper/mod.rs
i/lf    w/lf    attr/                 	rust-toolchain
i/none  w/none  attr/                 	rustfmt.toml
i/lf    w/lf    attr/                 	src/lib.rs
i/lf    w/lf    attr/                 	src/lifecycle/clear.rs
i/lf    w/lf    attr/                 	src/lifecycle/destroy.rs
i/lf    w/lf    attr/                 	src/lifecycle/discover.rs
i/lf    w/lf    attr/                 	src/lifecycle/execution_path.rs
i/lf    w/lf    attr/                 	src/lifecycle/initialize.rs
i/lf    w/lf    attr/                 	src/lifecycle/load_from_file.rs
i/lf    w/lf    attr/                 	src/lifecycle/load_from_memory.rs
i/lf    w/lf    attr/                 	src/lifecycle/load_from_package.rs
i/lf    w/lf    attr/                 	src/lifecycle/loader.rs
i/lf    w/lf    attr/                 	src/lifecycle/mod.rs
i/lf    w/lf    attr/                 	test/file.rs

would make sense to make them all FL? Maybe in an other PR.

@viferga
Copy link
Copy Markdown
Member

viferga commented May 7, 2026

That should go in another PR.

@niko091 niko091 marked this pull request as ready for review May 8, 2026 10:00
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.

2 participants