Add cmake linting gate
Details
Diff Detail
- Repository
- rCOMM Comm
- Branch
- jonringer/cmake-lint
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
Whoa, super cool how easy it is to use NixOS here!! And thank you so much for adding this.
Separately, we consider setting this up for lint-staged and GitHub Actions as well. Can you create tasks for those?
(I think lint-staged is a more important one probably.)
Fails on the following:
error: experimental Nix feature 'nix-command' is disabled; use '--extra-experimental-features nix-command' to override
As an aside, are we sure we want to do with this with nix at this point?
I think we should definitely add Nix workflows to the CI with nix build, nix develop, etc... but think it would be best to do this sort of thing on a simple Debian machine like we do with shellcheck (eg https://github.com/CommE2E/comm/blob/master/.buildkite/shellcheck.yml)
If we add Nix workflows to the CI, we'll definitely want to run them on Debian/Ubuntu and macOS to reflect dev/production environment. Nix on Mac seems particularly brittle.
Nix on Mac seems particularly brittle.
This only seems to be the case if they overwrite /etc/zshrc on an update. I agree that is annoying when it does happen. But a good long term solution (e.g. /etc/zshrc.d/) would require support from Apple.
If we add Nix workflows to the CI, we'll definitely want to run them on Debian/Ubuntu and macOS to reflect dev/production environment.
Sounds good
It's failing on the following:
ERROR Failed to open **/CMakeLists.txt for read Summary ======= files scanned: 0 found lint: 🚨 Error: The command exited with status 1
The following works and doesn't depend on Nix so it should be easy for developers to run in their own environment:
steps: - label: 'cmake-lint' command: - 'pip install cmakelang' - 'shopt -s globstar' - 'cmake-lint **/CMakeLists.txt **/*.cmake' plugins: - docker#v3.13.0: image: 'python:bullseye' shell: ['/bin/bash', '-e', '-c'] agents: - 'autoscaling=true'
It's failing on the following:
Yea, forgot that most docker instances don't have glob on.
Do you have a link to where you're running it?
I mean, I click the "view in buildkite" link, and it just says, "this doesn't exist"
Hmm, I'm seeing @jonringer-comm as "jonathan-ringer@comm.app" in Buildkite when his email is actually "jonathan.ringer@comm.app". A bit confused how he has access...
No idea, I cut and paste the email from the "Buildkite" cell in the Comm access list doc which had jonathan.ringer@comm.app when I sent the invite