Page MenuHomePhabricator

[Nix] Add cmake-format to dev shell
ClosedPublic

Authored by jon on Jul 18 2022, 2:52 PM.
Tags
None
Referenced Files
F3361778: D4564.diff
Sun, Nov 24, 7:24 PM
Unknown Object (File)
Sat, Nov 23, 6:08 AM
Unknown Object (File)
Fri, Nov 22, 7:15 PM
Unknown Object (File)
Tue, Nov 5, 8:10 PM
Unknown Object (File)
Tue, Nov 5, 8:10 PM
Unknown Object (File)
Tue, Nov 5, 8:10 PM
Unknown Object (File)
Tue, Nov 5, 8:10 PM
Unknown Object (File)
Tue, Nov 5, 8:10 PM

Details

Summary

Add cmake-lint command to dev shell

Depends on D4294

Test Plan
nix develop
cmake-lint --help

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Jul 18 2022, 2:56 PM
Harbormaster failed remote builds in B10597: Diff 14590!

Rebase onto current master

Cherry-pick to different branch

Looks good to me, accepting and adding @ashoat as blocking reviewer since this introduces a new dependency.

(In the future it'd probably be helpful to link to something that shows what cmake-format corresponds to eg https://github.com/NixOS/nixpkgs/blob/nixos-22.05/pkgs/development/tools/cmake-format/default.nix or a GitHub repo or something)

This revision is now accepted and ready to land.Jul 18 2022, 5:58 PM
This revision now requires review to proceed.Jul 18 2022, 5:59 PM
In D4564#130255, @atul wrote:

(In the future it'd probably be helpful to link to something that shows what cmake-format corresponds to eg https://github.com/NixOS/nixpkgs/blob/nixos-22.05/pkgs/development/tools/cmake-format/default.nix or a GitHub repo or something)

Do you mean like which upstream it uses? (e.g. https://github.com/cheshirekow/cmake_format)

Wondering where the config for cmake-format goes, and if there's a way to configure the max line length

This revision is now accepted and ready to land.Jul 19 2022, 8:22 AM

Wondering where the config for cmake-format goes, and if there's a way to configure the max line length

Default is 80

@atul not sure what format you wanted the info, but with nix you can also just query the underlying package:

$ nix eval nixpkgs#cmake-format.meta.homepage
"https://github.com/cheshirekow/cmake_format"
In D4564#131048, @jon wrote:

@atul not sure what format you wanted the info, but with nix you can also just query the underlying package:

$ nix eval nixpkgs#cmake-format.meta.homepage
"https://github.com/cheshirekow/cmake_format"

Oh sweet TIL, I'll jot that down

This revision was automatically updated to reflect the committed changes.