Page MenuHomePhabricator

[Nix] Add cmake-format to dev shell
ClosedPublic

Authored by jon on Jul 18 2022, 2:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jun 11, 1:13 PM
Unknown Object (File)
Sat, Jun 8, 11:28 AM
Unknown Object (File)
Thu, Jun 6, 4:59 PM
Unknown Object (File)
Wed, Jun 5, 9:59 PM
Unknown Object (File)
Wed, Jun 5, 12:34 AM
Unknown Object (File)
Tue, Jun 4, 5:45 PM
Unknown Object (File)
Tue, Jun 4, 11:59 AM
Unknown Object (File)
Tue, Jun 4, 10:01 AM

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
Lint Not Applicable
Unit
Tests Not Applicable

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.