Related Linear issue here. This is part of a set of diffs that will allow ShellCheck to be added to the CI. See inline comments for specific details of the ShellCheck error/warning output.
Details
Not entirely sure when this script is run, but the changes in this file are comments and adding double quotes, so I'm reasonably assuming it will continue to work as expected. My guess is this is a pre-commit script, but since I didn't commit any Rust code I don't know if it's still working. Adding @varun as a reviewer because Rust.
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
I don't have much context on this script I think, and I'm a bad choice for a first-pass reviewer except for cases listed here
Not entirely sure when this script is run
I think you should be able to figure this out pretty easily by searching through the codebase
My guess is this is a pre-commit script, but since I didn't commit any Rust code I don't know if it's still working.
Once you find out where it's being run, you should be able to make a noop change to a file (add a print statement or something) and create a commit and see what happens.
I think you should be able to figure this out pretty easily by searching through the codebase
Haha, yeah. Looks like it's run anytime there's a change to a Rust file. From .lintstagedrc.js:
'services/commtest/**/*.rs': function rustFormat(files) { return 'yarn rust-pre-commit'; },
Made a no-op commit (added a print statement) and it worked:
I think the real way to test that the script still works would be to make an invalid formatting change, like add some random line break in a rust file, and then try committing the change. If committing fails, the script still works as expected